design_space_parameter module

Create a base class for Variable and Constraint.

class DesignSpaceParameter(name: str, element_name: str, limits: tuple[float, float])

Bases: ABC

Hold a single variable or constraint.

Parameters:
name: str
element_name: str
limits: tuple[float, float]
classmethod from_floats(name: str, element_name: str, x_min: float, x_max: float, x_0: float = nan) Self

Initialize object with x_min, x_max instead of limits.

Parameters:
Returns:

A DesignSpaceParameter with limits = (x_min, x_max).

Return type:

Self

classmethod from_pd_series(name: str, element_name: str, pd_series: Series) Self

Init object from a pd series (file import).

__post_init__()

Convert values in deg for output if it is angle.

property x_min: float

Return lower variable/constraint bound.

property x_max: float

Return upper variable/constraint bound.

change_limits(x_min: float | None = None, x_max: float | None = None) None

Change the limits after creation of the object.

property _fmt_x_min: float

Lower limit in deg if it is has 'phi' in it’s name.

property _fmt_x_max: float

Lower limit in deg if it is has 'phi' in it’s name.

property _fmt_x_0: float

Initial value but with a better output.

__str__() str

Output parameter name and limits.

classmethod header_of__str__() str

Give information on what __str__() is about.

to_dict(*to_get: str, missing_value: float | None = None, prepend_parameter_name: bool = False) dict[str, float | None | tuple[float, float] | str]

Convert important data to dict to convert it later in pandas df.

__init__(name: str, element_name: str, limits: tuple[float, float]) None
_abc_impl = <_abc._abc_data object at 0x7f36f79b6c80>