Skip to content

Alternatives not pursued

Jip Claassens edited this page Sep 15, 2026 · 1 revision

Alternatives not pursued

In one sentence: the approaches the project tried or seriously considered and set aside — the catchment-cap ladder, the school-era deficit model, the parallel fresh-LP sweep, other cost functions and six smaller ideas — with what each would have given and why it lost, so you recognise their traces in the repository and do not re-invent them.

Where this sits: a reference page beside Decision log and Pharmacy results September 2026. Everything here is off the results path (GeoDMS → Arrow → Julia LP → sweep → rounding → scenarios → deck), which runs entirely through lambda_sweep_simplex.jl (The lambda sweep and the Pareto frontier). As of September 2026 (commit e25416b) the scripts below are still in the repository, untested since June–July; nothing on the results path calls them, and the only output still consumed is the committed Netherlands cap CSV that doc/build_deck.mjs renders as the p15 record slide.

The cap ladder was for a few weeks the headline method, with the λ-sweep demoted to "fallback"; most alternatives lost on things measured in the data. The formal record is the "Not pursued" line of the roadmap slide (deck p63, doc/build_deck.mjs around line 243) and README §"Status and roadmap", confirmed with Maarten on 4 September 2026 (ef05320).

1. The catchment-cap ladder (A→D)

What it was and why it was attractive

Lewis's two policy questions — less travel with the same number of pharmacies? (S1) and fewer low-demand pharmacies without more travel? (S2) — reached the repository as issue #43 (Lola, 13 May 2026), phrased without a facility cost. The May–June email thread made this a four-option ladder per scenario, "start at A, only step down" (doc/topics.md, 95f5d33, 22 June 2026):

Rung S1 — same count, less travel S2 — same travel, fewer pharmacies
A max-catchment cap, several pharmacies allowed per cell min-catchment threshold + max cap, everywhere
B combine within a cell first, then one per cell, with the cap the same, but only outside urban centres
C hold urban pharmacies fixed, model the rest the cost function (the λ-sweep)
D the cost function (the λ-sweep) —

Urban pharmacies are frozen in C / S2-B because, per topics.md, "city markets have competition / space / variety factors we don't model".

The attraction: the λ-sweep needs a euro price per pharmacy (λ, in code w · FACILITY_MIN_COSTS, a placeholder rounded from school costs — The lambda sweep and the Pareto frontier). A catchment cap in residents needs no euro; topics.md wants it "from the observed distribution (95th pct or max)", which is why Lewis's six descriptive indicators were "needed first; they set the caps/thresholds".

How it was modelled

Maarten built it in one day, 22 June 2026: cap_scenario.jl, drivers s1_cap.jl / s2_cap.jl, run_cap_scenarios.bat. The rungs are knobs on one engine (file header, lines 1–53): PER_CELL=multi|one (A vs B; at most MULTI_MAX = 8 per cell); URBAN_POP (25 000 in the drivers) pins open every candidate cell whose own population reaches that value (C / S2-B); MAX_CAP / MIN_CAP in residents (batch defaults 35 000 / 4 000, read off the Dutch cell-catchment distribution); TARGET_COUNT; TRAVEL_SLACK.

TARGET_COUNT defaults to today's nearest-to-somebody cells (1 613 for NL in the June 2026 runs; 1 615 on today's client set), not pharmacies (1 992). Rung A is therefore asked to place 1 613 pharmacies and can only double a cell by giving up another; the header (lines 46–47) and s1_cap.jl line 8 say to set TARGET_COUNT=1992 for "a true packing test" — never done. That is why "several per cell" produced only 20 more pharmacies than cells, and why S1-A and S1-B are nearly the same experiment.

