design_space_parameter module
Create a base class for Variable and Constraint.
- class DesignSpaceParameter(name, element_name, limits)[source]
Bases:
ABCHold a single variable or constraint.
- Parameters:
name (
str) – Name of the parameter. Must be compatible with theSimulationOutput.get()method, and be inIMPLEMENTED_VARIABLESorIMPLEMENTED_CONSTRAINTS.element_name (
str) – Name of the element concerned by the parameter.limits (
tuple[float,float]) – Lower and upper bound for the variable.np.nandeactivates a bound.
- classmethod from_floats(name, element_name, x_min, x_max, x_0=nan)[source]
Initialize object with
x_min,x_maxinstead oflimits.- Parameters:
name (
str) – Name of the parameter. Must be compatible with theSimulationOutput.get()method, and be inIMPLEMENTED_VARIABLESorIMPLEMENTED_CONSTRAINTS.element_name (
str) – Name of the element concerned by the parameter.x_min (
float) – Lower limit.np.nanto deactivate lower bound.x_max (
float) – Upper limit.np.nanto deactivate lower bound.x_0 (
float, default:nan)
- Return type:
Self- Returns:
A DesignSpaceParameter with limits = (x_min, x_max).
- classmethod from_pd_series(name, element_name, pd_series)[source]
Init object from a pd series (file import).
- to_dict(*to_get, missing_value=None, prepend_parameter_name=False)[source]
Convert important data to dict to convert it later in pandas df.
- __init__(name, element_name, limits)
- _abc_impl = <_abc._abc_data object at 0x7318f949d640>