datafev.algorithms.vehicle package

Submodules

datafev.algorithms.vehicle.routing_milp module

src.datafev.algorithms.vehicle.routing_milp.smart_routing(solver, opt_horizon, opt_step, ecap, v2gall, tarsoc, minsoc, maxsoc, crtsoc, crttime, arrtime, deptime, arrsoc, p_ch, p_ds, g2v_dps, v2g_dps)[source]
This function optimizes:
  • the allocation of an incoming EV to a cluster,

  • and the charging schedule in the given parking duration considering cluster differentiated dynamic price signals.

Parameters:
  • opt_step (float) – Size of one time step in the optimization (seconds).

  • opt_horizon (list of integers) – Time step identifiers in the optimization horizon.

  • ecap (float) – Energy capacity of battery (kWs).

  • v2gall (float) – V2G allowance discharge (kWs).

  • tarsoc (float) – Target final soc (0<inisoc<1).

  • minsoc (float) – Minimum soc.

  • maxsoc (float) – Maximum soc.

  • crtsoc (float) – Target soc at crttime.

  • crttime (int) – Critical time s.t. s(srttime)> crtsoc.

  • arrtime (dict of int) – Cluster differentiating arrival times.

  • deptime (dict of int) – Cluster differentiating departure times.

  • arrsoc (dict of float) – Cluster differentiating arrival soc in [0,1).

  • p_ch (dict of float) – Nominal charging power (kW).

  • p_ds (dict of float) – Nominal charging power (kW).

  • g2v_dps (dict of dict) – G2V dynamic price signals of clusters (Eur/kWh).

  • v2g_dps (dict of dict) – V2G dynamic price signals of clusters (Eur/kWh).

Returns:

  • p_schedule (dict) – Power schedule. Each item in the EV dictionary indicates the power to be supplied to the EV(kW) during a particular time step.

  • s_schedule (dict) – SOC schedule. Each item in the EV dictionary indicates the SOC to be achieved by the EV by a particular time step.

  • target_cc (string) – Cluster to send the EV.

datafev.algorithms.vehicle.scheduling_lp module

src.datafev.algorithms.vehicle.scheduling_lp.minimize_cost(solver, opt_step, opt_horizon, ecap, tarsoc, minsoc, maxsoc, crtsoc, crttime, inisoc, p_ch, p_ds, dps)[source]

This function optimizes the charging schedule of a single EV with the objective of charging cost minimization for the given price signal. The losses in power transfer are neglected.

Parameters:
  • opt_step (float) – Size of one time step in the optimization (seconds).

  • opt_horizon (list of integers) – Time step identifiers in the optimization horizon.

  • ecap (float) – Energy capacity of battery (kWs).

  • v2gall (float) – V2G allowance discharge (kWs).

  • tarsoc (float) – Target final soc (0<inisoc<1). minsoc : float Minimum soc.

  • maxsoc (float) – Maximum soc.

  • crtsoc (float) – Target soc at crttime.

  • crttime (int) – Critical time s.t. s(srttime) > crtsoc.

  • inisoc (dict of float) – Initial soc in [0,1).

  • p_ch (dict of float) – Nominal charging power (kW).

  • p_ds (dict of float) – Nominal charging power (kW).

  • dps (dict of float) – Dynamic price signal (Eur/kWh).

Returns:

  • p_schedule (dict) – Power schedule. Each item in the EV dictionary indicates the power to be supplied to the EV(kW) during a particular time step.

  • s_schedule (dict) – SOC schedule. Each item in the EV dictionary indicates the SOC to be achieved by the EV by a particular time step.

datafev.algorithms.vehicle.scheduling_milp module

src.datafev.algorithms.vehicle.scheduling_milp.minimize_cost(solver, opt_step, opt_horizon, ecap, v2gall, tarsoc, minsoc, maxsoc, crtsoc, crttime, inisoc, p_ch, p_ds, g2v_dps, v2g_dps)[source]

This function optimizes the charging schedule of a single EV with the objective of charging cost minimization for the given G2V and V2G price signals. The losses in power transfer are considered.

Parameters:
  • opt_step (float) – Size of one time step in the optimization (seconds).

  • opt_horizon (list of integers) – Time step identifiers in the optimization horizon.

  • ecap (float) – Energy capacity of battery (kWs).

  • v2gall (float) – V2G allowance discharge (kWs).

  • tarsoc (float) – Target final soc (0<inisoc<1). minsoc : float Minimum soc.

  • maxsoc (float) – Maximum soc.

  • crtsoc (float) – Target soc at crttime.

  • crttime (int) – Critical time s.t. s(srttime)> crtsoc.

  • inisoc (dict of float) – Initial soc in [0,1).

  • p_ch (dict of float) – Nominal charging power (kW).

  • p_ds (dict of float) – Nominal charging power (kW).

  • g2v_dps (dict of float) – G2V dynamic price signal (Eur/kWh).

  • v2g_dps (dict of float) – V2G dynamic price signal (Eur/kWh).

Returns:

  • p_schedule (dict) – Power schedule. Each item in the EV dictionary indicates the power to be supplied to the EV(kW) during a particular time step.

  • s_schedule (dict) – SOC schedule. Each item in the EV dictionary indicates the SOC to be achieved by the EV by a particular time step.