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 06-27-2015
sravan kumar
Guest
 
Posts: n/a
Downloads: 9
Uploads: 0
Post 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 !!!!!!!!
Attached Files
File Type: fsm distance.fsm (33.8 KB, 397 views)
  #2  
Old 06-27-2015
sravan kumar
Guest
 
Posts: n/a
Downloads: 9
Uploads: 0
Post

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  
Old 06-28-2015
sravan kumar
Guest
 
Posts: n/a
Downloads: 9
Uploads: 0
Post

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  
Old 06-28-2015
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,
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)
  #5  
Old 06-28-2015
sravan kumar
Guest
 
Posts: n/a
Downloads: 9
Uploads: 0
Post

Hi

I tried to use the suggestions given by you but i couldn't get the result. Would you please post the logic/source code behind it.

Thank you
  #6  
Old 06-28-2015
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,
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  
Old 07-02-2015
sravan kumar
Guest
 
Posts: n/a
Downloads: 9
Uploads: 0
Unhappy

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  
Old 07-02-2015
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default

HI sravan
I followed the Jorg's suggestion and maked the following model.Maybe it is what you wanted.
Attached Files
File Type: fsm distance_ox.fsm (34.1 KB, 416 views)
The Following 3 Users Say Thank You to oliver xie For This Useful Post:
sravan kumar (07-03-2015)
  #9  
Old 07-02-2015
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

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  
Old 07-03-2015
sravan kumar
Guest
 
Posts: n/a
Downloads: 9
Uploads: 0
Post

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
Attached Files
File Type: fsm distance trolley.fsm (223.9 KB, 373 views)
  #11  
Old 07-03-2015
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default

Hi sravan
I have gave the method in the last posted model, maybe you should pay more time.
Attached Files
File Type: fsm distance trolley_ox.fsm (224.0 KB, 384 views)
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


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.