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 05-22-2012
shafizad shafizad is offline
ProcSim Consulting
 
Join Date: Jul 2010
Location: Switzerland
Posts: 75
Downloads: 18
Uploads: 0
Thanks: 90
Thanked 2 Times in 2 Posts
Rep Power: 126
shafizad is on a distinguished road
Default Travel Offset Distance

Hello,
I would like to calculate the total OFFSET distance traveled by my BasicTE? any suggestions are welcome.

Well, what do you think about this?
I see commands such as placeoffsetx and pickoffsetx. Should I use them right before TASKTYPE_PLACEOFFSET and TASKTYPE_PICKOFFSET in my commands and increment a label on my BasicTE.
  #2  
Old 05-23-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

You could extract the state data and calculate the time which is used for offset travel tasks and set it in relation to the total traveling distance.

It's not 100% precise, because it assumes a constant travelling speed - which is not correct, because a TE uses linear acceleration after un-/loading.

Code:
treenode current = ownerobject(c);
// Offset travel part of total time
double offset_1 = getnodenum(node("MAIN:/project/model/Operator9>stats/state/state_profile/offset_travel_empty")); 
double offset_2 = getnodenum(node("MAIN:/project/model/Operator9>stats/state/state_profile/offset_travel_loaded"));
double distance = getvarnum(current,"totaltraveldist"); // Gets the total travelled distance
double percentage = (offset_1 + offset_2) / time(); // Calculates the ratio of offset travel tasks to totaltime
double offsetway = percentage * distance;
  #3  
Old 05-23-2012
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

If you look at your statistics tabpage you can find the totaltraveldistance of a taskexecuter. This number is stored on a variable "totaltraveldist". So this can be queried with: getvarnum( current, "totaltraveldist");
If you only want the offset travel I assume you have a network. If you have you can keep track or calculate the distances over the network and subtract those from the totaltraveldistance, the remainder is the offset travel.

Tags
basicte, offset, pickoffest, placeoffset, travel distance


Thread Thread Starter Forum Replies Last Post
Flowitem offset in Conveyor Manoj Kumar Q&A 2 03-14-2012 04:37 AM
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
Keeps a distance Li Chin Q&A 3 12-18-2008 02:09 AM
Setting the side offset for all nodes in the model Brandon Peterson Tips and Tricks 0 04-28-2008 11:15 AM
Offset Travel AlanZhang Q&A 16 04-18-2008 10:25 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.