Page 1 of 1

Actual distance an advancd transporter passed

Posted: Wednesday 11 August, 2021 - 11:28
by MariaD
Hello,

What is the best way to write into a file an actual distance an advanced transporter has traveled (separately for being empty and carrying a product) for each product? (given the complex network and dynamic planning of pick-up point and drop-down point).

Thank you,
M.

Re: Actual distance an advancd transporter passed

Posted: Tuesday 24 August, 2021 - 13:43
by HarryBunnik
Hello M.,

The distance traveled, you can find on the Attribute "DistanceTraveled", which is defined on the Advanced Transporter.

I would create a table and store in this table for each product that is entering "Trigger on entry":
  • Product ID
  • Time that the product entered.
  • Travel distance empty. This is the distance traveled since the last drop off, or the start of the simulation in case it's the first product.
  • Complete distance traveled that the Advanced Transporter has when the product is entering.
On the "Trigger on exit" of the Advanced Transporter you can then deduct the current "DistanceTraveled" with the value in the cell, and you have the distance traveled full.
  • Also here, store the current traveled distance in the table already on the next row. This value, you'll need for the next product to calculate the distance travelled empty.
I hope this helps you in settings this up. If something is not clear, please let me know!

Greetings,

Harry

Re: Actual distance an advancd transporter passed

Posted: Monday 30 August, 2021 - 14:23
by MariaD
Hello Harry,

Thank you for your help. Can you provide a simple model with a code example, please?

Best regards,
M.

Re: Actual distance an advancd transporter passed

Posted: Friday 03 September, 2021 - 18:55
by HarryBunnik
Hello M.,

I'm sorry that it took me so long to react to your post, but I didn't get the normal warning that someone posted something, so I ran more or less accidentally into your question.

I've created a small example model with:
  • A table called TransportDistance.
  • A Initialize to arrange some administration on reset.
  • Code on the Advanced transporter OnEntry and OnExit trigger.I added some comments here to explain what I'm doing.
I hope this helps you further!

Regards,

Harry