question

Felix Möhlmann avatar image
2 Likes"
Felix Möhlmann asked Jeanette F commented

Bug with TrafficControl on preempt

The Traffic Control (TC) in the attached model is set to only allow a single traveler in its area (Mutual Exclusion or Untimed Traffic Modes both have this error).

At 2.2s Transport2 starts to travel to the opposite end of its path. Half a second later, before it reaches the network node at which it would have to enter the TC area, it is preempted and receives a new travel task (with the same destination).

This causes its current network node to be set to the TC's entry point and, crucially, Transport2 is able to enter the TC area at this time while Transport1 was already occupying it.

tcbug.gif

TC-preempt-bug.fsm

Edit: The TE will also falsely enter the TC area, when it is already at the entry node (and has a pending request) at the time it is preempted and receives a new travel task.

FlexSim 23.2.1
task executertraffic controltravel networkspreempt
tcbug.gif (11.1 MiB)
tc-preempt-bug.fsm (35.7 KiB)
· 2
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 ·

@Felix Möhlmann For now you could issue a non-process flow-based preemptive task sequence with a durative task as the first task (eg travel). Such a task is easily created using createtraveltask(<dispatcher>,<destination>,<priority>, <preemptType>) which will return a task sequence pointer to which you can add other process flow tasks for later synchronization

tc-preempt-bug_jl.fsm

1 Like 1 ·
Felix Möhlmann avatar image Felix Möhlmann Jason Lightfoot ♦ commented ·

Thanks for the tip. In the model where I encountered this, the transporter is acquired as a Process Flow resource anyway (and the preempted travel only happens as part of the "Travel To Home Location" trigger option). So I might actually just use redirectnetworktraveler() directly and follow it up with either a Wait for Event or a duplicate task to travel to the same destination to detect when the TE arrives and let the PF token continue.

For anyone stumbling across this who does not want to use code: Instead of using createtraveltask(), you can also create the task sequence in Process Flow without dispatching it immediately and without setting a "Wait for Finish State".

capture1.png

1 Like 1 ·
capture1.png (21.5 KiB)
Phil BoBo avatar image
1 Like"
Phil BoBo answered Felix Möhlmann commented

This is how preemption on network nodes works. See "Preempting Travel Tasks on Networks with Traffic Controls" in https://docs.flexsim.com/en/23.2/Reference/TaskSequences/TaskSequenceConcepts/TaskSequenceConcepts.html#preempting

· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·
Thanks for pointing this out.
0 Likes 0 ·
Jeanette F avatar image
0 Likes"
Jeanette F answered Felix Möhlmann commented

Hello @Felix Möhlmann,

I have emailed this into the Dev team.

· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·
Thank you for bringing this to their attention.
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.