question

Nicholas Grazioli avatar image
0 Likes"
Nicholas Grazioli asked Felix Möhlmann commented

AGV custom state

Hi,

I'm working on a model with accumulation paths and AGVs. In this model I would like to make the AGV reach a destination (CP_2) with a specific status (STATE_BUSY), different from the default one (STATE_TRAVEL_EMPTY).

I noticed that the AGV starts to move with the state that I have previously set, but after the allocation of the first point on the path the state of the AGV is overwritten with STATE_TRAVEL_EMPTY. I also tried to disable the accumulation on the paths and if there are control points between the origin CP of the AGV and the destination CP, I've seen the same behavior.

I created a PF with a debug to check when the AGV changes state. The debug triggers at 0.97 seconds the time in which the AGV allocates the first point. So I think it's the allocation mechanism that overwrites the state of the AGV.

I would like to ask if this is a bug or if there is another way I could use to maintain the custom state of the AGV.

I leave attached the model in which I noticed this behavior.

State_Change_After_Allocation_autosave.fsm

FlexSim 22.0.3
agvagvnetworkstates
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
1 Like"
Felix Möhlmann answered Felix Möhlmann commented

That's not a bug. All objects in FlexSim (that have a state) will update their state when certain events happen. To keep the busy state I see two possible solutions:

Either define a second state profile on the agv that runs in parallel to the default one. FlexSim will not automatically change states in extra profiles, so you have full control over what state that second profile is in at all times. Though this also means you will have to define each state change manually.

The other option would be to remember which state the agv should be in (in the attached model I simply store in a label) and change the state back every time it switches away. This can be done in the same logic you already built: On any state change, check if the "forcedState" label is set. If that is the case and the toState is different from the forced state, switch back it.

forced-state-fm.fsm


forced-state-fm.fsm (57.1 KiB)
· 4
5 |100000

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