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.