The LP (solve_relax, around lines 177–241) is a relaxation (pharmacies per cell may be fractional) of a capacitated facility-location problem: each open cell has a maximum load (Glossary: LP relaxation, capacity). Every resident is assigned to an open cell or stranded; a cell's load may not exceed MAX_CAP per pharmacy in it and — in S2 only, for non-urban cells — may not fall below MIN_CAP (the exemption is not commented; inference: pinned-open cells hold ≥ 25 000 residents, so the threshold could never bind on them). Stranding costs BIG per resident (Glossary: BIG, big_cost()), which keeps the LP feasible: "the cap forbids serving this demand" becomes a reported strand% rather than an infeasible model.

S1 adds "count = TARGET_COUNT" and minimises travel + stranding — a capacitated p-median (Glossary; depth on Background theory). S2 is solved lexicographically — two objectives in strict order, not added with a weight that would have re-introduced a λ: first minimise count + stranding (a pharmacy costs 1, a stranded resident BIG, so coverage wins), then bound the count at the count-LP value rounded up (nfac ≤ K, K = ⌈count⌉, around lines 233–236) and minimise travel. Maarten's recorded reason: it "keeps the LP well-conditioned" (7e7c031); the deeper why is not recorded.

Rounding (round_open) is largest-remainder: floor every fractional x, then hand the missing +1s to the cells with the biggest leftover fractions. A second LP (assign) re-assigns under the caps and reports honest travel: served travel plus stranded residents × BIG.

Two warnings. The file predates the 24 July variable swap (4cee238): here x[j] is the number of pharmacies in cell j and y[k] an assignment fraction, the opposite of today's lp_run.jl (The facility location model explained). And its loader load_dir has neither the baseline-protected subsampling nor the NUTS region exclusion (Scope rules and data gaps).

A toy example of what a cap does

Client cells A, B, C with 30, 20, 10 residents; candidate cells 1, 2, 3 inside them; 0 min to your own cell, 10 to a neighbour (A–B, B–C), 20 for A–C. LINEAR cost, BIG = 120. Today's pharmacies are cells 1 and 2: only C travels, 10 × 10 = 100 person-minutes.

S1-B, cap 25, today's count (2): two capped pharmacies serve at most 50 of 60 residents, so 10 are stranded whatever you do. Best: A sends 25 to cell 1 and 5 to cell 2 (50), B fills cell 2, C is stranded: 50 + 10 × 120 = 1 250 — +1 150 % travel versus today with 16.7 % stranded (dtravel% and strand%, the two columns the log reports). The stranding price, not the placement, makes the number.

S2-A, min 15 / max 25: two pharmacies cannot serve everyone. The count LP settles at Σx = 2.4 (60 residents over a cap of 25; e.g. x = 1, 1, 0.4), so the travel LP runs with at most three. With {1, 2, 3} the pure travel optimum leaves cell 3 at load 10 < 15, so the LP moves 5 of B's residents there: loads 25 / 20 / 15, travel 100. Result: three pharmacies at today's travel — one more than today, purely because today's cell 2 serves 30 residents and the cap says 25: "caps from the observed distribution give arbitrary verdicts" in miniature.

What it produced

Netherlands only, LINEAR, cap 35 000, run on 22–23 June 2026. Two rows survive in doc/cap_results_Netherlands.csv (27fa2b0):

rung pharmacies / cells Δ travel vs today stranded mean min (served) catchment per pharmacy p50 / p90 / max
S1-A (several per cell) 1 613 in 1 593 +13.28 % 1.886 % 2.725 9 876 / 16 974 / 30 895
S1-B (one per cell) 1 613 in 1 613 −6.54 % 0.79 % 2.724 9 928 / 16 901 / 29 501

