question

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

Assign names to tasks

Hi, I'm analysing a model and I saw that the transporters rate is only defined by "Blocked, Idle, Travel Empty, Travel Loaded".

1719321903307.png

I wanted to add other names to the state of the transporters, for example, when they are loading the queues I want to show on the graph as "Loading Queues", is there a simple way I can make this?

Thank you in advance :)

mlall.fsm

FlexSim 24.1.0
tasks
1719321903307.png (6.3 KiB)
mlall.fsm (327.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 @luis-rodrigues, was Felix Möhlmann'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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

The simples, yet flexible approach that comes to mind would be to utilize messages to set the states. Before a token enters a task activity, have it send a message with a delay time of 0 to the transporter. A message allows you to attach up to three (numeric) parameters. We can use this to tell the transporter to which state it should change. After the message is scheduled the token will enter the next activity that starts the task and causes the transporter to switch to the state linked to that task by default. Due to the 0s delay of the message, it is only then received by the transporter, overriding the previous state change in its On Message trigger.
Note that in the example from the "Load Materials" flow shown below, the travel to the destination is entirely part of the offset travel portion of the unload task. To track the travel time in a separate state, insert a travel task to the destination object.

capture1.png

There are 50 default states in FlexSim. I would suggest you use the state numbers starting at 51 to implement your own states. If you want the statistics panel in the transporters' properties to show a state name other than just the number, you'd have to edit the state names in their attribute tree. For the state chart it is enough to define a name for the states in the linked state table.

capture2.png

mlall-20240626-fm.fsm


capture1.png (10.6 KiB)
capture2.png (12.1 KiB)
mlall-20240626-fm.fsm (336.8 KiB)
· 10
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 very much for your answer @Felix Möhlmann. I just have one question, if I want to the transporter to have the same state while loading and unloading into the "ML" I should assign in the Send Message the same number of state?


For example:

1719501583193.png

Thank you

0 Likes 0 ·
1719501583193.png (200.3 KiB)
Felix Möhlmann avatar image Felix Möhlmann luis-rodrigues commented ·

Yes, the first message parameter denotes the state the transporter will be set to. As sending a message is a pick option, you can use the GUI. No need to make the change directly in the code.

1719509758421.png

0 Likes 0 ·
1719509758421.png (20.2 KiB)
luis-rodrigues avatar image luis-rodrigues Felix Möhlmann commented ·

Thank you for your answer @Felix Möhlmann . I have another question.

Having define states for everything, why do I keep getting the "travel loaded" and "travel empty"?

1719762711035.png

0 Likes 0 ·
1719762711035.png (103.7 KiB)
Show more comments