Search code examples
anylogicbattery

Adding battery management to anylogic model


I've a question, in my model I want to add battery information to the transporter fleet. Think about when the battery level is below 30% the AGV moves after finishing a task to the closest charging station and stays there until the battery level is above a certain level.

So I was thinking about adding a parameter with the batterylevel to the agent type of the transport fleet.

But I have no clue how to create battery management further.

Creating an event, which decrease the battery level every second based on the state of the AGV agent?

But this gives me 4 questions:

  1. How can you check the battery level after a transporter is released?
  2. How do you dynamically decrease the transporter fleet size based on the amount of charging AGVs.
  3. How do you let the AGV move to the closest charging station.
  4. Is there anywhere an example model for this problem?

Thanks.


Solution

  • Your answer is a bit philosophical for SOF (and multiple questions in one...) but here goes...

    1. Yes an event that runs every second inside an AGV is good, but it might make your model slow... Alternatively use the on transporter state change to save the start and end times of travel and then use that to calculate the travel time, or distance, and use that to deplete the battery.

    enter image description here

    1. You can check the battery level in the on release code for the transporter blocks

    enter image description here

    1. You need to have a variable inside transporters that set them to need charging. And then in the seize transporter logic you have a custom selection to not choose AGVs that need charging

    enter image description here

    1. When an AGV requires charging - that you identified in item 1, you create a new task that will only size that transporter and make it move to what ever location you calculated to be the closest charging station. You will control which transporter gets selected by this task using the custom seize action same as in item 2. This will be a separate flow chart where you create this logic to make transporters go for a charge.

    2. Could not find a specific one about charging bu as you know there are lots of other examples about AGV