S1-C, S2-A and S2-B never produced a row ("full-scale run pending" on the slide). Three readings:

  • S1-A worse than S1-B is impossible (a02a118, the same evening): A's feasible set contains B's. Causes: a rounding rule that doubled up the densest cells ("a 2nd pharmacy in an already-served cell cuts no travel") and an LP that could set x > 1 where the cap did not bind (Glossary). The fix — a per-cell ceiling ceil(own_pop / max_cap), so a cell gets a second pharmacy only when its own residents exceed one cap, plus largest-remainder rounding — is in the code, but the CSV committed the next morning still shows +13.3 % / −6.5 % and 20 more pharmacies than cells, so the committed rows and slide p15 are almost certainly the pre-fix run (unverified — logs/ is git-ignored).
  • Stranding, not relocation, drives the headline. Implied stranding price = (travel − mean_t × served population) / stranded population, with served = total × (1 − strand %). The CSV has no population column; with the run's ≈ 17.37 M clients (the contemporaneous NL simplex log), S1-A gives 6.769e7 − 2.725 × 0.981 × 1.737e7 ≈ 2.13e7 person-minutes over ≈ 3.3e5 stranded residents ≈ 65 min — the region's own c(t_max) then, before BIG was fixed at 120 (Travel cost functions) — and a served-travel reduction of about 21–22 % in both rungs (inference from the CSV). The gap between +13 % and −6.5 % is almost entirely 1.9 % versus 0.8 % of residents priced at that number.
  • Why S2 could not report (inference from the code; nothing recorded): the min cap is toothless in the relaxation. load_j ≥ MIN_CAP · x_j is met by any sliver — a cell with x = 0.1 needs a load of only 0.1 × MIN_CAP — so the LP never "sees" the viability threshold; only after rounding does the below_min column count the violations. The count LP therefore under-estimates how many integer pharmacies are needed and the assignment step strands the difference. In the toy, x₃ = 0.4 makes the threshold 6, met by a load of 10.

Why it lost

The argument is empirical. On 23 June the roadmap slide was rewritten around the ladder (4211920, 11:19) and de-emphasised nineteen minutes later (6dc70f5, 11:38, "per feedback" — whose is not recorded): the ladder became "a PROPOSED shortcut for a perceived sweep difficulty", because the descriptive metrics "show realistic min/max bounds are hard to set".

With today's Dutch numbers (doc/pharmacy_descriptives.csv), residents per pharmacy cell run from 4 394 (p10) through 10 167 (median) to 34 905 (max). A max cap at the observed maximum binds almost nowhere, so it shapes nothing; at p90 (~18 000) it declares a tenth of today's network illegal. A min threshold at p10 brands 10 % of the network non-viable by construction. No value is both defensible and informative. The caps also make the LP harder: a capacitated p-median is not "nearly integral" the way the uncapacitated relaxation is (The facility location model explained), and the multistart rounding of From LP fractions to real pharmacies was never ported. Meanwhile the "sweep difficulty" — a λ nobody could communicate — was answered differently: the frontier and the S1 and S2 read off it do not depend on the euro value (The lambda sweep and the Pareto frontier, Scenarios S1 S2 S3).

Maarten's closing note on issue #43 (16 July 2026; closed 18 July): "now implemented as S1 and S2, but with lambda_sweep" — the questions survived, the cost-free mechanism did not. Formal drop: ef05320, 4 September (README: "observed catchments vary so widely … that realistic min/max bounds cannot be set. The λ-sweep is the general method.").

What survives

A capacity cap inside the λ model (CpMP, the capacitated p-median problem) is not dropped — it is on the Remaining list (build_deck.mjs around line 238); what was dropped is caps instead of λ. The stranded slack — first priced at the region's own c(t_max), aligned to BIG on 16 July (c479ebd) "so future ladder runs price stranding identically" — appeared here three weeks before the live LP adopted soft coverage (The facility location model explained); whether one inspired the other is not recorded. The descriptive indicators, commissioned to set the caps, now open the deck.

2. The school-era formulation

What it was

