same result for each run of simulation.

same result for each run of simulation.

MPeyman
Not applicable
64 Views
13 Replies
Message 1 of 14

same result for each run of simulation.

MPeyman
Not applicable

[ FlexSim 23.0.8 ]

Dear All,

in the attached model, for each run of the simulation I am getting the same result every time. however I set the task executer loading time random distribution so I expect to get different travel time each time I run the simulation Also I turn off the check point of "Repeat Random Stream".


peyman-flex-model-original_Zones.fsm

0 Likes
Accepted solutions (1)
65 Views
13 Replies
Replies (13)
Message 2 of 14

joerg_vogel_HsH
Mentor
Mentor
@MPeyman, in case you use an express licensed version this is a feature of restriction.
0 Likes
Message 3 of 14

MPeyman
Not applicable

Dear @Joerg Vogel , I am using "FlexSim Educational" So with this version I'm not able to get different result. Recently I updated it. and last year by turning off this feature I could get different result.


Message 4 of 14

joerg_vogel_HsH
Mentor
Mentor
Then such a behavior can be a result, if you have a set of parameters that cause a static behavior in your model.
0 Likes
Message 5 of 14

MPeyman
Not applicable

@Joerg Vogel , I have set of nodes to visit but the loading time of the taskexecuter, return a random sample from an exponential distribution. So I assume that by selecting off the check point of "Repeat Random Stream", for each individual run I would get different result but I don't.

0 Likes
Message 6 of 14

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

Your operator streams are 102 and 103 but in your script you initialize stream 1 only to your seed value.

0 Likes
Message 7 of 14

MPeyman
Not applicable
Dear @Jason Lightfoot, I didn't understand you explanation can you explain it via photo? Thanks
0 Likes
Message 8 of 14

joerg_vogel_HsH
Mentor
Mentor
@MPeyman, I let run your experiment a bit longer. I added some state charts for your operators. And I get variations of different utilize states for each of your replications, but input / output are static values only. As I said, your setup produces static results.
0 Likes
Message 9 of 14

Jeanette_Fullmer
Community Manager
Community Manager

Hi @MPeyman, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes
Message 10 of 14

MPeyman
Not applicable

dear @Jason Lightfoot, I investigated and see that the seed is not a problem here I attached my modified model. I remove the experiment and the custom code in that. Instead as it depicted in the picture in the last part i defined the custom code that when the list is get empty stop and save the result in stat.csv. But its only capture the one operator and the other one is always zero so I assume that I need some "If" condition in order to capture both operator and I don't know How should I call it to give me for the both operator.original_Zones_Connceted.fsm

exit.png

result.png

0 Likes
Message 11 of 14

jason_lightfootVL7B4
Autodesk
Autodesk
You're calling stop as soon as the first token exits - remove that and let it run to completion naturally (no more events).
0 Likes
Message 12 of 14

MPeyman
Not applicable

yes but if I remove this script then anywhere that I tried till now doesn't give me the right answer so I would create a logic like when the process of the operator process get finished then save it to file and end the program and send the done to python. something like this:

2.png

0 Likes
Message 13 of 14

jason_lightfootVL7B4
Autodesk
Autodesk

Just keep a track of your tokens in a global list:

1711538418189.png

original-zones-connceted_jl2.fsm

0 Likes
Message 14 of 14

MPeyman
Not applicable
Dear @Jason Lightfoot ,Yes now works perfectly. Thank you
0 Likes