Skip to content

Supply Solver Parameters — Configuration Reference

This page documents all parameters specific to the LP Transport Solver (solver_type = 'lp_transport'). These are set via the supply scenario's param_overrides JSONB field.

All standard supply parameters (horizon, firm weeks, holding cost, etc.) also apply — see Supply Planning Parameters.


Solver Configuration

Solver Time Limit (solver_time_limit)

Type Float (seconds)
Default 300.0
Min 1.0
Max 3600.0

Maximum time the HIGHS solver is allowed to run. If the solver has not found the optimal solution within this limit, it returns the best feasible solution found so far.

When to change it: - ↑ Increase for large networks (>5000 SKU-location pairs) where the LP is large - ↓ Decrease for quick what-if runs where near-optimal is acceptable


MIP Gap (mip_gap)

Type Float
Default 0.01 (1%)
Min 0.0
Max 1.0

Target gap between the best integer solution and the best bound, as a fraction. Only relevant for Phase 3 (MIP with per-batch costs).

When to change it: - ↑ Increase (e.g. 0.05 = 5%) for faster MIP solves at the cost of solution quality - ↓ Decrease (e.g. 0.001 = 0.1%) for higher-quality solutions at the cost of solve time


Lot Sizing (lot_sizing)

Type String
Default "snap"
Options "none", "snap"

Post-processing applied to LP order quantities:

Value Behavior
"snap" Apply min/mult/max rounding — same logic as Rust allocate(). Recommended for production use.
"none" Keep LP fractional quantities. Useful for analysis or when exact lot sizes don't matter.

When to change it: - Use "none" when analyzing the LP's raw solution for cost insights - Use "snap" for production plans that must respect lot-size constraints


Penalty Costs

Shortage Penalty (shortage_penalty)

Type Float (cost per unit)
Default 50.0

Cost per unit of unmet demand in the objective function. Higher values make the solver prioritize avoiding shortages. This is the primary lever for controlling service level vs. cost trade-off.

When to change it: - ↑ Increase when shortage is unacceptable (e.g. critical spare parts) - ↓ Decrease when some shortage is tolerable (e.g. low-criticality items)

Interaction with route cost: If shortage_penalty < per-unit route cost, the solver will accept shortage instead of ordering. Set shortage_penalty significantly higher than your most expensive route's per-unit cost to ensure demand is met.


Safety Stock Penalty (safety_stock_penalty)

Type Float (cost per unit per week)
Default 100.0

Cost per unit of safety stock violation per week. Higher values make the solver prioritize maintaining inventory above the MEIO safety stock level.

When to change it: - ↑ Increase when falling below safety stock is operationally costly (e.g. production line stoppages) - ↓ Decrease when safety stock is a soft target rather than a hard requirement


Repair Scrap Cost (repair_scrap_cost)

Type Float (cost per unit scrapped)
Default 0.0

Cost per unit of bad stock scrapped. When zero, the solver may prefer to scrap bad stock rather than repair it if repair is more expensive. Set to the write-off value of the item to make the solver consider scrap as a last resort.

When to change it: - Set to the item's unit cost to make scrapping equally expensive as losing the item - Set to 0 if bad stock has no residual value and you want the solver to choose freely


Decomposition

Decompose by Item (decompose_by_item)

Type Boolean
Default true

When enabled, the solver decomposes the problem by item — solving each item's supply chain independently. This significantly reduces solve time for large instances.

When to change it: - Disable for small instances (<500 SKU-location pairs) where a monolithic solve is fast enough and you need shared capacity constraints enforced exactly - Enable for large instances where the monolithic LP is too slow


Decomposition Threshold (decomposition_threshold)

Type Integer (SKU-location pairs)
Default 5000

Number of SKU-location pairs above which decomposition is activated. Below this threshold, the solver builds and solves a single monolithic LP.

When to change it: - ↓ Decrease if you experience slow solve times even at moderate scale - ↑ Increase if your monolithic solves are fast and you want exact shared-capacity enforcement


Capacity

Capacity Enforcement (capacity_enforcement)

Type String
Default "soft"
Options "soft", "hard"
Value Behavior
"soft" Flow may exceed hard capacity up to soft_capacity_multiplier × capacity. Overtime cost is implied. Matches MRP behavior.
"hard" Flow must not exceed capacity. May result in more shortages if capacity is binding.

Soft Capacity Multiplier (soft_capacity_multiplier)

Type Float
Default 1.2

Maximum capacity as a multiple of the hard capacity. Only used when capacity_enforcement = "soft". A value of 1.2 means the solver may use up to 120% of the rated capacity.


Overtime Cost Multiplier (overtime_cost_multiplier)

Type Float
Default 1.5

Multiplier applied to the per-unit route cost for units produced in overtime (above hard capacity). Only used when capacity_enforcement = "soft".


Warm Start

Warm Start (warm_start)

Type Boolean
Default true

When enabled, the solver first runs the MRP engine to get an initial feasible solution, then uses it as a starting point for the LP. This can reduce solve time by 50-70% because the LP starts from a good solution rather than from scratch.

When to change it: - Disable if you want a pure LP solution without MRP influence - Enable for faster solve times (recommended)


Complete Parameter Reference

Parameter Type Default Description
solver_time_limit Float 300.0 Solver time limit in seconds
mip_gap Float 0.01 MIP gap tolerance (Phase 3)
lot_sizing String "snap" Post-processor lot-sizing mode
shortage_penalty Float 50.0 Cost per unit of unmet demand
safety_stock_penalty Float 100.0 Cost per unit per week of SS violation
repair_scrap_cost Float 0.0 Cost per unit scrapped from bad pool
decompose_by_item Boolean true Enable item-level decomposition
decomposition_threshold Integer 5000 SKU-loc count threshold for decomposition
capacity_enforcement String "soft" Capacity enforcement mode
soft_capacity_multiplier Float 1.2 Max capacity as multiple of hard cap
overtime_cost_multiplier Float 1.5 Overtime cost multiplier
warm_start Boolean true Use MRP solution as LP starting point