Minimise the cost of shipping from factories through distribution centres to customers. A fictional company: 2 factories, 4 DCs, 10 customers.
- Runs end to end; writes
scenario_summary.csvand asserts flow balance. - Transport cost only. Not included: inventory days, fixed storage, forced shares.
Compare a baseline against +20% demand, and +20% demand with larger DCs.
flowchart LR
F[Factories] --> D[Distribution centres] --> C[Customers]
S[Scenario list] --> R[Runner] --> O[scenario_summary.csv]
- Variables: factory->DC flow, DC->customer flow, unmet demand.
- Constraints: DC balance, factory capacity, DC throughput, demand met or unmet.
- Objective: transport cost plus a large penalty on unmet demand, so a feasible answer always exists.
Total inflow equals total outflow in every scenario; more DC capacity cannot increase unmet demand.
- Next: storage and inventory, production lines, a scenario file read by a notebook pipeline that writes parquet, and solving in AMPL or Pyomo.
python run.py
Needs numpy and scipy.
Part of the portfolio at https://astrenot.github.io/Arkananta-Website/. Synthetic data only.