The simulation places a set of weighted demand points on a map and lets you open a limited number of facilities among candidate sites, visualizing in real time how the p-median total weighted distance and the p-center worst-case distance change as facilities are added, moved, or swapped.
Set the number of facilities p with the slider, click candidate sites to open or close them, toggle between the p-median and p-center objective to see how the same demand points get served differently, and press the heuristic-solve button to watch greedy construction and swap-based local search improve the layout step by step.
Facility count (p) slider, objective toggle (p-median vs p-center), candidate site click-to-open/close, heuristic solve (greedy plus swap) play button, reset layout
The p-median problem was first formalized in the 1960s by operations researchers studying public facility siting, and it remains so computationally hard that even today, large real-world instances with thousands of candidate sites are typically solved with heuristics rather than exact optimization methods.
The simulation places a set of weighted demand points on a map and lets you open a limited number of facilities among candidate sites, visualizing in real time how the p-median total weighted distance and the p-center worst-case distance change as facilities are added, moved, or swapped.
The simulation places a set of weighted demand points on a map and lets you open a limited number of facilities among candidate sites, visualizing in real time how the p-median total weighted distance and the p-center worst-case distance change as facilities are added, moved, or swapped.
Set the number of facilities p with the slider, click candidate sites to open or close them, toggle between the p-median and p-center objective to see how the same demand points get served differently, and press the heuristic-solve button to watch greedy construction and swap-based local search improve the layout step by step.
The p-median problem was first formalized in the 1960s by operations researchers studying public facility siting, and it remains so computationally hard that even today, large real-world instances with thousands of candidate sites are typically solved with heuristics rather than exact optimization methods.