Ongoing working method
Model-Code-Experiment Audit
A routing experiment can fail even when the final route map looks reasonable.
The failure may happen because the formula and code do not match, because the data dimensions are inconsistent, because the fitness function silently differs from the written objective, or because the result table is produced from a different solution than the plotted route.
This page records the audit logic I use when rebuilding VRP experiments.
- Model layer
- What are the decision variables?
- What does each objective term mean?
- Are electric and conventional vehicle terms separated correctly?
- Are time, capacity, energy, charging, and carbon-related constraints actually specified?
- Are dimensions and indices consistent?
- Code layer
- Which function computes the objective?
- Which function decodes a route?
- Where are infeasible routes repaired or penalized?
- Does the code follow the formula or a different implicit rule?
- Are parameters passed in the same order as the mathematical notation suggests?
- Experiment layer
- Are initial solutions comparable?
- Are stopping conditions the same across algorithms?
- Are random seeds or repeated runs documented?
- Are penalty structures consistent?
- Does the convergence curve show best-so-far or current-generation values?
- Does the final table match the final decoded solution?
Principle
Minimum modification.
Do not rewrite the whole system just to make it look cleaner. Identify the inconsistency, document the evidence, apply the smallest correction that makes the model, code, and output agree.