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 02-03-2011
shafizad shafizad is offline
ProcSim Consulting
 
Join Date: Jul 2010
Location: Switzerland
Posts: 75
Downloads: 18
Uploads: 0
Thanks: 90
Thanked 2 Times in 2 Posts
Rep Power: 126
shafizad is on a distinguished road
Question Dispatch task only on idle dispatcher waiting on a certain node

Hello,

I would like the transporter arriving at a certain point recieves only the first tasksquence in the queue of attached dispatcher. In other words, I require that no task is given to other transporters unless they are idle at this node point (I have other idle transporters at other places!) and at the same time, when on this node, dispatcher dispatches only the first tasksequence in the queue of dispatcher (if there is no task on the queue they wait for a task!).



Any suugestion?

(I am not sure if "OnResourceAvailable" would come in hand for solving this problem.)
  #2  
Old 02-03-2011
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

first of all, do not dispatch any tasksequence at the dispatcher.
you can dispatch on arrival at a networknode the first TS at the dispatcher to the traveler.

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
shafizad (02-03-2011)
  #3  
Old 02-03-2011
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

But attention, a transporter fires the OnArrival trigger twice if it arrives. So have a look to what edge it is going, and go sure you only create your Tasksequences once
__________________
Hemmi
The Following User Says Thank You to Sebastian Hemmann For This Useful Post:
shafizad (02-03-2011)
  #4  
Old 02-03-2011
shafizad shafizad is offline
ProcSim Consulting
 
Join Date: Jul 2010
Location: Switzerland
Posts: 75
Downloads: 18
Uploads: 0
Thanks: 90
Thanked 2 Times in 2 Posts
Rep Power: 126
shafizad is on a distinguished road
Default Pls, could u make a simple model in response?

Could u give me some hint on which command I should use on the node?
if possible make a simple model of what you suggest.

I have attached a model that works as I like but it is the messiest solution I know! Furthermore, it has problems that I don't understand how to resolve!

press execute on run only to get started!
Attached Files
File Type: zip Model.zip (65.9 KB, 216 views)
  #5  
Old 02-03-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

Doesn't the model made for you here do that ? It had no real extra code other than telling transporters to return to the 'dispatch' node if they're idle. Because they queue, only one can be at the node at one time and therefore only one can receive the first job from the dispatcher. The others are all still busy trying to get to that position.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
shafizad (02-03-2011)
  #6  
Old 02-03-2011
shafizad shafizad is offline
ProcSim Consulting
 
Join Date: Jul 2010
Location: Switzerland
Posts: 75
Downloads: 18
Uploads: 0
Thanks: 90
Thanked 2 Times in 2 Posts
Rep Power: 126
shafizad is on a distinguished road
Default

If I have got your idea, you want me to exclude the dispatchtasksequence at the end of tasks in order to later dispatch?
The surprising result is that even if I ask only to dispatch the first task, it dispatches all of them.

Example of test: source->queue1->queue2
On queue1 use the Task Sequence Example 1 without dispatchtasksequence(ts);
Dispatcher [return 0;] and operator to transport items from queue1 to 2.

//dispatched tasks from a script window
Script Window:
dispatchtasksequence(gettasksequence(so(), 1)); //so() is the designated dispatcher.
  #7  
Old 02-03-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

For that to work I think you'd need to return -1 on the PassTo of the dispatcher. From the help:

If 0 is returned, then the task sequence will be queued up using the below mentioned queue strategy, and then will be dispatched to the first available mobile resource. If -1 is returned, then the Dispatcher will do absolutely nothing. In such a case you would use the movetasksequence() and dispatchtasksequence() commands to execute dispatching logic yourself.


So when the traveller reaches the node, move the tasksequence from the dispatcher to the traveler using movetasksequence() and than run dispatchtasksequence().
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
shafizad (02-03-2011)
  #8  
Old 02-03-2011
shafizad shafizad is offline
ProcSim Consulting
 
Join Date: Jul 2010
Location: Switzerland
Posts: 75
Downloads: 18
Uploads: 0
Thanks: 90
Thanked 2 Times in 2 Posts
Rep Power: 126
shafizad is on a distinguished road
Default

