Auditing a Time-Expanded Multi-Commodity Flow MIP
Audit a time-expanded multi-commodity flow MIP formulation for correctness: verify variable index domains against the horizon and transit times, check flow conservation with the proper transit-time shift on inflow, validate that bundle (capacity) constraints are summed correctly across commodities at each time step, and confirm that sink demand-satisfaction constraints respect the departure-time index domain.
Tutorial
Variables and Index Domains
A time-expanded multi-commodity flow (MCF) MIP routes commodities through a network over a discrete horizon . The core decision variable is
Each arc has transit time : flow that enters at time arrives at at time .
When auditing the variable declarations, check that the index ranges respect the horizon. Since arrival cannot exceed , the departure index must satisfy
A formulation that declares for all silently allows flow to arrive past the horizon — a common formulation bug. For example, with and , the correct departure domain is ; the values and would route flow to arrive at times and , after the horizon ends.