lumix.goal_programming.goal.LXGoalMetadata¶
- class lumix.goal_programming.goal.LXGoalMetadata(priority, weight, constraint_sense, undesired_deviations=<factory>)[source]¶
Metadata for a goal constraint in goal programming.
A goal constraint is a soft constraint that can be violated with a penalty. The goal is transformed by adding deviation variables:
For LE: expr + neg_dev - pos_dev == rhs (minimize pos_dev)
For GE: expr + neg_dev - pos_dev == rhs (minimize neg_dev)
For EQ: expr + neg_dev - pos_dev == rhs (minimize both)
- Parameters:
priority (int)
weight (float)
constraint_sense (LXConstraintSense)
- priority¶
Priority level (1=highest, 2=second highest, etc.) Priority 0 is reserved for custom objective terms
- weight¶
Relative weight within the same priority level
- constraint_sense¶
Original constraint type (LE, GE, EQ)
- undesired_deviations¶
Set of deviation types to minimize (‘pos’, ‘neg’, or both)
- __init__(priority, weight, constraint_sense, undesired_deviations=<factory>)¶
- Parameters:
priority (int)
weight (float)
constraint_sense (LXConstraintSense)
- Return type:
None
Methods
__init__(priority, weight, constraint_sense)Check if this is a custom objective term (priority 0).
Check if negative deviation should be minimized.
Check if positive deviation should be minimized.
Attributes
-
constraint_sense:
LXConstraintSense¶