question

hermione12 avatar image
0 Likes"
hermione12 asked Andrew O commented

Code for loaded & unloaded speed change

Hi

In my model there 20 transporters connected to a dispatcher. I have written a custom code for the dispatcher with Tasksequence to travel load and unload.( I have not used process flow elements instead just source , custom code and sink).

I want to change the loaded and unloaded speed of all the transporters connected to dispatcher through code.

How to write a generalized code to change max speed of transporters on load and unload?

FlexSim 20.0.10
transporter
· 2
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Jason Lightfoot commented

The maximum speed is controlled by the respective subnode of the variables node in the transporters attribute tree.

1673422377589.png

You can change its value with the setVariable method (or by acessing the node through the ".find()" method). Note that this will only affect future travel tasks, not tasks that have already started.

In newer versions of FlexSim, the maximum speed is accessible as a property through the respective ".setProperty" method.


1673422377589.png (12.3 KiB)
· 1
5 |100000

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