VeraGridEngine.Simulations.InvestmentsEvaluation.Methods packageο
Submodulesο
VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3 moduleο
- class VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3.BitflipMutation[source]ο
Bases:
Mutation
- class VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3.GridNsga(obj_func, n_var, n_obj, lb: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[Any, ...], dtype[int64]], ub: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[Any, ...], dtype[int64]])[source]ο
Bases:
ElementwiseProblemProblem formulation packaging to use the pymoo library
- class VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3.IntegerRandomSamplingVeraGrid[source]ο
Bases:
Sampling
- VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3.NSGA_3(obj_func, n_var: int, lb: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[Any, ...], dtype[int64]], ub: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[Any, ...], dtype[int64]], n_obj: int, n_partitions: int = 100, max_evals: int = 30, pop_size: int = 1, crossover_prob: float = 0.05, mutation_probability=0.5, eta: float = 3.0, initial_population: ndarray[tuple[Any, ...], dtype[int64]] | None = None, initial_objectives: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]] | None = None)[source]ο
NSGA3 designed for pareto investments :param obj_func: Objective function pointer [f(x)] :param n_partitions: Number of partitions :param n_var: Number of variables :param lb: Array of x lower boundaries :param ub: Array of x upper boundaries :param n_obj: Number of objectives :param max_evals: Maximum number of evaluations :param pop_size: Population size :param crossover_prob: Crossover probability :param mutation_probability: Mutation probability :param eta: eta parameter for the SBX crossover :param initial_population: Optional integer population used to seed the first NSGA3 generation. :type initial_population: IntMat | None :param initial_objectives: Optional objective vectors aligned with
initial_population. :type initial_objectives: Mat | None :return: X, f
- class VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3.QuadBinarySampling[source]ο
Bases:
Sampling
- class VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3.SkewedBinarySampling[source]ο
Bases:
Sampling
- class VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3.SkewedIntegerSamplingRange[source]ο
Bases:
SamplingSkewedIntegerSampling generates samples skewed toward the lower bounds but spread across the full lbβub range. Works for integer variables.
- class VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3.UniformBinarySampling[source]ο
Bases:
Sampling
- VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3.finalize_seed_population(seed_population: ndarray[tuple[Any, ...], dtype[int64]], seed_objectives: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]] | None, lb: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[Any, ...], dtype[int64]], ub: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[Any, ...], dtype[int64]]) tuple[ndarray[tuple[Any, ...], dtype[int64]], ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]] | None][source]ο
Clip, round and deduplicate a user-provided seed population.
- Parameters:
seed_population (IntMat) β Candidate initial population.
seed_objectives (Mat | None) β Optional objective matrix aligned with
seed_population.lb (Vec | IntVec) β Lower decision-vector bounds.
ub (Vec | IntVec) β Upper decision-vector bounds.
- Returns:
Clean seed population and aligned objective matrix.
- Return type:
tuple[IntMat, Mat | None]
- VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3.get_nsga3_initial_population(problem: ElementwiseProblem, pop_size: int, initial_population: ndarray[tuple[Any, ...], dtype[int64]], initial_objectives: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]] | None) Population[source]ο
Build an optional pymoo initial population from plain NumPy arrays.
- Parameters:
problem (ElementwiseProblem) β pymoo problem instance.
pop_size (int) β Requested NSGA3 population size.
initial_population (IntMat) β Seed decision vectors.
initial_objectives (Mat | None) β Optional objective vectors aligned with
initial_population.
- Returns:
pymoo population object with optional pre-evaluated individuals.
- Return type:
Population
VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.mixed_variable_NSGA_2 moduleο
- class VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.mixed_variable_NSGA_2.MixedVariableProblem(grid: MultiCircuit, obj_func, n_obj)[source]ο
Bases:
ElementwiseProblemProblem formulation packaging to use the pymoo library
- VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.mixed_variable_NSGA_2.NSGA_2(grid: MultiCircuit, obj_func, n_obj: int = 2, max_evals: int = 30, pop_size: int = 1)[source]ο
- Parameters:
obj_func
n_obj
max_evals
pop_size
# :param crossover_prob: # :param mutation_probability: # :param eta: :return:
VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.random_eval moduleο
- VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.random_eval.random_trial(obj_func, n_var: int, lb: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[Any, ...], dtype[int64]], ub: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[Any, ...], dtype[int64]], n_obj: int = 2, max_evals: int = 3000)[source]ο
- Parameters:
obj_func
n_var
n_obj
max_evals
- Returns:
VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.stop_crits moduleο
- class VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.stop_crits.MaxItersStopCriterion(iters)[source]ο
Bases:
StopCriterion
- class VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.stop_crits.StochStopCriterion(dist, p=0.95)[source]ο
Bases:
StopCriterion