question

Kais K avatar image
0 Likes"
Kais K asked Felix Möhlmann commented

Variant change simulation

Hello everyone,

I am doing a simulation of a production line that can produce two diffrent variants (F_F and F_M) of a product with two diffrent process flows.

I created a GUI to make a variant change but didn't know how to implement the change in the "process flow".

In the GUI I added two buttons one to select F_F and one to select F_M.

Can I get some help on that?

Thank you.

Line simulation.fsm

FlexSim 19.0.0
proces flowguivariant change
line-simulation.fsm (356.7 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 Felix Möhlmann commented

You need to store a value somewhere that you can access in the decide activity and thus determine the product type. This can be many things: A label defined on some object or the process flow itself, a global variable, a cell in a global table, ...

As an example I added a label ("Production") to the process flow and changed your GUI buttons to set this to either 1 (F_F) or 2 (F_M). The decide is send the token to the connector with the respective rank.

line-simulation_1.fsm


line-simulation-1.fsm (356.0 KiB)
· 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.

Kais K avatar image Kais K commented ·

Thank you for your response.

But when the simulation is running, pressing the GUI buttons will do nothing. The values will only change when I reset and rerun the simulation again. This is not my goal.

My goal is to be able to switch the variants I want to produce while the simulation is still running.

For example: I run the simulation to start the production of the variant F_F, then whenever I want I can press on the F_M button to switch the production to the F_M variant without restarting the simulation again.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Kais K commented ·

Then you can implement the decide activity after each production run to see if the product type should change.

line-simulation_2.fsm

1 Like 1 ·
line-simulation-2.fsm (359.6 KiB)