question

JP117 avatar image
0 Likes"
JP117 asked Jason Lightfoot commented

Changing Travel Speed While Traveling Astar

Trying to set the speed of an object, copied this code I found but it doesn't seem to work any suggestions

1703191693374.png

FlexSim 23.2.1
astartraveler
1703191693374.png (75.4 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 ·

Hi @JP117, was Jason Lightfoot'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 comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

Have you debugged this? Is token.Agent pointing to the task executer or to an Agent class? If it's pointing to the Agent then you'll probably need to refer to token.Agent.object to set the speed and do the preemption. If you post the model we can tell you for sure.

· 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.

JP117 avatar image JP117 commented ·

I was able to get it with help from your response thanks1703260197520.png

0 Likes 0 ·
1703260197520.png (30.0 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ JP117 commented ·

Use the setProperty command to avoid that mistake - well spotted.

0 Likes 0 ·