question

sanaz karamimoghaddam avatar image
1 Like"
sanaz karamimoghaddam asked sanaz karamimoghaddam commented

How to input a fixed travel duration instead of having distance and speed?

In my model, Task Executers load flow items and unload them at the destination using a network of Nodes. I want to input the duration of each travel based on a label (durations from table).

FlexSim 16.2.0
task executernetwork nodestraveltravel duration
· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matt Long avatar image
3 Likes"
Matt Long answered sanaz karamimoghaddam commented

You can set the speed of your operator based upon the desired travel duration given the distance to the next location. In a trigger like the OnExit you can get the distance to the object using the distancetotravel() command. Then divide that by the desired duration. Then set the max speed variable of the operator. So the full thing would look like:

  1. double travelDist = distanceotravel(centerobject(current, 1), outobject(current, port));
  2. double duration = 10;
  3. setvarnum(centerobject(current, 1), "maxspeed", travelDist / duration);
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.