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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #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: 119
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.
Reply With Quote
  #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: 168
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;
Reply With Quote
  #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: 678
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.
Reply With Quote
Reply

Tags
basicte, offset, pickoffest, placeoffset, travel distance

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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. The time now is 12:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.