Custom agv state be coverd when it's allocated

Custom agv state be coverd when it's allocated

s1125413
Advocate Advocate
614 Views
5 Replies
Message 1 of 6

Custom agv state be coverd when it's allocated

s1125413
Advocate
Advocate

Hello FlexSim community!

I'm trying to implement a behavior where, once an AGV accepts a task, its state changes to "Travel_to_load" and remains in that state until the task is completed. However, it seems that, similar to a previous post, the state is overwritten after the allocation of the first point on the path.

https://forums.autodesk.com/t5/flexsim-forum/agv-custom-state/m-p/13492592

 

I tried to enforce the state using code in the Process Flow, but the AGV cannot revert back to "TravelEmpty" afterward.Thank you in advance for any advice or alternative methods to achieve this!

 

s1125413_1-1746000513195.png

 

 

File:https://drive.google.com/file/d/1K43dbDOrPvtM8y_uRf0fwV8ug8HDsq3T/view?usp=drive_link

 

0 Likes
Accepted solutions (1)
615 Views
5 Replies
Replies (5)
Message 2 of 6

FelixMoehlmann
Collaborator
Collaborator

Resetting the 'forcedState' before the token hits the Finish TS activity should lead to the AGV assuming the default state afterwards.

0 Likes
Message 3 of 6

s1125413
Advocate
Advocate

@FelixMoehlmann  I used objectflow to update the state when the AGVs are in "travel to load" mode by reading the "forcedState" label on the AGV. However, the model gets stuck when the AGV's 'forcedState' changes in the processflow and the objectflow is still running.

Thank you in advance for your help.

 

s1125413_0-1747884557157.png

 

File:

0 Likes
Message 4 of 6

FelixMoehlmann
Collaborator
Collaborator

The sub flow is an infinite loop if the label is set to 1. In general, using a "clock" to do a check if some condition is true is never good design in FlexSim.

The "forcedState" label does not change without you doing so. So you can just set/reset the state at the same time. Either in a Custom Code activity or even inside the label assignment code.

If you need a central control logic that reacts to label changes, you can use Tracked Variable labels that allow you to listen for changes of the label.

0 Likes
Message 5 of 6

s1125413
Advocate
Advocate

@FelixMoehlmannThank for your advise, I using custom code to update the state and it's useful, but when the Idle agv preempt twice, the token can't read the agv info.

0 Likes
Message 6 of 6

FelixMoehlmann
Collaborator
Collaborator
Accepted solution

The "Push to AGV" activity in the idle flow should not overwrite the "agv" label with the puller. Sorry for that oversight.

moehlmann_fe_0-1748850016535.png

 

0 Likes