datafev.algorithms.cluster package

Submodules

datafev.algorithms.cluster.pricing_rule module

src.datafev.algorithms.cluster.pricing_rule.idp(schedule, upper_bound, lower_bound, tou_tariff, f_discount, f_markup)[source]

This is the python implementation of the individual dynamic pricing algorithm introduced in Gümrükcü, et al., “Decentralized Energy Management Concept for Urban Charging Hubs with Multiple V2G Aggregators,” in IEEE Transactions on Transportation Electrification, 2022, doi: 10.1109/TTE.2022.3208627.

This function compares the commitments with the desired power consumption range of the cluster to:
  • increase the charging price for time steps where the schedule exceeds the upper bound of the desired range,

  • and decrease the charging price for time steps where the schedule is below the lower bound of the desired range.

Parameters:
  • schedule (dict of float) – Aggregate schedule of the cluster. Dictionary values are the scheduled aggregate consumption of the cluster (kW) in particular time steps.

  • upper_bound (dict of float) – Upper bound of the desired consumption range. Dictionary values are the upper limits of net consumption (kW) in particular time steps.

  • lower_bound (dict of float) – Lower bound of the desired consumption range. Dictionary values are the lower limits of net consumption (kW) in particular time steps.

  • tou_tariff (dict of float) – Standard TOU tariff of the cluster operator. Dictionary values denote the normal charging price (Eur/kWh) in a particular time step in case the scheduled net consumption of the cluster is within desired range.

  • f_discount (float) – Discount factor to compensate each kW of deficit consumption (Eur/kW).

  • f_markup (float) – Markup factor to compensate each kW of excessive consumption (Eur/kW).

Returns:

omega – Dynamic price signal. Key: Time step identifier, Value: Charging price (Eur/kWh) for a particular time step.

Return type:

dict of float

datafev.algorithms.cluster.prioritization_llf module

src.datafev.algorithms.cluster.prioritization_llf.leastlaxityfirst(inisoc, tarsoc, bcap, efficiency, p_socdep, p_chmax, p_re, leadtime, upperlimit)[source]

This is a control algorithm that manages the real-time charging rates of the EV chargers in a cluster under given power limits. The control is based on the least-laxity-first rule prioritizing urgent demands.

Parameters:
  • inisoc (dict of float) – Initial SOCs of EV batteries (0<inisoc[key]<1).

  • tarsoc (dict of float) – Target SOCs of EVs (0<inisoc[key]<1).

  • bcap (dict of float) – Battery capactiy of EVs (kWs).

  • efficiency (dict of float) – Power conversion efficiencies of chargers.

  • p_socdep (dict of dict) – SOC dependency of power capability of EV batteries. Dictionary values are dictionaries for a single EV in the cluster. In the EV dictionaries a key indicates a particular SOC range. An SOC range is defined by lower (SOC_LB) and upper bound of the SOC range(SOC_UB). The power that the EV battery can accept (kW) in a particular SOC range is indicated by the value of ‘P_UB’.

  • p_chmax (dict of float) – Maximum charge power capabilities of EVs (kW).

  • p_re (dict of float) – Power requested by EVs (kW).

  • leadtime (dict of int) – How long EVs are expected to stay connected (seconds).

  • upperlimit (dict of float) – Upper limit of cluster power consumption (kW).

Returns:

p_charge – Dictionary containing the charge power (kW) to each EV connected in the cluster.

Return type:

dict of float

datafev.algorithms.cluster.rescheduling_milp module

src.datafev.algorithms.cluster.rescheduling_milp.reschedule(solver, opt_step, opt_horizon, upperlimit, lowerlimit, tolerance, bcap, inisoc, tarsoc, minsoc, maxsoc, ch_eff, ds_eff, pmax_pos, pmax_neg, deptime, rho_y, rho_eps)[source]
This function reschedules the charging operations of a cluster by considering:
  • upper-lower limits of aggregate power consumption of the cluster,

  • and pre-defined reference schedules of the individual EVs in the system.

This is run typically when some events require deviations from previously determined schedules.

Parameters:
  • solver (pyomo SolverFactory object) – Optimization solver.

  • opt_step (int) – Size of one time step in the optimization (seconds).

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

  • upperlimit (dict of float) – Soft upper limit of cluster power consumption (kW).

  • lowerlimit (dict of float) – Soft lower limit of cluster power consumption (kW).

  • tolerance (float) – Maximum allowed violation of upper-lower limits (kW).

  • bcap (dict of float) – Battery capactiy of EVs (kWs).

  • inisoc (dict of float) – Initial SOCs of EV batteries (0<inisoc[key]<1).

  • tarsoc (dict of float) – Target SOCs of EVs (0<inisoc[key]<1).

  • minsoc (dict of float) – Minimum allowed SOCs.

  • maxsoc (dict of float) – Maximum allowed SOCs.

  • ch_eff (dict of float) – Charging efficiency of chargers.

  • ds_eff (dict of float) – Discharging efficiency of chargers.

  • pmax_pos (dict of float) – Maximum charge power that EV battery can withdraw (kW).

  • pmax_neg (dict of float) – Maximum discharge power that EV battery can supply (kW).

  • deptime (dict of int) – Number of time steps until departures of EVs.

  • rho_y (float) – Penalty factor for deviation of reference schedules (unitless).

  • rho_eps (float) – Penalty factor for violation of upper-lower soft limits (unitless).

Returns:

  • p_schedule (dict) – Power schedule. It contains a dictionary for each EV. 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. It contains a dictionary for each EV. Each item in the EV dictionary indicates the SOC to be achieved by the EV by a particular time step.