question

luis-rodrigues avatar image
0 Likes"
luis-rodrigues asked luis-rodrigues commented

Model time variable

Hi, I'm working on a model that has different entries (tokens) at the source and each of them has a quantity, and right now the model is using this quantity to process batch's and after this the simulation ends. I want to modify it so that the quantities are "infinite" and the model is stopped at a determined time.

Can anyone give me a hint in how to do this?

Thank you in advance.

mlall-4a.fsm

FlexSim 24.1.0
variable time
mlall-4a.fsm (323.6 KiB)
5 |100000

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

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered luis-rodrigues commented

One approach would be to create a few tokens per row (enough so there is always at least one token waiting to enter the first zone). Then have each token create a new token before it enters the sink. The only adjustment that's really needed is a new way of assigning an index to the token. In the attached model I use a global variable map that stores the current index for each of the schedule rows.

mlall-4a_1.fsm

To stop the model just set a stop time or use a user event or a small Process Flow block.


mlall-4a-1.fsm (327.5 KiB)
· 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.

luis-rodrigues avatar image luis-rodrigues commented ·
Thank you for your answer @Felix Möhlmann , in the last model you helped me add a custom code to save csv files from the dashboard. What I needed is that when I define a stop time it should also save the same csv files. Is it possible?
0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann luis-rodrigues commented ·
Sure, just set up a user event (Toolbox -> Modeling Logic) and use the same code from the Custom Code activity (without the if-condition).
0 Likes 0 ·
luis-rodrigues avatar image luis-rodrigues Felix Möhlmann commented ·
Thank you :)
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.