question

Craig DIckson avatar image
0 Likes"
Craig DIckson asked Jordan Johnson answered

Experimenter only working for first 8 runs?

I have a model that behaving strangely in the experimenter. As long as the number of runs in my experiment is not greater than the number of cores in my machine, it works correctly. (My computer has 8 cores). But if it has more than 8 runs, the second pas through for runs > 8 run almost instantaneously and return no results. So if I have 6 scenarios and 1 replication, or 4 scenarios with 2 replications, it's fine. But if I have 9 scenarios with 1 rep, or 6 scenarios with 2 reps, the last runs don't work.

I saw a similar question earlier in the forums, but the suggestion was to check "Restore original state after each replication", and it was already checked in this model.(I actually tried it both ways and neither worked. Also, I tried on a different model to see if it was a FS2019 bug, but the other model seems fine.

The pictures below show the problem:

Six scenarios, 1 rep, all ok:

6 scenarios 2 reps: the first 4 scenarios worked; the last 2 scenarios failed. This was run immediately after the above, changing only the number of reps (from 1 to 2):

9 scenarios: the first 8 scenarios worked, the 9th rep failed:

Experimenter config:

Scenarios are pretty simple, just a global variable:

FlexSim 19.1.0
experimenter
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

London MT avatar image London MT commented ·

If you run your model without the experimenter, does it terminate correctly? it seems like your runs are not terminating.

0 Likes 0 ·
Craig DIckson avatar image Craig DIckson London MT commented ·

I purposely set the experimenter time to be slightly less than the expected completion time, to make an apples-to-apples comparison a bit easier. But yes, they all end correctly outside the experimenter.

What I'm struggling with is that I get different results for the same scenario/rep depending on the number of reps. See the scenarios MaxCommon50 and MaxCommon100 in my first two pictures. If I only run one rep, I get valid results for those scenarios (since they are the 5th and 6th runs), but if I run 2 reps, then I don't (because they are now the 9th and 10th runs). Note also that if I then move those scenarios to the left on the scenarios tab, they will work.

In fact, if I have only two scenarios, and I set reps to 4, they'll both get valid results for all reps. But if I set it to 6 reps, then only the first two reps of the second scenario will get valid results. And if I set it to 8 reps, only the first scenario will get any valid runs.

0 Likes 0 ·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered

@Craig DIckson

Hi Craig, I notice that the child replications are all opening an Excel workbook. The excel connection should not be used for reading or writing during an experiment. You should import all the data you need at the beginning of the run. If you are returning tables from each replication, then you should use the End of Replication trigger to pass the table up to the parent FlexSim, and use the End of Experiment trigger to dump that data from the parent FlexSim to Excel.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Braydn T converted comment to answer

Hi Craig,

If you post your model (perhaps in a private question, if the model is sensitive), we may be able to learn more. If you set the Max Cores (on the Advanced tab of the Experimenter) to 1, can you run more than one replication?

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Craig DIckson avatar image Craig DIckson commented ·

Jordan,

If I set it to 1 core, only the first rep of the first scenario gets a valid answer; if I set it to two cores, then the first two runs are valid, whether that is two scenarios/1 rep or 1 scenario 2 reps.

I'l try to post it; it does depend on some other files (Excel) being in the right place.

0 Likes 0 ·
Braydn T avatar image Braydn T Craig DIckson commented ·

Hey @Craig DIckson

Were you able to find a solution to this? If not, please reply with your model and tag me and Jordan to help you find a solution.

0 Likes 0 ·
Craig DIckson avatar image Craig DIckson Braydn T commented ·

@Braydn T @jordan.johnson

I posted this in a private question "Experimenter misbehaving" in early May.

Thanks

Craig

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.