question

Joe L6 avatar image
0 Likes"
Joe L6 asked Jeanette F commented

Algorithm: Repeated simulation of the model.

Hi team,

I hope to achieve the following scenario where the model will perform 3 rounds, and in each round, the model will execute 5 tries. Between each simulation, the model will first stop, then reset, and then run again. In other words, the model will run 15 times repeatedly.

At the beginning, I set Round = 1 and Try = 1 in the table, and start the simulation. Before the simulation ends, the next Round and Try values will be written in the table. Afterwards, the model will stop, reset, and run again.

The values of (Round, Try) are in sequence: (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5).

My model takes 2 seconds to simulate each time. I have written the following program, but I feel like the model does not spend any time simulating after the first simulation (less than 2 seconds of simulation time). After that, the numbers just keep jumping until the (Round, Try) values are (1, 4).code.png

May I know if my program is written incorrectly? Thank you.Round Try.fsm

FlexSim 16.1.2
stopresetrunalgorithmapplicationcommand
code.png (20.0 KiB)
round-try.fsm (150.0 KiB)
· 1
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Joe L6, 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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered

You should use the experimenter for this type of thing (but presumably more elaborate)

· 1
5 |100000

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

Joe L6 avatar image Joe L6 commented ·
Thanks for your suggestion, I'll work on it!
0 Likes 0 ·