docplex.mp.priority module¶
- class docplex.mp.priority.Priority(value)[source]¶
Bases:
Enum
This enumerated class defines the priorities: VERY_LOW, LOW, MEDIUM, HIGH, VERY_HIGH, MANDATORY.
- classmethod parse(arg, logger, accept_none=True, do_raise=True)[source]¶
Converts its argument to a
Priority
object.Returns default_priority if the text is not a string, empty, or does not match.
- Args;
arg: The argument to convert.
logger: An error logger
- accept_none: True if None is a possible value. Typically,
Constraint.set_priority accepts None as a way to remove the constraint’s own priority.
- do_raise: A Boolean flag indicating if an exception is to be raised if the value
is not recognized.
- Returns:
A Priority enumerated object.