Skip to content

Route compilation context model ​

1. Overview ​

Route compilation turns feasible routes into a restricted master problem (RMP). It owns route-usage variables, artificial coverage, customer rows, fleet rows, and phase objectives.

1. Dependent Contexts ​

The VRP context supplies customer, vehicle-type, and cost semantics. Route generation supplies feasible columns. The application controls branch nodes, column-generation iterations, and phase transitions.

2. Concepts / Entities ​

1. Customers and Vehicle Types ​

mv: Available vehicles of type v; each route uses one vehicle of its type.

2. Route Columns ​

air∈{0,1}: Whether route r covers customer i.

cr: Route cost, converted to a common cost unit before compilation.

3. Branch Nodes and Phases ​

Branch node b restricts permissible routes; iteration t restricts the generated pool. Phase I eliminates artificial coverage; phase II optimizes route cost.

3. Variables ​

1. Decision Variables ​

xr: Dimensionless route usage. The node LP uses xr∈R≥0 for every r∈Rb,t; an integer solution requires xr∈Z≥0. Not every RMP solve is an integer program.

2. Auxiliary Variables ​

ui: Dimensionless artificial coverage, ui∈R≥0 for every i∈C. It initializes solvable phase-I coverage rows, not a business decision to omit customers in the final solution. Phase II fixes ui=0.

3. Kotlin/Rust Registration Forms ​

Kotlin registers routes with UIntVariable1; the column-generation backend explicitly applies linearRelax() for LP solving. Artificial coverage uses URealVariable1. Rust directly registers route and artificial variables as continuous values in [0,1]. The nonnegative mathematical domains above therefore do not assert identical registration types or default numerical upper bounds.

Coverage equalities and nonnegativity imply ui≤1 and, for any route covering at least one customer, xr≤1. These are consequences of model rows, not Kotlin's declared default upper bounds. Branch-and-price checks integer route usage in final solutions.

4. Predicates ​

covers(r,i): Route r covers customer i.

type(r,v): Route r uses vehicle type v.

compatible(r,b): Route r respects node b's required and forbidden decisions.

active(r,t): Route r was inserted before master solve t.

5. Sets ​

C: Customers; V: vehicle types.

Rb,t: Inserted, feasible, branch-compatible routes at node b, iteration t.

Rb,tv: Routes in Rb,t using vehicle type v.

All following equations fix b,t. Adding columns updates these summation domains.

6. Intermediate Values ​

1. Customer Coverage ​

Description: Coverage is route usage weighted by customer-coverage coefficients.

Yi=∑r∈Rb,tairxr,∀i∈C.

2. Fleet Usage ​

Description: Each route consumes one vehicle of its type.

Fv=∑r∈Rb,tvxr,∀v∈V.

3. Total Route Cost ​

Z=∑r∈Rb,tcrxr.

Yi,Fv,Z are linear expressions, not independent decision variables.

7. Assertions ​

Every column must pass route validation and respect the branch node:

∀r∈Rb,t:feasible(r)∧compatible(r,b).

Each available route has one vehicle type and visits no customer twice:

∀r∈Rb,t:∃!v∈V:type(r,v),∀i∈C: air∈{0,1}.

8. Constraints ​

1. Customer Coverage [客户覆盖] ​

Description: Real routes or phase-I artificial coverage must cover each customer exactly once.

s.t.Yi+ui=1,∀i∈C.

2. Fleet Limit [车队数量] ​

Description: Selected routes must not consume more vehicles than are available.

s.t.Fv≤mv,∀v∈V.

3. Phase-II Artificial Fixing [第二阶段人工量固定] ​

Description: Artificial coverage cannot substitute for real service during cost optimization.

s.t.ui=0,∀i∈C.

Corollary: Coverage becomes Yi=1. Capacity, time windows, and elementarity are already guaranteed by column feasibility; they must not be invented as additional arc-level rows in this context.

9. Objective Function (if applicable) ​

1. Phase I ​

Description: Minimize artificial coverage not supplied by real routes.

minZI=∑i∈Cui.

2. Phase II ​

Description: Fix all artificial coverage to zero, then minimize real route cost.

minZII=∑r∈Rb,tcrxr.

These are two phases, not a single objective M∑iui+Z using an unspecified large constant M.

10. Algorithm References ​

AlgorithmReferenced InDescription
Restricted master solveSections 3, 8, 9Solves a node LP and extracts customer and fleet duals
Column insertionSections 5, 6Updates variables and coverage, fleet, and objective coefficients
Phase transitionSections 8, 9Fixes eliminated artificial coverage and switches objectives
Branch-and-priceApplicationHandles fractional solutions, node bounds, and integer incumbents

Kotlin route-compilation source; Kotlin/Rust example entry points.

11. Ubiquitous Language ​

TermSymbolDefinition
Route usagexrValue of a route column in the master
Artificial coverageuiTemporary phase-I customer coverage
CoverageYiCustomer coverage supplied by real routes
Fleet usageFvVehicles used for a specified type
Restricted masterRb,tMaster containing only the node's available routes

12. Design Decisions ​

DecisionAlternativeRationale
Distinguish LP and integer domainsDeclare integer variables in every phaseDual pricing requires the node LP
Separate feasibility and cost phasesMix objectives with an unspecified large constantMakes feasibility restoration distinct from cost optimization
Filter routes by branch nodeShare unfiltered columns across nodesEnforces branch rules in both master and pricing

13. Change Log ​

VersionChangeReason
1.1Aligned bilingual domains, coverage rows, and phase objectivesRemoved contradictions between the split page and the overall model