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 |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
|||
|
|||
Getting Information about destination of a TaskExecuter
Hello,
I'm trying to build a logic that is capable to decide whether or not to call an operator depending on the destination of a TaskExecuter when arriving a certain network node. I tried to build that logic into the OnArrival Trigger of the network node. I already tried to use the "gettenetworkinfo(obj taskexecuter, obj destobj, num info)" command with NETWORK_INFO_DEST_NET_NODE_RANK and NETWORK_INFO_CUR_TRAVEL_DEST_RANK as "num info" and comparing the result with an if-loop. Both versions did not work out. Is there any possibilty to get the destination (e.g. a Source or a Queue to load an item) of a TaskExecuter to make it comparable within the program code? The solution should work when the TaskExecuter is loaded with an item and when it's not. Thanks in advance Patrick Frank |
#2
|
||||
|
||||
hi,
if you want to know the loading status, you can test the content of the traveler. The destination of the traveler is in his current and active tasksequence. You query this node or pointer with: gettasksequence(traveler,0) // 0 is the active tasksequence. The destination is found in a standard tasksequence in the fourth and in the fifth task. The information is a pointer you can get with the command gettaskinvolved(pointer to the tasksequence, number task rank, number of the involved parameter). The number of involved parameter is for the 4th task 1, for the 5th task 2. Jörg |
#3
|
|||
|
|||
hi,
is it possible to compare to the result of the "gettaskinvolved" command within an if-loop ? e.g. if (gettaskinvolved(gettasksequence(traveler,0),0,1) == Source21) { do something } And why does if (gettaskinvolved(gettasksequence(traveler,0),0,1) == node("/Queue22",model()) ) not work? Patrick Last edited by Patrick Frank; 07-15-2013 at 03:04 AM. |
#4
|
||||
|
||||
Hello Frank,
Quote:
because you compare the 0nth task, which does not exists, and its first involved parameter. Please try: Code:
(gettaskinvolved(gettasksequence(traveler,0),4,1) == node("/Queue22",model()) ) Manual content >Task Sequences> Introduction > On the Page " Flexsim Task Sequences" >How Task Sequences Work Also you will find the standard tasksequence in the picklist options in Use Transport area of any discrete simulation object that stores or processes flowitems: >Task Sequence Example 1 See the cource code in the code editor. Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
Patrick Frank (07-15-2013) |
Thread | Thread Starter | Forum | Replies | Last Post |
How to transfer a flowitem from a taskexecuter-team to another taskexecuter-team? | Frans Zeng | Q&A | 12 | 05-20-2010 11:23 PM |
Task Exec - pick up object without destination? | JMEngelhart | Q&A | 2 | 05-03-2010 06:38 AM |
Information on rack options | muriana cinzia | Q&A | 6 | 04-29-2010 07:44 AM |
How to queue transporters at destination? | Shanon Loughton | Q&A | 1 | 03-31-2009 02:05 AM |
Stop message with information (Debugging) | Tom David | Tips and Tricks | 0 | 09-20-2007 01:10 AM |