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 10-20-2009
KelvinHo KelvinHo is offline
Flexsim User
 
Join Date: Jan 2008
Location: Hong Kong
Posts: 129
Downloads: 18
Uploads: 1
Thanks: 44
Thanked 23 Times in 7 Posts
Rep Power: 171
KelvinHo will become famous soon enough
Default 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  
Old 10-21-2009
Esther Bennett Esther Bennett is offline
Flexsim User
 
Join Date: Mar 2008
Posts: 115
Downloads: 27
Uploads: 0
Thanks: 103
Thanked 116 Times in 50 Posts
Rep Power: 271
Esther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to all
Default

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
Attached Files
File Type: zip DispatchTaskByItemType.zip (68.5 KB, 224 views)
The Following 6 Users Say Thank You to Esther Bennett For This Useful Post:
Tom David (10-21-2009)
  #3  
Old 10-21-2009
KelvinHo KelvinHo is offline
Flexsim User
 
Join Date: Jan 2008
Location: Hong Kong
Posts: 129
Downloads: 18
Uploads: 1
Thanks: 44
Thanked 23 Times in 7 Posts
Rep Power: 171
KelvinHo will become famous soon enough
Default

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  
Old 10-21-2009
KelvinHo KelvinHo is offline
Flexsim User
 
Join Date: Jan 2008
Location: Hong Kong
Posts: 129
Downloads: 18
Uploads: 1
Thanks: 44
Thanked 23 Times in 7 Posts
Rep Power: 171
KelvinHo will become famous soon enough
Default

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
  #5  
Old 10-21-2009
KelvinHo KelvinHo is offline
Flexsim User
 
Join Date: Jan 2008
Location: Hong Kong
Posts: 129
Downloads: 18
Uploads: 1
Thanks: 44
Thanked 23 Times in 7 Posts
Rep Power: 171
KelvinHo will become famous soon enough
Default

Seems that problem solved by changing the if statement with:

if ( getitemtype( rank(gettaskinvolved( gettasksequence(current,1),2,1),1) == 2)


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


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.