VeraGridEngine.Simulations.CatalogueOptimization.Problems package

Submodules

VeraGridEngine.Simulations.CatalogueOptimization.Problems.catalogue_problem module

class VeraGridEngine.Simulations.CatalogueOptimization.Problems.catalogue_problem.CatalogueOptimizationProblem(grid: MultiCircuit, pf_options: PowerFlowOptions, selected_branches: List[Line | Transformer2W], voltage_tolerance: float = 0.1)[source]

Bases: BlackBoxProblemTemplate

Multi-objective black-box problem that selects, for each user-pre-selected branch, a template from the grid’s catalogue so as to minimise the six techno-economic scores (losses, overload, voltage module, voltage angle, financial, technical).

The decision vector x is integer-valued: x[i] is the index of the chosen template within the pool associated with branch branches[i].

get_objectives_names() ndarray[tuple[Any, ...], dtype[str_]][source]

Get the human-readable names for the elements of f.

Returns:

array of objective names matching the order of objective_function’s output.

get_vars_names() ndarray[tuple[Any, ...], dtype[str_]][source]

Get the human-readable names for the elements of x.

Returns:

array of branch names; one entry per decision slot.

n_objectives() int[source]

Number of objectives in f.

Returns:

6 (losses, overload, voltage module, voltage angle, financial, technical).

n_vars() int[source]

Number of decision variables in x.

Returns:

number of optimisable branch slots.

objective_function(x: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[Any, ...], dtype[int64]]) ndarray[tuple[Any, ...], dtype[float64]][source]

Evaluate the objective function f(x).

Strategy:
  1. Apply the chosen templates to every branch and compute the financial cost.

  2. Run a power flow on the modified grid and compute the four technical scores.

  3. Restore every branch to its baseline state, regardless of whether the PF succeeded.

  4. Return the six-objective vector.

Parameters:

x – integer decision vector with x[i] indexing the template within pools[i].

Returns:

array of six objective values.

Module contents