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:
  • priority (int) – Priority level (1=highest, 2=second, etc.)

  • base (float) – Base for exponential scaling (default: 10)

  • exponent_offset (int) – Offset for exponent calculation (default: 6) Priority 1 → 10^6, Priority 2 → 10^5, etc.

Return type:

float

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