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 07-11-2013
Patrick Frank Patrick Frank is offline
Flexsim User
 
Join Date: Jun 2013
Posts: 4
Downloads: 9
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 0
Patrick Frank is on a distinguished road
Default 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  
Old 07-11-2013
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

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  
Old 07-15-2013
Patrick Frank Patrick Frank is offline
Flexsim User
 
Join Date: Jun 2013
Posts: 4
Downloads: 9
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 0
Patrick Frank is on a distinguished road
Default

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  
Old 07-15-2013
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

Hello Frank,

Quote:
And why does if (gettaskinvolved(gettasksequence(traveler,0),0,1) == node("/Queue22",model()) ) not work?
, it does not work,
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())  )
In the manual you find the standard transportation tasksequence:
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)
  #5  
Old 07-15-2013
Patrick Frank Patrick Frank is offline
Flexsim User
 
Join Date: Jun 2013
Posts: 4
Downloads: 9
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 0
Patrick Frank is on a distinguished road
Default

Thank you very much for your help - You saved my day.


I read the manual, but something gone wrong in my mind :-)


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


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.