Parameters
opts
Returns
RuleEntry
Without this rule, cost modifiers only affect post-solve calculation.
When present, the solver actively prefers cheaper assignments.
For hourly members, penalizes each assignment proportionally to cost.
For salaried members, adds a fixed weekly salary cost when they have
any assignment that week (zero marginal cost up to contracted hours).
Cost modifiers adjust the calculation:
dayMultiplier(factor, opts?)- multiply base rate on specific daysdaySurcharge(amount, opts?)- flat extra per hour on specific daystimeSurcharge(amount, window, opts?)- flat extra per hour during a time windowovertimeMultiplier({ after, factor }, opts?)- weekly overtime multiplierovertimeSurcharge({ after, amount }, opts?)- weekly overtime surchargedailyOvertimeMultiplier({ after, factor }, opts?)- daily overtime multiplierdailyOvertimeSurcharge({ after, amount }, opts?)- daily overtime surchargetieredOvertimeMultiplier(tiers, opts?)- multiple overtime thresholds