question

C avatar image
0 Likes"
C asked Felix Möhlmann commented

Questions about logging state changes, calculating energy consumption

Hi all,

There is a model I'm working on. I'm using the virtual distance feature for paths. There are AGVs (ships) loading crates from a "dock" and unloading them at another "dock". And I need to introduce an energy consumption and recharging calculation so that each AGV,


1) If they are in "Travel Loaded" state, they must spend some energy per unit of distance (e.g., 3000 units of energy stored onboard, consumes x units of energy per unit of distance (Please note that there will be four types of AGVs (ships) with different rates of energy consumption when this study finishes),

2) If they are in an "Idle" state and if their "Loc" labels are set to a particular "dock" (e.g., BOS, KSK, ALS or KSK1, and so on), they must gain energy at an adjustable rate. (e.g. y units of energy per second),

3) The energy values of each AGV must be logged and visualized.

Bonus step: Visualasing distances traveled (as they increase) and state changes of AGVs for each AGV in two seperate time plots with timestamps would be great.


I think I need to define variables about energy, but I don't know how to.

Sorry but I'm stuck. I feel stupid for not fixing this and ashamed of taking peoples' time.

Any help will be appreciated.


V3_Ships_are_sailing.fsm

FlexSim 19.0.0
agvvariablescalculationlogging
· 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.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Felix Möhlmann commented

If you were using AGV paths, you could use the built in battery system for this. But since they don't offer the same virtual distance property as network nodes (as far as I'm aware), they don't seem to be an option.

You can build your own system though. Define a kinetic tracked variable on each agv that serves as the battery level. Three more labels define the charge/discharge rate and the maximum charge the battery can hold, so these can be set differently for the different types.

In the attached model I use an instanced process to listen to the state changes of the agv and adjust the rate at which the tracked variable changes when it switches to "travel loaded" or "idle". A statistics collector listens to these activities and logs the current value whenever the rate changes (since the rate is linear, the graph only needs to know those data points).

The rate of a tracked variable is of course by time rather than distance but since the speed is going to be near constant due to the large distances the error seems negligible.

v3-ships-are-sailing_fm.fsm

The function is only added to F3 and F4 so far.


· 9
5 |100000

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