久章智能JZLOG
Network Design & Facility Location · 仓网规划与选址 · WECHAT ARTICLE

From site selection to delivery, leave chain expansion to the algorithm

Whether a coffee shop can survive depends on its products for three points and its location for seven points.

Whether a coffee shop can survive depends on its products for three points and its location for seven points.

What about the two thousand families? In addition to location, there is a more expensive problem: 450 tons of materials are sent from the central warehouse to 2,500 stores every day. How to organize this distribution network?

The former is a site selection issue, and the latter is a network design issue. In traditional chain companies, these two things are usually solved by two sets of people and two sets of experience - the site selection team looks at the flow of people, competing products, and rents; the logistics team sets up warehouses, dispatches vehicles, and divides areas based on experience. When the scale reaches hundreds or even thousands of stores, experience will hit two walls at the same time: location selection depends on feeling, and it takes a year to know whether it is right or wrong; network distribution depends on experience, but costs are incurred every day.

We recently made a system to put these two things into the same optimization framework and calculate them at once. Let’s first use a simulation case to see the results, and then briefly talk about the technical ideas behind it.

Let’s take a look at the results first: 2,500 stores in a “synthetic city”

In order to verify the system, we generated a reproducible simulated city: a crowd density field composed of several Gaussian "business district centers" and main road corridors, superimposed 400 competing stores, and then asked the system to answer two questions -

Question 1: Where is the store located, how many levels are it divided into, and how much money can each earn?

The system completed the S/A/B/C four-level store layout on the density field:

" alt="" loading="lazy">

The revenue of each store is not photographed, but calculated based on the Huff gravity model: Which store a customer chooses depends on the store's "attractiveness" (area, brand, visibility) divided by distance attenuation, and then shares the same flow of people with all surrounding competitors (including the 400 competing stores). In other words, this revenue forecast takes into account "a competing product opened next door" from the first day.

Question 2: Where does the goods come from, who passes by, and which way does it take?

The system provides a two-level distribution plan for 16 satellite warehouses - the central warehouse uses trucks to run the first-level trunk line, and the satellite warehouses use box cargo to do the second-level short-distance barge:

" alt="" loading="lazy">

If you put the location selection and delivery together in one picture, it looks like this:

" alt="" loading="lazy">

The purple dotted line is the truck trunk line (central warehouse → satellite warehouse), and the light-colored thin line is the cargo short-term barge (satellite warehouse → store). Where the crowd density is high, there are dense stores and satellite warehouses; in the periphery where the density is low, a small number of warehouses radiate over a large area. The location of the warehouse is not taken by the administrative district, but is fed by demand.

Where else can this set of things be used?

The method itself has nothing to do with coffee - any business with "intensive front-end distribution + back-end multi-level distribution" is based on the same problem. Several typical application scenarios:

  1. Expansion plan of restaurant/coffee and tea chain. This is the most straightforward scenario. How many stores to open each year, in which business district to open them, how to mix flagship stores (S-level) and stall stores (C-level), how much revenue will be diverted when competitors open stores next to them - these decisions that used to rely on franchisee experience and layer-by-level reporting can be turned into a sorted list with revenue forecasts.
  2. Instant retail and front warehouse network. The "site selection + large warehouse → front warehouse → user" structure of the fresh food and daily warehouses is almost the same structure as the "central warehouse → satellite warehouse → store" in this case. The difference is that the delivery object changes from a store to a grid, but the skeleton of the coverage model (MCLP) and two-level network optimization can be reused as it is.
  3. Hierarchical distribution of chain drug stores + joint delivery. Pharmacies have clear community coverage logic and are sensitive to delivery timeliness. The coverage model ensures the service radius, and the network layer determines the number of regional warehouses and distribution routes, which is especially suitable for the "large but scattered" county market.
  4. Community group buying/area reconstruction of FMCG dealers. Traditional dealer areas are often divided along historical boundaries. The system can be re-divided according to actual needs: which areas should be equipped with shared distribution centers, what stalls should be opened in the centers, and what models should be used for each line, directly providing cost-comparable solutions.
  5. Urban logistics and "last mile" policy evaluation. The two-level network (difficult for large vehicles to enter the city→satellite warehouse to replace small vehicles) is exactly the structure of joint distribution pilot projects in many cities. This set of models can be used to evaluate "how many transfer nodes are set up, where they are set up, and how many vehicle kilometers can be saved."

The common point is that on-site decisions (whether to open, where to open) and online decisions (warehouses, vehicles, roads) are calculated together under the same cost caliber to avoid "site selection wins revenue, but distribution eats up gross profit."

Technical solution: One-sentence version + three-layer disassembly (you can skip it if you are not interested)

The site selection is scored using the "coverage + revenue" dual model, and the distribution is scored using the "site selection-path decomposition iteration". All are completed at the minute level using a mature operations optimization solver.

Specifically:

layer

what to do

model used

Location layer (L1)

Select points from candidate points to maximize crowd coverage, use the Huff model to predict the expected revenue of each point, consider competition diversion, and output a ranking list

Maximum coverage site selection model (MCLP, classic model in 1974) + Huff gravity model + greedy sequential site selection

Network layer (L2)

Determine the number, location, and capacity of satellite warehouses, as well as the two-level path of "central warehouse → satellite warehouse → store"

Warehouse location problem with capacity constraints (CWLP) + two-level vehicle routing problem (2E-VRP)

coupling layer

The real path cost calculated by L2 is fed back to the site selection score of L1, and iterates until the total cost converges.

Master-subproblem iteration similar to Benders decomposition

There are several options worth mentioning in engineering:

The complete context of technical research (from Church & ReVelle in 1974 to the large-scale 2E-LRP in 2025) is a separate article and will not be discussed here.

From Demo to implementation, there are three pieces of data missing

This demo uses synthetic data. To switch to real business, you only need to replace three inputs:

  1. Crowd density (GeoJSON): mobile phone signaling, takeout order heat, and POI passenger flow are all acceptable;
  2. Candidate list (CSV): rent, area, visibility, competitive product mark;
  3. Cost parameters (JSON): fixed costs and grades of warehouses, vehicle models and mileage costs, and daily delivery volume of a single store.

The output is two lists: a sorted site selection recommendation table (coverage of each candidate point, expected revenue, competitive diversion ratio), and a distribution network plan (satellite warehouse location + stall, which stores each warehouse serves, two-level path details, cost composition). From data input to map report output, it can be completed within 5 minutes on a standard scale.

write at the end

The competition in chain expansion is on the surface a competition on the number of stores, but behind it is a competition on the quality of decision-making. For the same 2,500 stores, the site selection list covers a few more high-value business districts, and the distribution network opens two less unnecessary warehouses. The cost savings and improved revenue in a year may be the most practical lines on the income statement.

Experience is still important - but the best use of experience is to teach the model and then let the model calculate the 2,500-point plan for the entire city at four o'clock in the morning.

Machine-translated from the Chinese original 从选址到配送,把连锁扩张交给算法 (published 2026-10-16). WeChat original ↗