lumix.goal_programming.goal.priority_to_weight¶
- lumix.goal_programming.goal.priority_to_weight(priority, base=10.0, exponent_offset=6)[source]¶
Convert priority level to weight for weighted goal programming.
Higher priorities get exponentially larger weights to ensure they dominate lower priorities in the objective function.
- Parameters:
- Return type:
- Returns:
Weight value for the priority level
Examples
>>> priority_to_weight(1) 1000000.0 >>> priority_to_weight(2) 100000.0 >>> priority_to_weight(0) # Custom objectives 1.0