Home▸Operations Research▸Where to Put the Depots: p-Median Placement, Greedy and Swap Versus the Exact Optimum

Where to Put the Depots: p-Median Placement, Greedy and Swap Versus the Exact Optimum

Choose where to open p depots so that the total demand-weighted distance to the towns is smallest. Watch a greedy construction followed by Teitz-Bart swaps, compare it with the exact optimum found by enumerating every subset, and see how the total falls as you open more depots. Change the town layout, the distance rule (straight line or street grid), the demand variation and p. The Blender-built town and depots come with numerical checks: brute-force optimality, local-optimum test, a binomial count and the Weiszfeld continuous median as a lower bound.

Operations Research3DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
Where to Put the Depots: p-Median Placement, Greedy and Swap Versus the Exact Optimum ↗ Open standalone

Choose where to open p depots so that the total demand-weighted distance to the towns is smallest. Watch a greedy construction followed by Teitz-Bart swaps, compare it with the exact optimum found by enumerating every subset, and see how the total falls as you open more depots. Change the town layout, the distance rule (straight line or street grid), the demand variation and p. The Blender-built town and depots come with numerical checks: brute-force optimality, local-optimum test, a binomial count and the Weiszfeld continuous median as a lower bound.

⚙ Under the hood

Choose where to open p depots so that the total demand-weighted distance to the towns is smallest. Watch a greedy construction followed by Teitz-Bart swaps, compare it with the exact optimum found by enumerating every subset, and see how the total falls as you open more depots. Change the town layout, the distance rule (straight line or street grid), the demand variation and p. The Blender-built town and depots come with numerical checks: brute-force optimality, local-optimum test, a binomial count and the Weiszfeld continuous median as a lower bound.

p-median problemFacility locationTeitz-Bart heuristicCombinatorial optimizationOperations research

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)