question

Lion avatar image
0 Likes"
Lion asked Lion commented

How to make the car leave in the right direction in time?

How to make the car leave in the right direction in time?
step 1
Truck in the left hand = First (Green time 10 sec)

= Truck are runing out between 10 sec then stop and wait (red 20 sec)
Truck in the South wait (Red time 15 sec)

step 2

Truck in the South = Seccond (Green time 5 sec)

= Truck are runing out between 10 sec then stop and wait (red 20 sec)
Truck in the Left wait (Red time 20 sec)

1700658148599.png


This is my file

7.fsm

FlexSim 18.0.10
network nodestraffic controlnodes
1700658148599.png (517.5 KiB)
7.fsm (27.3 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Hi @Lion, 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 Lion commented

Your current approach could be made to work, but I would instead suggest a simpler solution.

You can represent the different "modes" of the intersection as a Process Flow variable. Each truck needs this variable to have a specific value in order to be allowed to continue (their "traffic light" is green, so to speak).

You can use a Wait for Event activity to hold the tokens until the variable changes to the needed value for that token (the value would exist as a label on the token).

capture2.png

A separate token can then loop through a series of activities and set the variable values with different delays inbetween.

capture1.png


capture2.png (10.5 KiB)
capture1.png (46.4 KiB)
· 7
5 |100000

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

Lion avatar image Lion commented ·

I've tested it but I don't understand that my settings are wrong. Please give me some advice. Today You teach me a lot. Take time by youself then tomorrow answer me.

Thank you a lot for Today. ^^
1700670892230.png

This is my file.
8.fsm

0 Likes 0 ·
1700670892230.png (361.2 KiB)
8.fsm (26.9 KiB)
Felix Möhlmann avatar image Felix Möhlmann Lion commented ·

All Set Variable activities set the value to 0. You have to change the value field to actually change the variable to what the name of the activity says.

1700675865750.png

Similarly, you assign "TrafficMode" 0 to both types (spawning at the bottom or on the left) of truck tokens. One type should get the value 1 and the other 2.

1700675942562.png

Finally, check the settings of the Wait for Event activity again. The value the variable has to arrive at should be equal to the "TrafficMode" label. And you have to check the option "Fire If Inital Value Meets Rule" to allow the tokens to continue immediately if the variable is already at the correct value when they enter the activity.

1700676120566.png

0 Likes 0 ·
1700675865750.png (14.9 KiB)
1700675942562.png (16.4 KiB)
1700676120566.png (11.6 KiB)
Lion avatar image Lion Felix Möhlmann commented ·


Am I doing it right now?

1700709700780.png


8.1.fsm

0 Likes 0 ·
1700709700780.png (514.3 KiB)
81.fsm (25.5 KiB)
Show more comments

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.