question

Leonie E avatar image
0 Likes"
Leonie E asked Leonie E commented

Adjust maximum speed

Hello,
I am new to FlexSim and my question is about adjust the maximus speed of an TaskExecuter (eg. AGV).
Like other users before I have the problem of having diffrent "speed areas" in my system for the used agvs. The answer for most of these question is that you can adjust the maximum speed, so that the next task will be executed with this new speed.

I am wondering how to do that. If I create Custom Tasks in the ProcessFlow with new end speed. It won't change the speed in the next task.

FlexSim 19.0.2
agvspeed
· 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.

Jeff Nordgren avatar image Jeff Nordgren commented ·

@Leonie E,

If you could attach your model or a sample model of the problem area we would be better able to answer your question specifically to your model. But to answer your question, you would have to put the following code into the right place within your model.

setvarnum(Model.find("TransporterName"), "maxspeed",NewSpeed);

You would replace "TransporterName" with the name of the Transporter and replace NewSpeed with the value of the new maximum speed.

If you don't know where to put the code, we would need to see your model to help your further.

Thanks.

0 Likes 0 ·
Leonie E avatar image Leonie E commented ·

szenario1-pick-up.fsmThank you very much @Jeff Nordgren. I have managed to change the speed with your hint. I think my code is not perfect and there are ways to make it easier and nicer but for now, it works fine.

Is it possible to change the "Model.finde("TransporterName") - Part with a connected token, so that the change of a speed will happen with any TaskExecuter which has to fulfill the task next?

Here is a example szenario, I adjusted the speed for the loading part. The next step is to adjust the speed as well for the dropOff. As well I have planed having more Destinations and more TaskExecuters travelling around.

0 Likes 0 ·

1 Answer

Ralf Gruber avatar image
0 Likes"
Ralf Gruber answered Leonie E commented

@Leonie E,

the token already carries the reference to the TaskExecuter it chose from the group in your acquire activity: You set the label "Operator" to keep it. To refer to the selected TaskExecuter you just have to look at that token's label:

setvarnum(token.Operator, "maxspeed",0.05);

Is that, what you asked for?

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

Leonie E avatar image Leonie E commented ·

Yes, I figured out as well. It Woks fine. Thank you very much.

0 Likes 0 ·