Limit Constraint
- class gym_electric_motor.constraints.LimitConstraint(observed_state_names='all_states')[source]
Constraint to observe the limits on one or more system states.
This constraint observes if any of the systems state values exceeds the limit specified in the PhysicalSystem.
\[1.0 >= s_i / s_{i,max}\]For all \(i\) in the set of PhysicalSystems states \(S\).
- Parameters:
observed_state_names (['all_states']/iterable(str)) –
The states to observe.
[‘all_states’]: Shortcut for observing all states.
iterable(str): Pass an iterable containing all state names of the states to observe.
- set_modules(ps)[source]
Called by the environment that the Constraint can read information from the PhysicalSystem.
- Parameters:
ps (PhysicalSystem) – PhysicalSystem of the environment.