question

ged0313 avatar image
0 Likes"
ged0313 asked Jeanette F edited

Charging Problem of AGV

Hello,

I've encounter some problem when building up the agv charge function. The logic is that when the agv is below certain battery level, it will go to the charging station.

In my model, there are two agvs and I set the charging level as 90 percent and 85 percent separately.

My problem is that:

Even though I set the wait for event activity to when the agv is charging to 100 percent. The car is not running properly. That, it will not stay at the charging station till it is charging to 100 percent. And the battery will increase while it's moving.

I'm wondering if there is a conflict between setting this up in general flow and the agv object flow. I am also wondering how to fix this. Thank you so much for any of your assistance!


my model: charge station.fsm


FlexSim 23.0.9
agvbattery charge
charge-station.fsm (105.1 KiB)
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

·
Jeanette F avatar image
0 Likes"
Jeanette F answered ged0313 commented

Hello @ged0313,

You would benefit from learning about task sequences (tutorial).

When you don't use a task sequence the task activities are just executed as they are sent. In the case of having two process flow sending tasks, you have tasks begin executed from both flows which is creating the odd behavior you described. To fix this, you will want to implement task sequences. I only created task sequences for your recharge logic and I encourage you to evaluate if your AGV logic would benefit from it.

1692160245748.png

I did notice an off phenomenon where two tokens are being created when the AGV reaches the specified battery level. I am sending this into our Dev team for them to take a look at why that might be happening. With setting a priority on your task sequence this is not an issue for you currently.

Please take care of all exceptions before posting a model unless the exception are related to your question. It makes it difficult for us to prove that our solution is working well for you while exceptions that are not related to the solution are occurring.

charge-station_2.fsm


1692160245748.png (21.5 KiB)
charge-station-2.fsm (107.7 KiB)
· 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.

ged0313 avatar image ged0313 commented ·

Thank you so much for your help! It is very useful! But as I run through the model you provided, there's an error of the custom code. Which does not exist in my initial model. The error is as below, I am wondering if I mistake the syntax here. Thank you so much for your help!

1692165425109.jpg

1692166957874.jpg

0 Likes 0 ·
1692165425109.jpg (134.1 KiB)
1692166957874.jpg (114.5 KiB)
Jeanette F avatar image Jeanette F ♦♦ ged0313 commented ·

What error? There is a circular Deadlock that you will need to sort through but I do not see an error with the custom code.

1692200783625.png

In your photo there is a breakpoint in your custom code that you can remove.

0 Likes 0 ·
1692200783625.png (7.1 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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