spice_ev.strategies.flex_window.FlexWindow.distribute_power

FlexWindow.distribute_power(vehicles, total_power, total_needed)

Charge vehicle batteries with available power according to LOAD_STRAT.

Supported values for LOAD_STRAT:

  • greedy (vehicles charge greedy one after the other)

  • needy (vehicles that need more energy get proportionally more)

  • balanced (all vehicles are allocated the same amount of power)

Parameters:
  • vehicles (list of Vehicle) – vehicles to dsitribute power to

  • total_power (numeric) – total available power

  • total_needed (numeric) – total power needed

Raises:

NotImplementedError – if LOAD_STRAT is not supported

Returns:

commands for charging stations

Return type:

dict