question

立洲 avatar image
0 Likes"
立洲 asked 立洲 commented

How to set the original battery capacity of AGV

我想知道如何設置AGV的原始電池容量不是從100%,而是自定義AGV電池容量,或者以隨機方式。

希望能提供一個好的建議,有一個簡單的模型

FlexSim 20.0.10
agvagvbatterycapacityoriginal battery capacity
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered 立洲 commented

The method "batteryLevel" of the AGV class can both get and set the current charge level of an AGV.

The code in the script window of the attached model will set the charge level to a random value between 10 and 100%.

1650527291851.png

randomChargeExample.fsm


· 5
5 |100000

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

立洲 avatar image 立洲 commented ·

非常感謝,除了使用均勻統計分佈外,是否可以替換?

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann 立洲 commented ·

The uniform distribution was only chosen as an example.

You can assign any numerial value you want. The battery level will automatically limit it to fall into the range from 0 to 100. So yes, you can of course use a different distribution, a fixed value or read the number from some other place in the model (for example a global table or label)
0 Likes 0 ·
立洲 avatar image 立洲 Felix Möhlmann commented ·

謝謝你的幫助,我學到了一些新東西

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ 立洲 commented ·

Just for completeness of the answer the "Capacity" is set in the AGV Network Properties by AGV type. The above answer is talking about the intial percentage of that capacity.


1650554057309.png


0 Likes 0 ·
1650554057309.png (3.0 KiB)
立洲 avatar image 立洲 Jason Lightfoot ♦♦ commented ·

謝謝你的補充,這部分我已經完全看懂了

0 Likes 0 ·