ATTENTIONThis 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 |
#1
|
|||
|
|||
Get itemtype for a flowitem in a task
Hi all,
I want to set a condition in dispatcher whether the task would dispatch to a port for a specific itemtype, but I don know how to set the condition using getitemtype(object) <----what's the object of a task?? (actually i'm new in setting the task sequence), can anyone give me a hand, thanks. Regards, Kelvin |
#2
|
|||
|
|||
Hello Kelvin,
On the PassTo requirement of the dispatcher you could write: treenode item = gettaskinvolved( gettasksequence( current, 1 ), 2, 1 ); int tasktype = getitemtype( item ); return tasktype; I have attached a model with a queue that collects boxes (type1) and loaded pallets (type2). The dispathcer is connected to a person and a transporter. The person carries the boxes and the transporter transports the loaded pallets. Hope this helps you solve your problem. Also take a look at the"Querying Information on Task Sequences" part of the help file. Esther |
The Following 6 Users Say Thank You to Esther Bennett For This Useful Post: | ||
Tom David (10-21-2009) |
#3
|
|||
|
|||
Hi Esther,
It seems I know how your demo model works but when I apply to my model it doesn work. in the dispatcher "Pass To" i type: if ( getitemtype( gettaskinvolved( gettasksequence(current,1),2,1)) == 2) { return 1; } else { .....other dispatch method } but it seems even the item is hving itemtype 2, now still using other dispatch method (i.e. not outport 1 operator deals with the task) so, is it my problem in: 1. My dispatcher task source is not from 1 object only (in the demo only Queue 3) 2. The flowitem handled is a pallet(container) with itemtype2 and boxes with itemtype1 is in the pallet? 3.The task to be dispatched is a utilize task not load/unload task Regards, Kelvin |
#4
|
|||
|
|||
After reading help is it the problem is in "3.The task to be dispatched is a utilize task not load/unload task"
For a utilize task sequence the task list is travel -> utilize If I refer to the 2nd task of the tasksequence I cant get the flowitem's itemtype, rite?? Regards, Kelvin |
Thread | Thread Starter | Forum | Replies | Last Post |
Collect the total flow time of two itemtype and many replications | Vic Li | Q&A | 5 | 11-04-2010 10:55 AM |
how to get number of itemtype | Vic Li | Q&A | 11 | 08-19-2009 11:20 PM |
Flowitem placement in Rack? | shivrash | Q&A | 3 | 07-28-2009 12:28 AM |
How to unload all the same itemtype flowitem into the matching queue altogether? | karl huang | Q&A | 12 | 02-21-2009 12:45 AM |
Customizing Flowitem Attributes - a quest for the flowitem with the fewest attributes | Cliff King | Tips and Tricks | 0 | 11-22-2007 12:22 PM |