optivgi.scm.pulp_numerical_algorithm

Provides an SCM algorithm implementation using the PuLP linear programming library.

This algorithm formulates the charging schedule optimization as a linear program and uses a solver (like CBC, GLPK, CPLEX, etc.) interfaced through PuLP to find an optimal solution based on the defined objective and constraints.

class optivgi.scm.pulp_numerical_algorithm.PulpNumericalAlgorithm(evs, peak_power_demand, now)

Bases: Algorithm

SCM Algorithm using PuLP for Linear Programming Optimization.

This algorithm aims to maximize the percentage of requested energy delivered across all EVs, while respecting individual EV power limits, arrival/departure times, and aggregate peak power constraints for the group. It also includes terms to encourage utilizing available peak power and minimizing power fluctuations.

Parameters:
calculate()

Formulates and solves the charging optimization problem using PuLP.

Steps:

  1. Create an LpProblem instance.

  2. Define decision variables (ev_vars, ev_vars_diff, percentage).

  3. Define the objective function: Maximize percentage, scaled, plus a term for peak power utilization, minus a penalty for power fluctuations.

  4. Define constraints (power difference, energy targets, power limits, aggregate demand).

  5. Solve the linear programming problem using the configured solver (default CBC).

  6. Extract the results (optimal power values) and store them in each EV’s power list.

  7. Log summary information.

Return type:

None