Cost Weights
Configure the objective function cost weights used by the solver.
Overview
Cost weights control how the solver's objective function balances different types of recovery actions. All values are relative integers — the solver minimises total weighted cost across all actions.
Higher values penalise the corresponding action more heavily, making the solver prefer alternatives.
CostWeights
| Parameter | Type | Required | Description |
|---|---|---|---|
delay_min | integer= 1 | Optional | Cost per minute of delay. Applied to each flight's delay, multiplied by the time block size. |
swap | integer= 50 | Optional | Cost per aircraft swap. Represents the operational complexity of changing aircraft assignments. |
deadhead | integer= 100 | Optional | Cost per deadhead repositioning. Applied when empty aircraft need to be moved between airports. |
cancel_flight | integer= 10000 | Optional | Base cost of cancelling a flight (before passenger re-accommodation costs). |
reaccom_base | integer= 50 | Optional | Base re-accommodation cost per displaced passenger. |
reaccom_hour | integer= 20 | Optional | Additional hourly cost per displaced passenger while waiting for re-accommodation. |
reaccom_hotel | integer= 250 | Optional | Hotel accommodation cost per passenger (applied when wait exceeds the hotel threshold). |
crew_duty_violation | integer= 5000 | Optional | Penalty for each crew duty period violation. Set high to strongly discourage regulatory breaches. |
Examples
Favour delays over swaps
If your operation prefers to delay flights rather than swap aircraft (e.g. to minimise ground crew re-coordination):
{
"costs": {
"delay_min": 1,
"swap": 200
}
}Heavily penalise cancellations
For airlines where cancellations are extremely costly due to rebooking guarantees:
{
"costs": {
"cancel_flight": 50000,
"reaccom_base": 100,
"reaccom_hotel": 500
}
}Balance matters
The ratio between cost weights matters more than absolute values. If cancel_flight is too low relative to delay accumulation, the solver may prefer cancellations when delays would be better.