ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 04-07-2011
Stefan Trabut Stefan Trabut is offline
Flexsim User
 
Join Date: Mar 2011
Posts: 29
Downloads: 12
Uploads: 0
Thanks: 34
Thanked 5 Times in 5 Posts
Rep Power: 115
Stefan Trabut is on a distinguished road
Default Tasksequences: BREAK, CALLSUBTASKS, or PREEMPT?

Hi,

I would like an operator to do a long tasksequence (TS), and to be called away to do a different TS in certain cases (priority?). Before switching to the different TS, the operator should finish a part of the current TS. How could this be done?

Two options which are not satifying, are:

1)
The different TS is preempting (PREEMPT_ONLY), which causes the operator to switch to the different TS right away.

2)
The first, long TS has several TASKTYPE_BREAK tasks, at the places where the operator could interrupt the TS. The problem here is that the operator will break to a task which is in its TS queue, even if the long TS has an equal or higher priority.

Thanks!
Attached Files
File Type: zip BREAK_PREEMPT.zip (51.1 KB, 163 views)
  #2  
Old 04-07-2011
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

Change the 'BreakTo Requirement' option on the operator to include a test for priority.

Example attached.
Attached Files
File Type: zip BREAK_PREEMPT_JL.zip (51.9 KB, 153 views)
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Stefan Trabut (04-08-2011)
  #3  
Old 04-07-2011
Stephan Seidel's Avatar
Stephan Seidel Stephan Seidel is offline
Flexsim User
 
Join Date: Mar 2009
Location: Dresden, Germany
Posts: 36
Downloads: 20
Uploads: 0
Thanks: 26
Thanked 22 Times in 8 Posts
Rep Power: 150
Stephan Seidel will become famous soon enough
Default

Hi All,

thanks Jason for your reply and example. That was very helpful. What I'd like to do is to interrupt a normal task sequence with a coordinated task sequence which should be preempting.
In my model this works only if I use PREEMPT_AND_ABORT_ACTIVE. In case PREEMPT_ONLY is used, the current task is not interrupted and the TE is just continuing with his orignila task sequence while the other operator which is necessary for the coordinated work is allocated and waiting.
I'm still very unsure about the PREEMPT and Priority stuff. Maybe someone can shed some light on this topic.

Thanks,
Stephan
__________________
---
You can't have it both ways.
  #4  
Old 04-07-2011
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

A few tips might help:

1) If you're using a dispatcher, it will not decide to preempt tasks from its task executers. You'll need to return the port number of the connected TE (the one you want to preempt) in the dispatcher's Pass To to get it to work.

2) The prempt only takes place if the activetask has a lower priority value or the active task is PREEMPT_NOT. For coordinated task sequences you pass in the priority and preempt values to the insertallocatetask() function.

3) Bear in mind that preempting TEs that are travelling on networks has caused them to disconnect from the network and travel in undesirable straight lines to the next network node. For this reason I try and avoid preempting TEs with networks.

The User Manual has a section on Task Sequence Preempting providing further detail.

Last edited by Jason Lightfoot; 04-07-2011 at 11:51 AM.
The Following 4 Users Say Thank You to Jason Lightfoot For This Useful Post:
Phil BoBo (04-07-2011)
  #5  
Old 04-07-2011
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

Attached is the same example model, but with the lower example using two coordinated operators, where one of them is acting as the dispatcher. It's a limited case example on the Operator's PassTo trigger where I just detect if the dispatching operator is already allocated when a second preempting Allocate task comes in.

Generally, if you're using a dispatcher object to dispatch, you'll need to either keep a more comprehensive track of which TEs have been allocated to coordinated tasks in order to pass them appropriately, or scan through them each time to see which are already allocated to the coordinated task sequence and which can be preempted away from their current tasks.
Attached Files
File Type: zip BREAK_PREEMPT_JL2.zip (65.3 KB, 151 views)
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Stephan Seidel (04-07-2011)
  #6  
Old 04-07-2011
Stephan Seidel's Avatar
Stephan Seidel Stephan Seidel is offline
Flexsim User
 
Join Date: Mar 2009
Location: Dresden, Germany
Posts: 36
Downloads: 20
Uploads: 0
Thanks: 26
Thanked 22 Times in 8 Posts
Rep Power: 150
Stephan Seidel will become famous soon enough
Default

Thanks Jason. Your example was indeed helpful. I introduced network nodes to it and found that the second operator (the one not carrying an item) just stops at the last network node whereas the other operator goes all the way to the queue. I assume this has to do with travelling offset for unloading. I will try to compare your solution with my model tomorrow as i dont have it available right now and post my findings.

Good night,
Stephan
__________________
---
You can't have it both ways.
  #7  
Old 04-08-2011
Stephan Seidel's Avatar
Stephan Seidel Stephan Seidel is offline
Flexsim User
 
Join Date: Mar 2009
Location: Dresden, Germany
Posts: 36
Downloads: 20
Uploads: 0
Thanks: 26
Thanked 22 Times in 8 Posts
Rep Power: 150
Stephan Seidel will become famous soon enough
Default

I checked everything on my model but wasn't able to fix the problem. This is what I'm trying to do:
TaskExecuter Flowitems (Customers) are created in a source and given a Task Sequence to travel to a certain network node (SecurityGate), break there and continue their travel to the sink. At the Security Gate network node some of the TEFlowitems will be given a coordinated, preempting task sequence which is to travel to another network node, wait for the Security Operator to arrive and wait together for some time. Once this has been finished the Security Operator is to return to his standby network node and the TEFlowitem continues its travel to the sink. Doesn't sound complicated but it just wont work. The Task Sequences are generated on the "Request Transport from" field in the Source and the OnMessage Trigger of the NNSecGate network node.
I would assume from Jasons earlier reply that this kind of task is not possible because the TE detach from the network and cannot travel to their destination. Therefore they skip the preempting task and continue with their older task. But to be honest: I'm pretty clueless about how to solve that problem.

All the best,
Stephan
Attached Files
File Type: zip Coordinated_TaskSequence_on_Networks.zip (70.6 KB, 148 views)
__________________
---
You can't have it both ways.
  #8  
Old 04-10-2011
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

I don't believe you can use a BREAK or CALLSUBTASK task to trigger the creation of a coordinated task sequence. In the OnMessage you would need to return a reference to (not dispatch) the task sequence you want the TE to continue, and a coordinated task sequence must be dispatched (not returned) using dispatchcoordinatedtasksequence() in order to work properly.

Usually, if I want to preempt a TE traveling on a network I use the network node's OnArrival to send a message to itself with a reference to the TE. In the OnMessage I then create the preempting TS. In the attached model I use this same approach to create a coordinated TS.

I assumed that the SecChecker operator in your model was not required to be in the standby position for the passengers to pass through the SecGate. You could simply add another node before the SecGate node, then connect the TrafficControl to control the passenger flow accordingly.
Attached Files
File Type: zip security08_Demo_KG1.zip (52.3 KB, 153 views)
The Following User Says Thank You to Kris Geisberger For This Useful Post:
Stephan Seidel (04-11-2011)


Thread Thread Starter Forum Replies Last Post
Coordinated Tasksequences Nico Zahn Q&A 1 11-26-2010 04:43 AM
Line break in string text Congshi Wang Q&A 3 11-10-2010 12:56 PM
Problems with load/ unload tasksequences Sebastian Hemmann Q&A 7 11-19-2009 12:58 AM
how to set preempt by label? Vic Li Q&A 4 10-19-2008 01:51 AM
Tasksequences Simon Farsah Q&A 2 04-28-2008 01:52 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.