ams.opt.constraint.Constraint#
- class ams.opt.constraint.Constraint(name: str | None = None, e_str: str | None = None, info: str | None = None, is_eq: bool | None = False)[source]#
Base class for constraints.
This class is used as a template for defining constraints. Each instance of this class represents a single constraint.
- Parameters:
- namestr, optional
A user-defined name for the constraint.
- e_strstr, optional
A mathematical expression representing the constraint.
- infostr, optional
Additional informational text about the constraint.
- is_eqstr, optional
Flag indicating if the constraint is an equality constraint. False indicates an inequality constraint in the form of <= 0.
- Attributes:
- is_disabledbool
Flag indicating if the constraint is disabled, False by default.
- rtnams.routines.Routine
The owner routine instance.
- is_disabledbool, optional
Flag indicating if the constraint is disabled, False by default.
- codestr, optional
The code string for the constraint
- __init__(name: str | None = None, e_str: str | None = None, info: str | None = None, is_eq: bool | None = False)[source]#
Methods
Attributes