question

MPeyman avatar image
0 Likes"
MPeyman asked MPeyman commented

same result for each run of simulation.

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

FlexSim 23.0.8
random streamsresult
· 6
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·
@MPeyman, in case you use an express licensed version this is a feature of restriction.
0 Likes 0 ·
MPeyman avatar image MPeyman Joerg Vogel commented ·

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.


1 Like 1 ·
Joerg Vogel avatar image Joerg Vogel MPeyman commented ·
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 0 ·
Show more comments
Jeanette F avatar image Jeanette F ♦♦ commented ·

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 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered MPeyman commented

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

· 6
5 |100000

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

MPeyman avatar image MPeyman commented ·
Dear @Jason Lightfoot, I didn't understand you explanation can you explain it via photo? Thanks
0 Likes 0 ·
MPeyman avatar image MPeyman commented ·

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 0 ·
exit.png (183.9 KiB)
result.png (20.8 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ MPeyman commented ·
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 0 ·
MPeyman avatar image MPeyman Jason Lightfoot ♦♦ commented ·

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 0 ·
2.png (72.9 KiB)
Show more comments