eelib.core.control.hems.hems_ev_helper

Helper functions for handling of cars in EMS.

Author: elenia@TUBS
Copyright 2024 elenia
This file is part of eELib, which is free software under the terms of the GNU GPL Version 3.

Module Contents

Functions

ev_calc_e_bat(→ float)

Calculates the energy amount of electric car after power influence (from last step).

ev_set_energy_within_limit(→ float)

Check that battery energy limits are not surpassed.

ev_calc_power_limits(→ tuple[float, float])

Calculate the maximum (dis)charging power for the car battery.

ev_calc_power(→ float)

Calculate the power at the current timestep within the (dis)charging limits.

ev_calc_e_bat(step_size: int, ev_data: eelib.data.EVData) float

Calculates the energy amount of electric car after power influence (from last step).

Parameters:
  • step_size (int) – simulation step_size

  • ev_data (EVData) – contains all information of electric vehicles

Returns:

new energy level of electric vehicle (for next step)

Return type:

float

NOTE: This function was created based on the function step() in car_model

ev_set_energy_within_limit(ev_data: eelib.data.EVData) float

Check that battery energy limits are not surpassed.

Parameters:

ev_data (EVData) – contains all information of electric vehicles

Returns:

updated energy level of electric vehicle

Return type:

float

NOTE: This function was created based on the function set_energy_within_limit() in

car_model.

ev_calc_power_limits(step_size: int, ev_data: eelib.data.EVData) tuple[float, float]

Calculate the maximum (dis)charging power for the car battery. depending on the power limits and the current stored energy.

Parameters:
  • step_size (int) – simulation step_size

  • ev_data (EVData) – contains all information of electric vehicles

Returns:

minimum charging (resp. max. discharging) power of EV float: maximum (charging) power of EV

Return type:

float

NOTE: This function was created based on the function _calc_power_limits() in car_model.

ev_calc_power(step_size: int, consumption_step: float, p_set: float, ev_data: eelib.data.EVData) float

Calculate the power at the current timestep within the (dis)charging limits.

Parameters:
  • step_size (int) – simulation step_size

  • consumption_step (float) – consumption at the current timestep

  • p_set (float) – set value for charging power of car

  • ev_data (EVData) – contains all information of electric vehicles

Returns:

electric power of the vehicle

Return type:

float

Note

This function was created based on the function __calc_power() in car_model.