Hi,
I listen to the agv battery level change event and when it decrease to an exact value (such as 50), it creates 2 tokens at the same time.
Why?Q1v2022.0.fsm
Hi,
I listen to the agv battery level change event and when it decrease to an exact value (such as 50), it creates 2 tokens at the same time.
Why?Q1v2022.0.fsm
Hi @Xu Chunqi, was Phil BoBo'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.
It isn't creating two tokens at the same time.
The first token is being created, which goes to the 创建任务序列 activity, which pre-empts the AGV from its current task to start a new travel task in the 行进 activity. In starting that task, it recalculates the AGV's battery level, which creates the second token.
If you add a Delay activity with a value > 0 after the Wait for Event activity, then it will behave the way you want so that the current time can progress enough for the battery level to change before creating the new task that will involve recalculating the battery level.
Phil's answer is going to be easier, but I had already typed up some other options when he posted his answer, so I figured I'd give some alternatives:
1. You can use a label on the AGV that keeps track of if the AGV has already been sent to a parking spot to be charged. So the default state (reset value) of the label is 0, and as soon as the Process Flow determines the AGV needs to recharge, the label gets set to 1. Then, in the Process Flow, you have a Decide activity right after the Source that sends any tokens to a Sink if that label is set to 1. And finally, when the AGV is finished recharging, you set the label back to a 0.
2. Or you can change the Process Flow to only check the battery level of the AGV after certain events. For example, if you look at the Advanced AGV Process Flow Template, you'll see that part of the decision to have an AGV park is based on if the current battery level is below the given battery recharge threshold:
AGV(current).batteryLevel < getprocessflowvar(processFlow, "BatteryRechargeThreshold")
This only occurs after an AGV has arrived at a Work Point and there is nothing else for it to do (and if there is a Parking Spot available). So you can do something similar, like only check if the AGV needs to park and recharge after it has unloaded an item (and if it is empty). And since the battery level can decrease when the AGV is idle, you might need to set up something in the Process Flow to check the battery level after the AGV has been idle for a certain amount of time.
15 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved