question

shanice.c avatar image
0 Likes"
shanice.c asked shanice.c commented

How to change STATE of TE?

When TE battery level is under threshold, it travel to the charge station. I'd like to switch agv to "busy" state, but how could I make it? In second activity, I unchecked the "wait for complete" so that it could turn to busy state without waiting delay, then starts to wait for level come to 80%. But I found in my dashboard, there's no "busy" state exist. In the stable table, I have Busy state utilized, so I suppose busy state should show up in the dashboard.

The possible problem may because of 0 delay time I set, it will turn to busy state and then turn back to travel state instantly. Does Flexsim has mechanism to switch to different state automatically? If yes, how could I switch to busy status when start charging, and not restrict by the delay time field in the activity? Thank you!

1639704117403.png

1639704149376.png

1639704293644.png

1639704325850.png


FlexSim 21.2.0
state
1639704117403.png (18.1 KiB)
1639704149376.png (21.3 KiB)
1639704293644.png (17.5 KiB)
1639704325850.png (29.9 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

·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered shanice.c commented

Just use the Custom Code activity to set the TE state and not the Delay Task activity.

· 3
5 |100000

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

shanice.c avatar image shanice.c commented ·

Hi @Jason Lightfoot, Thank you for your answer. I've tested with an example, may I ask why te state isn't changed? The state is still following to the state depends on te's behaviour.

testState.fsm

0 Likes 0 ·
teststate.fsm (42.7 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ shanice.c commented ·

It's the way FlexSim processes events in one chain rather than scheduling events in the list. This means you need a Breathe (zero time delay) activity before you set the state to busy

1 Like 1 ·
shanice.c avatar image shanice.c Jason Lightfoot ♦ commented ·
@Jason Lightfoot Thank you! It's works as I want!
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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