Home▸Algorithms & AI▸Optimization Cost Optimization Simulation

🧪 Optimization Cost Optimization Simulation

Interactive economic-dispatch optimizer: watch gradient-descent dynamics drive several production plants with different quadratic cost curves toward the equal-marginal-cost minimum that meets a total demand target.

Algorithms & AI2DModerate60 FPS📱 Mobile-adapted
optimization-cost-optimization-simulation ↗ Open standalone

Five production plants, five different cost curves, one shared demand target. This simulator runs a live penalized-gradient-descent optimizer that redistributes output across the plants every frame, minimizing total production cost until every plant's marginal cost converges to the same shadow price — the textbook condition for an optimal multi-plant allocation. Drag the demand or fuel-price sliders and watch the bars visibly renegotiate the split in real time, or push the step size too far and watch the same descent overshoot and oscillate, exactly as it does in real numerical optimizers.

⚙ Under the hood

This simulation explores how optimization methods can be used to minimize costs in various scenarios, highlighting the trade-offs between different strategies.

Cost OptimizationGradient Descent

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)