quantity_is_between module

Define an objective that is a quantity must be within some bounds.

Todo

Implement loss functions.

class QuantityIsBetween(*args, **kwargs)[source]

Bases: QuantityIsBetween

__init__(*args, **kwargs)[source]

Set complementary SimulationOutput.get() flags, reference value.

Parameters:
  • name – A short string to describe the objective and access to it.

  • weight – A scaling constant to set the weight of current objective.

  • get_key – Name of the quantity to get.

  • get_kwargs – Keyword arguments for the SimulationOutput.get() method. We do not check its validity, but in general you will want to define the keys elt and pos. If objective concerns a phase, you may want to precise the to_deg key. You also should explicit the to_numpy key.

  • limits – Lower and upper bound for the value.

  • loss_function – Indicates how the residuals are handled when the quantity is outside the limits. Currently not implemented.

_abc_impl = <_abc._abc_data object at 0x7318f15b6e00>