constraint module
Define Constraint, which stores a constraint.
It saves it’s name, limits, and methods to evaluate if it is violated or not.
- IMPLEMENTED_CONSTRAINTS = ('phi_s',)
- class Constraint(name: str, element_name: str, limits: tuple[float, float])
Bases:
DesignSpaceParameterA single constraint.
For now, it can only be a synchronous phase limits.
- __post_init__()
Convert values in deg for output if it is angle.
- property n_constraints: int
Return number of embedded constraints in this object.
A lower + and upper bound count as two constraints.
- get_value(simulation_output: SimulationOutput) float
Get from the
SimulationOutputthe quantity calledself.name.
- evaluate(simulation_output: SimulationOutput) tuple[float, float]
Check if constraint is respected. They should be < 0.
- _abc_impl = <_abc._abc_data object at 0x7f36f796c900>