The Julia side began in February 2026 as a school-closure model (Lola's archive/mip*.jl; today lp.jl, greedy.jl and run_scenario in lp_run.jl; formal statement on Service allocation procedure). Formulas below use today's names — x = assignment fraction, y = facility open (The facility location model explained) — because run_scenario was included in the 24 July swap (cap_scenario.jl was not). Four things differ from today's model:

  • Hard coverage, Σ_j x_ij = 1 — every client must be fully assigned to open facilities (run_scenario, around line 282).
  • A deficit penalty instead of a price per facility: an open school below min_clients pays λ per missing pupil — deficit_j ≥ min_clients·y_j − load_j, objective travel + λ·Σ deficit_j (around lines 262–273).
  • λ derived from a facility cost: archive/mip_deficit.jl line 60 sets λ = facility_cost / (min_students/2), so a school at half the minimum pays one full facility cost (inference from the formula; no rationale recorded).
  • A fresh interior-point (IPM) solve per run with crossover (Glossary: IPM, crossover) — around lines 256–257, explored on a grid of (min_clients, w) in lp.jl.

Why it changed

With pharmacies the question became "how many, versus how far", and the deficit penalty cannot answer it: a facility above the minimum is free, so the penalty never closes a big one. A toy — minutes and residents:

F1 F2 F3 residents
A 5 20 60 100
B 20 5 60 100
C 60 60 5 10

Best travel per open set: all three open 100·5 + 100·5 + 10·5 = 1 050 person-minutes; {F1, F2}: 500 + 500 + 10·60 = 1 600; {F1} alone: 500 + 100·20 + 10·60 = 3 100. With min_clients = 50, F3 (load 10) has a shortfall of 40 and closes once 40λ > 550, i.e. λ > 13.75 — but F1 and F2 never close at any λ. With a price per location (min_clients = Inf, objective travel + λ·Σ y_j) three open beats two while 1 050 + 3λ < 1 600 + 2λ, i.e. λ < 550, and two beats one while 1 600 + 2λ < 3 100 + λ, i.e. λ < 1 500: the sweep traces the whole count-versus-travel trade-off. Every pharmacy call has passed Inf since the first sweep (a9ef6cc, 24 May); the Inf switch itself is school-era (5f7949c, 7 April), so "price per location" is literally the school model with the deficit switched off.

Hard coverage went next: under Σx = 1 the LP cannot open fewer facilities than it takes to reach everybody, so island and sparse regions (ITG, Norway, Portugal, PL8) could never bracket S1; soft coverage replaced it on 16 July 2026 (4ec47a9) — why and how on The facility location model explained. IPM per point went for the reasons in §3.

What survives

run_scenario (around lines 248–388), lp.jl and greedy.jl are kept for school runs; none produced a September 2026 number. The 60-minute assignment cap (issue #37) and the 22 dead experiments in archive/ belong to the same era.

3. The parallel fresh-LP sweep (lambda_sweep.jl)

What it was

The first pharmacy sweep (a9ef6cc, 24 May 2026) called run_scenario once per λ on a coarse grid of one point per decade from 1e-5 to 10, extended to 1e3 the next day (9ee7ac6) — each call a fresh JuMP model (JuMP = the Julia modelling library) solved by IPM + crossover. From 51157a0 (26 May) up to MAX_PARALLEL = 4 of these ran at once in Julia threads (parallel_map). Reason given: "IPM is faster than dual simplex at 1M+ variables; crossover keeps x[j] near-integer."

What it produced

The old Netherlands log (≈ 1.03 M variables, still school-age client weights, run sequentially before the parallel driver landed) shows 695–3 946 seconds per fresh IPM solve — and the phantom-fraction artefact: at w = 0.1 the log counted 3 894 facilities as "open" (any positive value), 3 864 of them fractional, while the fractions summed to only 796.75. That is why the live code brackets S1 on sum_y, the LP's continuous count, monotone in λ (9ee7ac6; Scenarios S1 S2 S3).

Why it lost

Three days later (011cafb, 27 May) lambda_sweep_simplex.jl built the model once and re-solved it by warm-started dual simplex as λ moved, changing only the y-coefficients; why the next solve is then cheap is on The lambda sweep and the Pareto frontier. The May remark had compared two cold solves; the warm start is what wins. The new driver, now on the whole population, ran at 1.6 s (w = 2e-4) to 55 s (w = 0.2) per point, sequentially — "warm-start gives the speedup, not threads".

Under hard coverage the warm start still broke down at the top of the grid (2 107 s at w = 0.5 and 13 061 s at w = 1.0 in that log's solved w=… in lines; 16.7 h for NL at w = 5.0, 86476bf); the July solver flip-flops that followed, and how soft coverage ended them, are on The lambda sweep and the Pareto frontier.

What survives

load_from, find_bracket, the coarse → fine → S1/S2 structure and the log format. The file is "kept for reference" (README) but lacks the coverage-consistent baseline (Scenarios S1 S2 S3) and the NUTS region exclusion, so a naive re-run is inconsistent with the deck.

4. The other cost functions

Travel cost functions owns c(t) and the unused travel variants in settings.jl (PIECEWISE; QUADRATIC, still the default TRAVEL_FUNC, last swept on 2 June, 439b22e). Two never-coded variants were dropped on 4 September (ef05320): flat-then-linear and a logit-parameter sensitivity. The reason is not recorded — likely (inference) because the retuned logistic 25/10 (7c6768f) already gives the flat-below-10-minutes shape and the open question moved to Bernhard's rescaling proposal, a DECIDE item on the roadmap slide (Travel cost functions).

The facility-cost variants have no other owner:

Alternative Where Why attractive Why it lost
Concave power-law facility cost 51712·q^0.465 (FUNC_CONCAVE in facility_cost(q), ~99–107; use_power_law in greedy.jl 11–17) facility_cost(q) is defined in settings.jl but called by no script anywhere in the repository, archive included (the archive scripts carry their own hard-coded facility costs) Chris fitted cost per pupil 51712·x^−0.535 (r² ≈ 0.91) to the primary-school costs of Jacobs-Crisioni et al. (2023) (issue #38): measured economies of scale Lola put it in the drop heuristic (658c886); the meeting found it "may close schools too aggressively". It cannot enter an LP without a piecewise-linear approximation, and a fit of cost per pupil is non-linear again once multiplied by load (Lola, #38)
Floor facility cost max(a, b·q) (FUNC_FLOOR) defined, never called a fixed cost that variable cost overtakes Never tried; collapses to λ per location like the linear form

The linear form a + b·q (a = FACILITY_MIN_COSTS = 100 000, b = FACILITY_CLIENT_COSTS = 3 333, q = a pharmacy's load; rounded school placeholders) survives only through a: when nearly everyone is served, b × (total served population) is the same whichever pharmacies are open, so it cannot influence the choice and only the fixed part matters — that is why λ = w·a (Code walkthrough settings). The deck labels €100 000 a placeholder that the frontier, S1/S2 and rankings do not depend on (b3c634b; why on The lambda sweep and the Pareto frontier); calibrating the real a stays on the roadmap.

5. Smaller ideas set aside

The first four rows were confirmed "not pursued" together on 4 September 2026 (ef05320; README; deck p63) so that the reviewers who raised them "see the answer rather than a silent omission". The last two were never on that list: even-split was de-prioritised in topics.md in June and the cost-free S3 was answered by the frontier itself. None has a technical reason recorded beyond what is noted.

Idea Who / where How it would have been modelled Why it lost; what survives
Age-weighted demand (young 0.5 / old 1.5, or bracket weights) REGIO review comments 9–10; doc/deck_changes_from_review.md §3 client_weight_col (settings.jl ~191–199) reads whatever column CLIENT_WEIGHT names: "a GeoDMS export away" Reason not recorded (inference: scope, no agreed weighting). The hook is intact
Candidate cells plus their neighbours Review comments 32–33; review doc §7 a larger candidate export (GeoDMS OD matrix and choice set) "Pulls in the same direction as the choice-set widening" — the 5 → 10 nearest-existing radius, the first unstarted Remaining item (Scope rules and data gaps). Inference: superseded by it
Urban / non-urban split; settlement-only candidates topics.md "Later" (see the rung table); DEGURBA settlement cells only (issue #39) only the ladder's rung C / S2-B (URBAN_POP); the settlement restriction was never coded — candidates became "≥ 50 residents ∪ pharmacy cells" (7c6768f) Dropped with the ladder; S1-C never ran. A regional typology colours charts; no per-facility flag exists
Pharmacist-based and pooled caps, catchment–travel correlation, border cases topics.md "cap sources"; todo.md items 9, 11 as inputs to MAX_CAP Moot once caps are unused; no pharmacist counts were ever obtained
Even-split assignment between equidistant pharmacies topics.md "To be fine-tuned" a tie rule in the nearest-open lookup "Only if nearest produces pathological micro-catchments (de-prioritised)" — it never did (client_nearest, lp_run.jl ~111)
S3 without a cost function topics.md "To be fine-tuned" never designed The frontier itself is S3 (README): every point answers "how few for how much travel" without naming λ

6. Deferred, not rejected

These share the slide with §5 but sit in the Remaining column and are still intended: the counterfactuals, the capacity cap inside the λ model (§1), territorial coverage constraints, Bernhard's logistic rescaling (DECIDE), calibrating the real fixed cost, the exact soft-coverage p-median MIP (mixed-integer programme), RSSV (random-sampling spatial-voting) candidate reduction, and widening the choice-set radius. The roadmap with dates and reasoning is in the Decision log.

In the code

Alternative Open first Then
Cap ladder cap_scenario.jl header (1–53) → solve_relax (~177) → round_open (~245) → assign (~290) → run_combo (~363) s1_cap.jl, s2_cap.jl, run_cap_scenarios.bat; doc/collect_cap.py; doc/build_deck.mjs → capSlide() (~357–422); doc/topics.md
School-era model lp_run.jl → run_scenario (~248–388): deficit ~262–273, hard coverage ~282, IPM ~256 lp.jl; greedy.jl 11–17; archive/mip_deficit.jl line 60
Parallel sweep lambda_sweep.jl → parallel_map (~26–51), run_lp (~196–201), ws_coarse (~212) lp_run.jl solver-history comments ~432–438, ~471–483
Cost functions settings.jl → c(t) (~73–89), facility_cost(q) (~99–107), FUNC_* (~26–45) greedy.jl 11–17
4 Sep decisions doc/deck_changes_from_review.md §3, §7; doc/build_deck.mjs ~230–246; README §"Status and roadmap" commit ef05320

Pinned permalinks: https://github.com/ObjectVision/NetworkModel_EU/blob/e25416b/cap_scenario.jl#L177, …/blob/e25416b/lp_run.jl#L248, …/blob/e25416b/lambda_sweep.jl#L26, …/blob/e25416b/settings.jl#L99, …/blob/e25416b/doc/topics.md.

Pitfalls and open questions

  • Do not read cap_scenario.jl with today's variable names (see §1).
  • The two NL cap rows are pre-fix (unverified) and priced stranding at ≈ 65 min, not BIG = 120 (see §1). Never set them beside sweep numbers.
  • A re-run of the ladder today would be wrong in two known ways: load_dir applies neither PROTECT_BASELINE nor the NUTS exclusion, and its baseline_metrics silently drops clients that cannot reach an existing pharmacy (the sweep fixed this on 6 July, 206923c).
  • facility_cost, FACILITY_FUNC, FACILITY_CLIENT_COSTS are called by nothing; do not read the deck's "a + b·q" as something the sweep computes. TRAVEL_FUNC still defaults to QUADRATIC (Travel cost functions).
  • Not recorded anywhere: whose feedback triggered the 23 June de-emphasis; why MULTI_MAX = 8 (the Dutch maximum per cell is 7) and URBAN_POP = 25 000; whether S1-C, S2-A, S2-B ever ran even partially. The "bounded vs unbounded" comparison of issue #37 lives only in a PDF attached to the issue.

See also

Clone this wiki locally