opensbt.model_ga package

Submodules

opensbt.model_ga.individual module

class opensbt.model_ga.individual.IndividualSimulated(config=None, **kwargs)[source]

Bases: Individual

This class extends pymoos’ Individual class to integrate simulation output data.

property CB
property SO
__init__(config=None, **kwargs) None[source]
property cb
reset(data=True)[source]
property so

opensbt.model_ga.population module

class opensbt.model_ga.population.PopulationExtended(individuals=[])[source]

Bases: Population

This class extends pymoos’ Population class to apply population based operators.

divide_critical_non_critical()[source]
classmethod empty(size=0)[source]
opensbt.model_ga.population.pop_from_array_or_individual(array, pop=None)[source]

opensbt.model_ga.problem module

class opensbt.model_ga.problem.SimulationProblem(n_var, n_obj=1, n_ieq_constr=0, n_eq_constr=0, xl=None, xu=None, vtype=None, vars=None, elementwise=False, elementwise_func=<class 'pymoo.core.problem.ElementwiseEvaluationFunction'>, elementwise_runner=<pymoo.core.problem.LoopedElementwiseEvaluation object>, replace_nan_values_by=None, exclude_from_serialization=None, callback=None, strict=True, **kwargs)[source]

Bases: Problem

This class extends the pymoo’s Problem class to integrate the handling of simulation output-related data.

__init__(n_var, n_obj=1, n_ieq_constr=0, n_eq_constr=0, xl=None, xu=None, vtype=None, vars=None, elementwise=False, elementwise_func=<class 'pymoo.core.problem.ElementwiseEvaluationFunction'>, elementwise_runner=<pymoo.core.problem.LoopedElementwiseEvaluation object>, replace_nan_values_by=None, exclude_from_serialization=None, callback=None, strict=True, **kwargs)[source]
Parameters:
  • n_var (int) – Number of Variables

  • n_obj (int) – Number of Objectives

  • n_ieq_constr (int) – Number of Inequality Constraints

  • n_eq_constr (int) – Number of Equality Constraints

  • xl (np.array, float, int) – Lower bounds for the variables. if integer all lower bounds are equal.

  • xu (np.array, float, int) – Upper bounds for the variable. if integer all upper bounds are equal.

  • vtype (type) – The variable type. So far, just used as a type hint.

_evaluate_elementwise(X, out, *args, **kwargs)[source]
evaluate(X, *args, return_values_of=None, return_as_dictionary=False, **kwargs)[source]
pareto_front_n_points(n_points=1000)[source]

opensbt.model_ga.result module

class opensbt.model_ga.result.SimulationResult[source]

Bases: Result

This class extends pymoo’s Result class to output simulation results and extract information from the test data.

__init__() None[source]
property additional_data
get_first_critical()[source]

Identifies the iteration number when the first critical solutions was found

static load(save_folder, name='result')[source]
obtain_all_population()[source]

Returns all test inputs over all generations

obtain_archive()[source]

Returns all archived individuals.

obtain_history(critical=False)[source]

Returns the set of test inputs over all genreation based on feasibility and criticality according to number of function evaluations

obtain_history_archive(critical=False)[source]

Returns all archived test inputs over all generations

obtain_history_design()[source]
obtain_history_hitherto(critical=False, optimal=True, var='F')[source]

Returns the set of test inputs over all generations based on feasibility and criticality according to number of function evaluations (aggregated)

obtain_history_hitherto_archive(critical=False, optimal=True, var='F')[source]

Returns the set of test inputs over all generations based on feasibility and criticality according to number of function evaluations considering all evaluated test inputs (aggregated)

persist(save_folder)[source]
write_results(results_folder='/results/', params=None, is_experimental=True)[source]

Module contents