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
|
|||
|
|||
how to find the distance when using coordinate ts ex 2
hy all
I got stuck in finding out the distance for 2 operators when coordinated by "coordinate ts ex 2" but when connected by center port it is working. Is there any solution to solve the stated problem. if yes please post the logic/model. i attached a model of it please look at. thank you !!!!!!!! |
#2
|
|||
|
|||
i think i stated the above problem in wrong way
Actually i am trying to find out the distance traveled by flowitems by using 2 operators from 1 end to the other end as in above posted model. I have used "coordinate task sequence ex 2" for simultaneous movement of operators to carry load. but by using C TS ex 2 it is always showing errors. can someone help me out. thank you |
#3
|
|||
|
|||
hy all
can someone help me to find the distance traveled by flow items when 2 operators are connected by "coordinate task sequence ex 2". i am unable to get it exactly, always it shows errors in system console. I read few threads regarding this issue but they are connected by "center port object" model is posted in above post. please can someone give me a solution for it. thank you |
#4
|
||||
|
||||
Hi,
please use the trigger OnLoad in an involved taskexecuter to get the distancetotravel of him by current and the destination object. I am sorry, you are right. But please take a look into the tree of your operator's variables. There you will see, that there isn't a standard tasksequence which contains the destination at the fourth task first variable at all. Instead you find an allocate tasktype wherein you get an reference to the node to the coordinated tasksequence. In that coordinated tasksequnce you can find the destination again. You have to adjust your source code to use this task in the coordinated tasksequence. Then you get the distance to the destination again. Jörg Last edited by Jörg Vogel; 06-28-2015 at 06:04 AM. |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
sravan kumar (06-28-2015) |
#6
|
||||
|
||||
Hi,
how far did you get it work? What exactly have you tried? The reference is directed in the allocate task to a task of the coordinated tasksequence, it isn't directed to the tasksequence itself. The Tasksequence node lays a level up. If you don't query the destination of the coordinated tasksequence dynamicaly, you can set the destination reference by something else. For example you send a message to one of the involved Taskexecuter. One message parameter is the reference of the destination. You store the destination in a label. And OnLoad you get access to this label to query the distance to travel. Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
sravan kumar (06-30-2015) |
#7
|
|||
|
|||
hy
As said in previous post, yes there is no standard tasksequence for 4th tasktask 1st variable. i am unable to set reference to the node for the coordinate tsksequence in allocate tasktype. i have been trying to understand the solution given by you but i am unable to get it and checked it by programming in the existing program by allocate tasktype but again it is showing errors. i could not make it up. please post the logic behind it. it will be helpful for me to understand clearly, about the distance traveled by flowitems. thank you. |
#8
|
|||
|
|||
HI sravan
I followed the Jorg's suggestion and maked the following model.Maybe it is what you wanted. |
The Following 3 Users Say Thank You to oliver xie For This Useful Post: | ||
sravan kumar (07-03-2015) |
#9
|
||||
|
||||
Many thanks Olivier,
I have learned something new. It is a good method to read to the end in the command reference. The function gettaskvariable evaluates the currently active task taskvariable even in a coordinated tasksequence. Jörg |
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post: | ||
sravan kumar (07-03-2015) |
#10
|
|||
|
|||
hy all
Finally i have showed the distance, my thanks to oliver xie and jorg. Does the same logic will work for custom code as shown below. credits to joao marques who made this logic. This logic works for simultaneous movement of "trolley and operator" along the network node from queue(start point) to destination and after unloading returns to its start point where operator will handle the trolley. I posted the model for reference where the logic is in trigger tab of queue(start point) /**Custom Code*/ /*This entrytrigger is located in Queue1>Triggers>On Entry*/ /*PS: Trolley was created as an Operator*/ treenode item = parnode(1); treenode current = ownerobject(c); treenode station = parnode(2); treenode queue=current; treenode dispatcher = centerobject(current,1); treenode trolley = outobject(dispatcher,1); treenode operator = rank(trolley,1); treenode destination = outobject(current, 1); int port = parval(2); if(content(current)>=10){ treenode ts = createcoordinatedtasksequence(trolley); int trkey = insertallocatetask(ts,trolley,0,0); int opkey = insertallocatetask(ts,operator,0,0); int travelqueue = insertproxytask(ts,trkey,TASKTYPE_TRAVEL,queue,NUL L); int getobj; int dropobj; insertsynctask(ts,travelqueue); for(int i=10;i>=1;i--){ getobj = insertproxytask(ts,opkey,TASKTYPE_FRLOAD,rank(queu e,i),queue); dropobj = insertproxytask(ts,opkey,TASKTYPE_FRUNLOAD,rank(qu eue,i),trolley); insertsynctask(ts,getobj); insertsynctask(ts,dropobj); } int traveldest = insertproxytask(ts,trkey,TASKTYPE_TRAVEL,destinati on,NULL); insertsynctask(ts,traveldest); for(int j=10;j>=1;j--){ getobj = insertproxytask(ts,opkey,TASKTYPE_FRLOAD,rank(queu e,j),trolley); dropobj = insertproxytask(ts,opkey,TASKTYPE_FRUNLOAD,rank(qu eue,j),destination); insertsynctask(ts,getobj); insertsynctask(ts,dropobj); } int travelfinish = insertproxytask(ts,trkey,TASKTYPE_TRAVELTOLOC,NULL ,NULL,3,3,0); insertsynctask(ts,travelfinish); insertdeallocatetask(ts,opkey); insertdeallocatetask(ts,trkey); dispatchcoordinatedtasksequence(ts); } is there any change in the logic to obtain the distance. if yes please post the logic behind it. can someone help me to solve this issue. thank you |
#11
|
|||
|
|||
Hi sravan
I have gave the method in the last posted model, maybe you should pay more time. |
The Following 2 Users Say Thank You to oliver xie For This Useful Post: | ||
sravan kumar (07-04-2015) |
Thread | Thread Starter | Forum | Replies | Last Post |
coordinate task sequence example 2 | sravan kumar | Flexsim Student Forum | 2 | 04-15-2015 06:28 AM |
Question about coordinate system in Flexsim. | Robert Liu | Q&A | 3 | 07-15-2011 08:10 PM |
Where can I find or get the information about the travel distance of each yard truck? | syseo | Container Terminal (CT) Library | 0 | 02-12-2011 12:24 AM |
coordinate axis | juan alberto | Q&A | 1 | 11-24-2009 03:03 AM |
Keeps a distance | Li Chin | Q&A | 3 | 12-18-2008 02:09 AM |