- class iwopy.core.OptFunctionList(iwopy.core.OptFunction)[source]
A list of functions.
The main point of this class is to manage the variables and components of the added functions.
Add functions to the list via the append function, and don’t forget to initialize.
Attributes¶
- func_vars_int: list of lists of int
For each added function, the subset of integer variables
- func_vars_float: list of lists of int
For each added function, the subset of float variables
- sizes: list of int
The components of each added function
Public members¶
- OptFunctionList(problem, name)[source]
Constructor
- property functions
The list of added funtions
- property n_functions
The number of added functions
-
initialize(verbosity=
0
)[source] Initialize the object.
- vardeps_int()[source]
Gets the dependencies of all components on the function int variables
- vardeps_float()[source]
Gets the dependencies of all components on the function float variables
- n_components()[source]
Returns the number of components of the function.
- split_individual(data)[source]
Splits result values or other data into individual function data.
- split_population(data)[source]
Splits result values or other data into individual function data.
- calc_individual(vars_int, vars_float, problem_results, ...)[source]
Calculate values for a single individual of the underlying problem.
- calc_population(vars_int, vars_float, problem_results, ...)[source]
Calculate values for all individuals of a population.
- finalize_individual(vars_int, vars_float, problem_results, ...)[source]
Finalization, given the champion data.
- finalize_population(vars_int, vars_float, problem_results, ...)[source]
Finalization, given the final population data.
-
ana_deriv(vars_int, vars_float, var, components=
None
)[source] Calculates the analytic derivative, if possible.
- property component_names
The names of the components
- property var_names_int
The names of the integer variables
- property n_vars_int
The number of int variables
- property var_names_float
The names of the float variables
- property n_vars_float
The number of float variables
- rename_vars_int(varmap)[source]
Rename integer variables.
- rename_vars_float(varmap)[source]
Rename float variables.
- property initialized
Flag for finished initialization