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.

Joerg Vogel avatar image Joerg Vogel commented ·

@hermione12 , because of FlexSim‘s policy on academic integrity we are not allowed to provide a generalized code. We can develop together code if you share with us your code and ask specific questions on for example when you must set a variable or attribute property to get evaluated to change speed in a taskexecuter. We can give you hints how you can change an executing Tasksequence, though this sequence was dispatched some time ago. You must describe source code and program structure if you write a thesis or a documentation, then you must know what the code does and why.

0 Likes 0 ·
Andrew O avatar image Andrew O commented ·

Hi @hermione12, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Also note that if you're using the AGV navigator then you specify the loaded and unloaded speed in the AGV System Properties GUI.

0 Likes 0 ·