VeraGridEngine.Simulations.InvestmentsEvaluation packageο
Subpackagesο
- VeraGridEngine.Simulations.InvestmentsEvaluation.Methods package
- Submodules
- VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.NSGA_3 module
- VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.mixed_variable_NSGA_2 module
- VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.random_eval module
- VeraGridEngine.Simulations.InvestmentsEvaluation.Methods.stop_crits module
- Module contents
- VeraGridEngine.Simulations.InvestmentsEvaluation.Problems package
- Submodules
- VeraGridEngine.Simulations.InvestmentsEvaluation.Problems.adequacy_problem module
- VeraGridEngine.Simulations.InvestmentsEvaluation.Problems.black_box_problem_template module
- VeraGridEngine.Simulations.InvestmentsEvaluation.Problems.power_flow_problem module
- VeraGridEngine.Simulations.InvestmentsEvaluation.Problems.power_flow_ts_problem module
- Module contents
Submodulesο
VeraGridEngine.Simulations.InvestmentsEvaluation.investments_evaluation_driver moduleο
- class VeraGridEngine.Simulations.InvestmentsEvaluation.investments_evaluation_driver.InvestmentsEvaluationDriver(grid: MultiCircuit, options: InvestmentsEvaluationOptions, problem: BlackBoxProblemTemplate, engine: EngineType = VeraGrid)[source]ο
Bases:
DriverTemplate- evaluate_individual_investments()[source]ο
Run a one-by-one investment evaluation without considering multiple evaluation groups at a time
- independent_evaluation() None[source]ο
Evaluate projects with a CBA-like reference/PINT/TOOT ranking and then build a cumulative portfolio.
- name = 'Investments evaluation'ο
- objective_function(x: ndarray[tuple[Any, ...], dtype[int64]], record_results: bool = True) ndarray[tuple[Any, ...], dtype[float64]][source]ο
Function to evaluate a combination of investments :param x: vector of investments (yes/no). Length = number of investment groups :param record_results: record the results or not :return: multi-objective function criteria values
- objective_function_so(x: ndarray[tuple[Any, ...], dtype[int64]]) float[source]ο
Single objective version of the objective function :param x: vector of investments (yes/no). Length = number of investment groups :return: summation of the objectives
- optimized_evaluation_mixed_nsga2() None[source]ο
Run an optimized investment evaluation on mixed variables with NSGA2
- optimized_evaluation_mvrsm_pareto() None[source]ο
Run an optimized investment evaluation without considering multiple evaluation groups at a time
- optimized_evaluation_pint_toot_nsga3() None[source]ο
Run an NSGA3 search warm-started with the direct PINT and TOOT evaluations.
- optionsο
- problem: BlackBoxProblemTemplateο
- tpe = 'Investments evaluation'ο
VeraGridEngine.Simulations.InvestmentsEvaluation.investments_evaluation_options moduleο
- class VeraGridEngine.Simulations.InvestmentsEvaluation.investments_evaluation_options.InvestmentsEvaluationOptions(max_eval: int, pf_options: PowerFlowOptions | None = None, opf_options: OptimalPowerFlowOptions | None = None, solver: InvestmentEvaluationMethod = NSGA3, obj_tpe: InvestmentsEvaluationObjectives = PowerFlow, plugin_fcn_ptr: Callable = None)[source]ο
Bases:
OptionsTemplateInvestments Evaluation Options
- CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes')ο
- CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {}ο
- CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:max_eval, prop:pf_options, prop:opf_options, prop:solver, prop:objf_tpe)ο
- CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:max_eval, prop:pf_options, prop:opf_options, prop:solver, prop:objf_tpe)ο
- CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'action': prop:action, 'code': prop:code, 'comment': prop:comment, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'max_eval': prop:max_eval, 'name': prop:name, 'objf_tpe': prop:objf_tpe, 'opf_options': prop:opf_options, 'pf_options': prop:pf_options, 'rdfid': prop:rdfid, 'solver': prop:solver}ο
- LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:max_eval, prop:pf_options, prop:opf_options, prop:solver, prop:objf_tpe)ο
- action: ActionTypeο
- comment: strο
- device_type: DeviceTypeο
- diff_changesο
- selected_to_mergeο
VeraGridEngine.Simulations.InvestmentsEvaluation.investments_evaluation_results moduleο
- class VeraGridEngine.Simulations.InvestmentsEvaluation.investments_evaluation_results.InvestmentsEvaluationResults(f_names: ndarray[tuple[Any, ...], dtype[str_]], x_names: ndarray[tuple[Any, ...], dtype[str_]], max_eval: int, plot_x_idx: int, plot_y_idx: int)[source]ο
Bases:
ResultsTemplate- CLASS_DATA_VARIABLES = {'f': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'f_best': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'f_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'max_eval': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'plot_x_idx': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'plot_y_idx': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'sorting_indices': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'x': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'x_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>}ο
- CLASS_RESULTS_DECLARATIONS = (<VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>)ο
- LOCAL_RESULTS_DECLARATIONS = (<VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>)ο
- add(x_vec: ndarray[tuple[Any, ...], dtype[float64]], f_vec: ndarray[tuple[Any, ...], dtype[float64]]) None[source]ο
- Parameters:
x_vec
f_vec
- Returns:
- property current_evaluation: intο
- property f: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]]ο
- property f_best: ndarray[tuple[Any, ...], dtype[int64]]ο
- f_names: StrVecο
- property max_eval: intο
- mdl(result_type) ResultsTable[source]ο
Plot the results :param result_type: type of results (string) :return: DataFrame of the results (or None if the result was not understood)
- plot_x_idxο
- plot_y_idxο
- set_at(i: int, x_vec: ndarray[tuple[Any, ...], dtype[float64]], f_vec: ndarray[tuple[Any, ...], dtype[float64]])[source]ο
- Parameters:
i
x_vec
f_vec
- Returns:
- set_best_combination(combination: ndarray[tuple[Any, ...], dtype[int64]]) None[source]ο
Set the best combination of investment groups :param combination: Vector of integers (0/1)
- property sorting_indices: ndarray[tuple[Any, ...], dtype[int64]]ο
- tpe = 'Investments Evaluation Results'ο
- property x: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]]ο
- x_names: StrVecο