eelib.core.devices.car.car_model

eELib car models the mobility and charging behavior of EV. The EV’s electricity demand is derived from profiles generated by the open-source tool emopby. The model calculates its soc in every step, based on the cars consumption and possible charging power derived from charging station.

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

Classes

EV

Models an electric vehicle and its change of soc depending on driving and charging.

Attributes

TOLERANCE_OVERCHARGED

TOLERANCE_OVERCHARGED
class EV(ename: str, start_time: str, file_emobpy: str, step_size: int = 60 * 15, n_steps: int = 1, soc_init: float = 0.5, set_emobpy_val: bool = True, soc_min: float = 0.02, e_max: int = 50000, p_nom_discharge_max: int = -11000, p_nom_charge_max: int = 11000, dcharge_efficiency: float = 0.95, charge_efficiency: float = 0.99)

Models an electric vehicle and its change of soc depending on driving and charging.

_VALID_PARAMETERS
classmethod get_valid_parameters()

Returns dictionary containing valid parameter types and values.

Returns:

valid parameters for this model

Return type:

dict

__set_emobpy_data(n_steps: int)

Collect data from the emobpy pickle file and save it into the model.

Parameters:

n_steps (int) – number of steps for the simulation

Raises:
  • IndexError – When the time window of the pickle file does not match the simulation window

  • ValueError – when the time resolutions of simulation and pickle file do not match

step(time)

Performs simulation step of eELib ev model.

Parameters:

time (int) – Current simulation time

__check_appearance()

Check whether the EV is currently connected to the charging point or not.

__calc_next_arrival()

Calculates when the EV is arriving (the index) for the next time.

__calc_appearance_duration()

Calculate the number of time steps that the EV is still going to be connected to the charging station from now on until the next trip.

__calc_power()

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

__set_energy_within_limit()

Check that battery energy limits are not surpassed.

__calc_power_limits()

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

__calc_bev_consumption_period()

Calculate the electr. consumption of the BEV while at home for the next trip.