question

Javier Lg avatar image
0 Likes"
Javier Lg asked Clair A edited

How I can change the state (Travel loaded to empty) even if there is always load

I have a model in process flow with include graphics with full wagons then I unload and I put empty wagons for the statistics i have as the train is always full. is there any trick to change the status and collect the statistics with empty wagons ?

FlexSim 22.2.1
processflowstatusstatetable
· 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.

Clair A avatar image
0 Likes"
Clair A answered Clair A edited


Hello Javier,

Here is an example: 2022-08-26 Train with empty or loaded wagons.fsm

If the state is travel loaded but the 1st wagon is empty, I override the train state to travel empty:
1661523519370.png

Note that with that behaviour the train will have the travel empty state in both situations below:

  • when the train travels alone without any wagons
  • when the train travels with empty wagon(s)

gif2.gif



5 |100000

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

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Logan Gold edited

All objects use something called a Categorical Tracked Variable to record how long they have been in each state. You can make a Categorical Tracked Variable on a label on a token, and set it to any state at any time. That way, you won't have to fight against the object as it tries to change states.

Then you can make a stats collector that records the time in each state, and you can also make a chart that points at the column set.

Here's a demo model: CustomStatePieDemo.fsm

Here are some key points:

  1. I added an empty state table with some example states.
  2. I made a token with a categorical tracked variable on a label
  3. The Categorical TV gets set to random states
  4. The stats collector creates a column for the token id, a column for the utilization, and one column for every state in the state table.
  5. The pie chart points at the table from the stats collector.

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