learngraphtheory.org

Interactive Graph Theory Learning

Guest User

Using app without sign in

Algorithm Selection

Facility Location

Finds optimal central hub minimizing average distance

Time: O(V(V+E)logV)
Space: O(V)
Use Case: Logistics hubs, HQ placement, center of gravity

Algorithm Execution

Select an algorithm and generate steps to begin visualization

About Facility Location

The facility location problem chooses where to open facilities, such as warehouses or clinics, to serve a set of demand points at minimum total cost, balancing facility opening costs against customer service distances. Most variants, including k-median and k-center, are NP-hard.

How it works

Practical solvers combine several ideas. Greedy algorithms open the facility with the best cost-per-covered-demand ratio and achieve provable approximation guarantees. Local search swaps open and closed facilities while improvement is possible. Exact solutions for moderate sizes use mixed integer programming, and large instances use Lagrangian relaxation or clustering-based heuristics such as k-means to seed candidate sites.

Applications

Facility location decides warehouse and distribution center placement in supply chains, cell tower and EV charging coverage, hospital and fire station siting for emergency response, and content delivery server placement. It is a flagship problem of operations research and logistics analytics.

Read the full article: Operations Research and Graph Theory

Related algorithms: K-Means Logistics Clustering, Fleet Dispatching (mTSP), Capacitated Vehicle Routing (CVRP)

Interactive Controls
Basic Actions
Double Click → Add Node
Drag → Move Nodes
Shift + Click → Connect Nodes
Right Click → Context Menu
Advanced
Ctrl + Click → Multi-Select
Delete Key → Remove Selected
Double Click Edge → Edit Weight
Ctrl + Drag → Pan View

Zoom Controls

100%
Nodes: 4
Edges: 4