E-commerce

Achieving operational excellence in e-commerce requires optimizing order fulfillment, last-mile delivery, inventory management, and customer experience. Leveraging data analytics, automation, and process optimization enables companies to remain competitive in a rapidly evolving digital marketplace.

1. Supply Chain Network Design

  • Multi-period supply chain network design (SCND) problem

SCND — Multi-Period Network Design (NL, 2026–2030)

Strategic timing & siting of FCs to balance transport OPEX vs. FC CAPEX & Ops across all half-years.

1) Why It Matters

Opening FCs closer to demand reduces Hub→FC and FC→DC haul lengths, but adds CAPEX and FC Ops. The best plan changes as topline grows over time.

  • Too few FCs → high transport OPEX, possible shortfalls.
  • Too many/early → CAPEX & Ops overhead before needed.
Goal: Choose where and when to open 10k–25k FCs so total cost over 2026H1–2030H2 is minimized while meeting demand.
Half-year periods Capacity bands Nearest-FC routing

2) Compact Formulation

\[ \begin{align} \min\;\; & \sum_{f\in F}\sum_{k\in K} \mathrm{CAPEX}_{f,k}\, y_{f,k} + \sum_{t\in T}\Big(\mathrm{OPEX}^{\mathrm{trans}}_t + \mathrm{OPEX}^{\mathrm{ops}}_t\Big) \tag{1} \end{align} \]
\[ \begin{align} \mathrm{OPEX}^{\mathrm{trans}}_t &= \frac{\mathrm{days}_t}{10^6}\Big[ \alpha \Big(\sum_{h,f} x^{HF}_{t,h,f} + \sum_{f,d} x^{FD}_{t,f,d}\Big) + r \Big(\sum_{h,f} d^{HF}_{h,f}\, x^{HF}_{t,h,f} + \sum_{f,d} d^{FD}_{f,d}\, x^{FD}_{t,f,d}\Big) \Big] \\ \mathrm{OPEX}^{\mathrm{ops}}_t &= \sum_{f\in F} \mathrm{OpsYear}_{k(f)} \cdot \frac{\mathrm{days}_t}{365}\, z_{f,t} \tag{2} \end{align} \]
\[ \begin{align} q_{t,d} &= \mathrm{Topline}_t \cdot s_d, \quad s_d=\sum_{h\in H} s_{h,d}, \quad \sum_{d\in D} s_d \approx 1 \\ 500\sum_{f} x^{FD}_{t,f,d} &\ge q_{t,d} && \forall t,d \\ 500\sum_{h} x^{HF}_{t,h,f} &\ge 500\sum_{d} x^{FD}_{t,f,d} && \forall t,f \\ 500\sum_{d} x^{FD}_{t,f,d} &\le \mathrm{cap}_{k(f)}\, z_{f,t} && \forall t,f \\ z_{f,t} &= 1 \ \text{iff}\ t\ge \text{start}(f), \qquad y_{f,k}\in\{0,1\},\ \sum_{k} y_{f,k}\le 1 \tag{3} \end{align} \]

\(x^{HF}\) and \(x^{FD}\) are trucks (not orders, capacity = 500 orders/truck); \(\alpha=50\) €/truck and \(r=1.5\) €/km. The allocator uses nearest-FC assignment under capacity; costs follow (1)–(3) across all periods.

3) Data & Assumptions

  • Topline per period (daily), exact days per half-year (leap-aware).
  • Hub→DC share matrix → DC demand split.
  • Fixed distances (km): Hub→FC and FC→DC; trucks handle 500 orders.
  • FC CAPEX by city/band; yearly FC Ops by band; one-off CAPEX upon opening.

4) References

Try It

Open the planner and toggle FC openings to see capacity sufficiency and total-cost impact across all periods.

Open SCND demo
Nuxt + Tailwind + Chart.js; greedy DC→FC allocator with capacity and multi-period OPEX aggregation.

2. Simulation-Optimization

  • Sim-Opt: Methods & Implementation

Inventory Simulation ⇄ Optimization

Balance holding, shortage, and ordering costs under stochastic demand & lead times. Find robust reorder points.

1) Why It Matters — The Cost of Poor Replenishment

Fixed rules that ignore variability cause both overstock and stockouts. In continuous-review systems these show up as unnecessary holding costs, lost sales/backorders, and too many small rush orders.

  • Overstock → capital tied up & storage cost.
  • Stockouts → lost sales or service degradation.
  • Unstable ordering → higher setup & expediting cost.
Goal: choose reorder points \(r_i\) (with given policies) to minimize average cost per period while maintaining strong service.
Multi-product (up to 5) Continuous-review (r,Q) & (s,S) Stochastic

2) System Model — What We Simulate

Core assumptions

  • Demand: Poisson arrivals Ă— discrete demand size per customer.
  • Lead time: exponential per order.
  • Policy: per-product (r,Q) or (s,S) with fixed Q or S.
  • Shortage handling: backorders or lost sales (fixed per product).
  • Costs: holding, shortage, and ordering (setup + per unit).

What you control

  • Decision variables: reorder points \(r_i\) for selected products.
  • Evaluation settings: horizon (periods) and number of replicates.
  • Everything else (prices, demand/lead distributions, Q/S) is static and reasonable by design.

We review every period (e.g., daily); deliveries arrive at sampled lead times; demand hits stock; costs accrue each step.

3) Simulation Mechanics — One Loop

Inventory position: \(IP_t = \text{on hand}_t + \text{outstanding}_t\).
Reorder rule: if \(IP_t \le r_i\), place order of size \(Q_i\) (r,Q) or up to \(S_i\) (s,S).
Average cost: \(\;\bar C = \frac{1}{H}\sum_{t=1}^{H}(C^{hold}_t + C^{short}_t + C^{ord}_t)\).
  • Per period: receive due orders → draw demand → update stock & costs → possibly reorder.
  • Run for horizon \(H\); repeat over replicates and average to reduce Monte-Carlo noise.

4) Optimization — Genetic Algorithm (GA)

Chromosome: \(x = (r_1,\dots,r_m)\) over selected products. Objective: minimize summed average cost across products.

GA steps

  • Initialization within smart bounds per product.
  • Tournament selection, uniform crossover, per-gene mutation.
  • Elitism + random immigrants; optional adaptive mutation.

Stopping & robustness

  • Time limit ~20s or ε-convergence (patience window).
  • Each fitness = average over replicates for stability.
  • No fixed RNG seed by default → genuine stochastic variability.

5) What You See — Inputs & Outputs

Inputs

  • Products to include (subset of five).
  • Replicates (1–20) and Horizon (10–1000).
  • GA sliders: Population size, Mutation rate, Crossover rate.

Outputs

  • Best reorder points \(r_i^*\) with per-product cost breakdown & fill rate.
  • History per generation: best/mean cost for charting.
  • Counts: evaluations, simulation runs (evals Ă— replicates), stop reason.

After optimization, you can run a simulation with the best solution to inspect detailed per-product outcomes.

6) References

Try it & Learn More

Explore the Result:

Open live sample
Built with SimPy for simulation and a genetic algorithm for optimization.

Inventory Simulation–Optimization Results

GA over reorder points • Best cost, stop reason, per-product metrics