You have a brilliant memory Jason. at the time, that solution was really effective. However, we changed the design for this project because it was really complicated to keep all the transporters in "UTILIZED" mode when they were not Home.

So, now, transporters at other places (not Home) could be "idle" and capable of executing tasks that shouldn't (for example, they are idle waiting for some operations to get done! or simply have to leave that place after some event!). their tasks is given directly not via dispatcher. I know this is a strange decision not to use UTILIZED mode (or subtasks) but I found no better solution.

Now I ask transports to come back home (not via dispatcher) and then, execute special tasks (those queued at dispatcher) if there is (if no, wait for those special tasks!).
  #9  
Old 02-03-2011
shafizad shafizad is offline
ProcSim Consulting
 
Join Date: Jul 2010
Location: Switzerland
Posts: 75
Downloads: 18
Uploads: 0
Thanks: 90
Thanked 2 Times in 2 Posts
Rep Power: 126
shafizad is on a distinguished road
Default @Jason

THere is sth strange in your solution because once you move one tasksequencequeue( so(), 1) then your model continues moving all other first tasksequences!
pls, see the model I attached implementing your idea.

That's why I have two dispachers in the previous model I have attached a few hours ago!
Attached Files
File Type: zip JasonIdea.zip (44.8 KB, 200 views)
  #10  
Old 02-03-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

Oops, sorry about that. You could close the output of the Dispatcher or return -1 in the task executer's OnResourceAvailable, or the OnResourceAvailable of the Dispatcher.
The Following 2 Users Say Thank You to Jason Lightfoot For This Useful Post:
shafizad (02-03-2011)
  #11  
Old 02-03-2011
shafizad shafizad is offline
ProcSim Consulting
 
Join Date: Jul 2010
Location: Switzerland
Posts: 75
Downloads: 18
Uploads: 0
Thanks: 90
Thanked 2 Times in 2 Posts
Rep Power: 126
shafizad is on a distinguished road
Default

closeoutput doesn't work but "return -1; onResource Available" works either on Dispatcher or Operator. I see now how you can selectively act . I am not sure if I understand the meaning of return -1 on the operator onResourceAvailable! You don't even need to have return -1 on the PassTo of dispatcher.
  #12  
Old 02-03-2011
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

I made a few changes to the model from above. Now it seems to run without exceptions: model_jv.zip.
It isn't necessary to start an empty tasksequence to travel back at home. A running tasksequence can be extended with another task at NN2.
Somehow the arrival trigger is executed twice. The condition is extended with a content state: at the unload network node with a content of one and at the load network node with none content .
The last model from Jason I can't understand, too. It seems to behave incorrect. The taskexecuter receives tasksequences, which shouldn't be passed. Where is the code of tasksequence moving?

Last edited by Jörg Vogel; 12-03-2014 at 02:07 AM.
The Following User Says Thank You to Jörg Vogel For This Useful Post:
shafizad (02-07-2011)
  #13  
Old 02-03-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

Jörg I haven't posted a model in this thread...

If you're not dispatching the task when you create it then of course you don't need to return -1 on the PassTo since this gets fired when it's dispatched. However, I think in the world of objects only knowing what they need to, perhaps you should be able to use a standard picklist option for the Fixed Resources generating the task, and it should be up to the dispatcher and task executers that decide how it should be released and executed.

So in this case I would continue to generate tasks and dispatch them and rely on the dispatcher and Netnode modification to adjust the release process.
The Following 2 Users Say Thank You to Jason Lightfoot For This Useful Post:
shafizad (02-07-2011)

Tags
dispatcher, node, tasksequencequeue, transporter


Thread Thread Starter Forum Replies Last Post
IDLE and EMPTY Lydia Franck Q&A 2 08-05-2010 03:03 AM
arrive was given a task sequence but is not a dispatcher Brent Merryman FlexSim HC: Q&A 3 04-09-2010 08:34 AM
State Waiting for Operator Nico Zahn Q&A 6 01-15-2009 09:00 AM
Waiting to dispatch other task. Enver Burak KORCAK Q&A 2 09-15-2008 04:39 AM
How to find the idle time of the job/product? shivrash Q&A 5 04-09-2008 09:01 AM


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.