🇬🇧 English
🇬🇧 English
Appearance
🇬🇧 English
🇬🇧 English
Appearance
Deliverable D3.2.1: Documento di verifica e validazione tecnica dei moduli dell'Algoritmo SLO (Technical verification and validation document for the SLO Algorithm modules)
Final version
Final version of 5 November 2026. It contains the outcome of the verification, carried out on the code of the «maps-slo» library (section Verification outcome). The acceptance criteria are those of the third version (15 October 2026), which incorporates the decisions of the call of 7 October 2026 between the consultant, GST and GSSI, confirmed by GSSI on 12 October, and the answers of GSSI from 13 to 15 October on the cases that the draft of the methodology did not regulate. The verification led to clarifying some points of the specification of appendix A1, listed in the outcome.
The document establishes against what the modules of the SLO Algorithm developed in task 3.2 are verified, and will report the outcome. The criteria are set before the code exists, and have been discussed with GST and GSSI: in this way the verification measures the code against a shared reference, and does not become a judgement expressed after the fact.
What is verified. There are two modules, with distinct contracts:
Against what. Against the acceptance criteria of the section Acceptance criteria, and against the specification of the phases of the algorithm set out in appendix A1. The specification is an operational formalisation written by the consultant on the basis of GSSI's methodological drafts (25 August, 17 September and 12 October 2026), which makes each rule unambiguous and therefore verifiable.
What it is not. It is not a functional specification and it is not the methodology. The methodology of the algorithm is deliverable D3.1, the responsibility of GSSI: this document takes it as its reference and does not reproduce it. The criteria do not enter into the scientific choices and do not prescribe how to write the code: each is a property observable from outside the module.
Each criterion indicates, in the «How» column, the test by which it is ascertained. The tests are of four types.
| Type of test | What it consists of | Criteria that use it, for example |
|---|---|---|
| Constructed test case | a small set of territorial units, with levels, contiguity and times written by hand, whose correct outcome is known in advance; the module processes it and the output is compared with the expected outcome | C2, C6, I1-I6, A3-A9, A11, A12, S3, S4, R4 (with the data shuffled) |
| Run on the national data | complete run on the approximately 8,000 units of the reference year, with counts and integrity checks on the output | R1, R3, R6, C1, S1, S5, O2, O3, P1-P3 |
| Inspection of the output and of the manifest | reading of the fields of the output and of the run manifest (the file that records the versions, configuration and thresholds used), on a sample or on selected cases | R5, C3, O1b, O5, O6, A10 |
| Measurement | computation of the metrics of the section Metrics the modules must produce, with no acceptance threshold | V1-V10 |
The constructed test cases are the core of the verification of the algorithm, for two reasons. The first is that they make it possible to test it without depending on the real data on services or on their state of progress. The second is that the most likely errors — a chain of merges resolved halfway, a pair of levels merged without having been declared — appear only in particular configurations, and must be looked for with a case constructed for the purpose, not by hoping that they will emerge from the data.
Relationship with the unit tests of task 3.2. The unit tests are part of the development delivery. The verification checks that they cover the test cases required by the criteria, reruns them in a clean environment and adds the missing cases. The repeatable part of the verification — R1, R4, C1, S1, S2, O2, O3 — is described as a sequence of executable checks, so that development can run it at every change to the code without waiting for the formal verification.
Reproducibility of the verification. Each outcome is recorded with the version of the code verified, the configuration of the run (the scenario), the fingerprint of the datasets used and the execution environment, including the hardware for the performance tests. The evidence for each criterion is the reference to an artefact that a third party can re-read: the output of a test, a log, the manifest of a run. There are three possible outcomes: satisfied, not satisfied, not verifiable, the last with the reason (for example a decision still open on which the criterion depends).
The separation between level calculation and algorithm is the design point on which all the criteria depend. The algorithm does not read the data on services: it receives the levels already assigned and treats them as an ordinal attribute of the territorial units.
| Content | |
|---|---|
| Input of the algorithm | for each unit: an identifier, a centrality level or none, a weight; the contiguity matrix with the lengths of the shared boundaries and the perimeters; the travel time matrix; the scenario |
| Output | the tessellation — each unit assigned to a system — and the classification of the systems: centres, composition, total weight, flags |
| Outside the scope of the algorithm | population, health facilities, upper secondary schools and railway stations, which enter the level calculation and stop there; the geometries of the municipalities, which are merged by system downstream of the algorithm; the manual corrections, applied after the run |
The geometry is neither an input nor an output of the algorithm (decision D19): contiguity reaches it already computed in the matrix, and the union of the boundaries of the municipalities of each system is a downstream step, which belongs to the production of the national dataset D3.4.
Three consequences follow from the separation, and the criteria verify them one by one. Extending the dimensions of the level calculation — commercial services, leisure — does not require touching the algorithm (I1, I5). The scheme of levels is a parameter and not a constant in the code (I2, I3, I4). And the algorithm can be verified on levels constructed on paper, without depending on the real data on services (I1, I6).
Three conventions apply throughout the section.
«Municipality» stands for territorial unit. The algorithm does not assume that the units are the Italian municipalities, and the criteria are written so that they can be run on any set of units. Where a criterion names the municipality, in MAPS that is the municipality; criterion I6 verifies that the calculation engine does not take it for granted.
«Weight» stands for population. The algorithm uses a size attribute of the unit as the third tie-break criterion and as the basis of the aggregations by system. In MAPS it is the resident population, and it is an input of the algorithm, not a piece of data on services.
The codes in square brackets, for example [D4], refer to the decisions listed in the sections The decisions of 10/09/2026 (D1-D12), The decisions of 07/10/2026 (D13-D21) and The answers of 13/10/2026 (D22-D26), on which the criterion depends. The identifiers of the criteria (R1, C1, A1 and so on) are those of the second version of 10 September 2026, to which the observations of GSSI and GST of 17 September refer: the criteria removed in the third version do not leave their identifier to a new criterion, and those added take a free number (R6, V10).
Outcome of the independence check. The criteria were re-examined to ascertain that they do not depend on the data that define the levels. The only criteria that touch them are those of the section Level calculation, which is their object. All the others can be run on a set of levels constructed on paper, with the service datasets absent. Three of the metrics depend on external data — not on services, but for comparison — and for this reason the section Comparison measures keeps them separate.
| ID | What is verified | How |
|---|---|---|
| R1 | Two runs with the same inputs produce the same output | double run, comparison of the output files: empty difference |
| R2 | The run is fully described by a reproducible configuration: no parameter is requested interactively at the time of computation | unattended run starting from the configuration alone |
| R3 | The same configuration on another machine produces the same output | run on a clean environment |
| R4 | The order of the records in the inputs does not influence the output, in any phase | shuffled inputs, comparison of the final outputs and of the intermediate outputs of each phase where they are produced |
| R5 | Each run records the version of the code, the version or fingerprint of each input dataset, the reference year of the territorial units and of their boundaries, date and time | inspection of the log or of the run manifest |
| R6 | The run produces the list of the municipalities brought from the 2021 time matrix to the 2025 boundaries, with the municipality that took their place, and the list of the municipalities left without travel times; the two lists are complete with respect to the administrative changes that took place between 2021 and 2025 | comparison with the ISTAT list of the changes to municipalities between 2021 and 2025: every merger appears among the reassignments, every municipality created by separation among the municipalities without times. In MAPS the municipalities without times are two: Misiliscemi, created by separation, and the Isole Tremiti, which no road connects to the other municipalities [D10] |
R2 does not impose a format: a scenario file in YAML or JSON is the natural route, but any artefact that can be versioned and rerun is acceptable. If a guided procedure collects the parameters, the criterion is satisfied provided that it writes the configuration and the computation starts from it.
This is the module that reads the data on services, and the only one (phase 1 of the specification, described in appendix A1 in the section Phase 1 — The level calculation). It assigns each municipality a centrality level, or none, and its result is an input of the algorithm.
| ID | What is verified | How |
|---|---|---|
| C1 | Each municipality receives exactly one class: one of the levels of the declared scheme, or non-centrality. A municipality for which a piece of data on which the outcome depends is missing is flagged as incomplete, remains without a level and is counted in the manifest of the level calculation (appendix A1, section Missing data) | count over the total of the municipalities of the reference year; no municipality without a class, none with two; no level outside the scheme — six, in the MAPS parametrisation [D4] |
| C2 | Population boundary cases fall into the higher class, and the rules are evaluated in order | test cases at exactly 250,000, 100,000 and 50,000 inhabitants; test case at 60,000 inhabitants with all the services, which must result in level 3 and not 4 [D7] |
| C3 | The module can state, for each municipality, which rule classified it | query on a sample; it serves the explainability of the public result |
| C4 | The rules are data and not code: changing them in the configuration changes the result without touching the source code | run with a modified rule |
| C5 | The thresholds on services correspond to the agreed operational definitions | test cases on level 4: DEA (emergency department) facility present, more than one upper secondary school, station of category greater than or equal to Silver; a municipality with DEA, two schools and a Bronze station must result in level 5, not 4 [D16] |
| C6 | Level 6 does not distinguish which of the three services is missing, but records it | test cases with the three combinations of two services out of three: same level, different attribute [D4] |
The second test case of C5 is the one that makes the railway threshold verifiable: with the Silver station, level 4 is distinguished from level 5 on the railway too, and not only on healthcare and schools.
These criteria verify the contract between the two modules: the algorithm receives the levels and does not depend on how they were computed. I3, I4 and I6 go further, and verify that it is reusable outside MAPS — which is the reason why it is worth genuinely separating the two modules instead of merely declaring them separate, and is the prerequisite of the public library «maps-slo» (deliverable D3.5).
| ID | What is verified | How |
|---|---|---|
| I1 | The algorithm produces the tessellation from a supplied set of levels, without reading the data on services | run on a set of levels constructed on paper, with the service datasets absent |
| I2 | The number of levels is a parameter of the scenario, not a constant in the code | run with one more level and with one fewer, with no changes to the source code or to the database |
| I3 | Which pairs of levels can be merged in phase 2 is declared in the scenario, not written in the code | run with one pair added and one removed: the result must change accordingly, without touching the source code |
| I4 | The levels that enter phase 4 are declared in the scenario, not written in the code, whatever the number of levels | run on a four-level scheme and on a six-level one, and with one level removed from the list of those admitted to phase 4 [D13] |
| I5 | Adding a dimension to the level calculation requires no changes to the algorithm and no database migrations | test with a level derived from an additional fictitious service |
| I6 | The engine assumes neither the form of the identifiers nor the number of units: no ISTAT code in the code, no expected count | run on a synthetic set of 200 units with non-ISTAT identifiers, which must produce a valid tessellation |
| I7 | The structural measures are computed at every run without additional data, and the absence of the comparison data does not prevent the run | run without the commuting matrix and without the comparison delineations: measures V2-V5, V9 and V10 must appear nonetheless |
I2 and I5 are criteria on the database schema as well as on the code: an integrity constraint that fixes how many levels exist makes both fail. This is decision D9, still to be completed (section The decisions not yet complete).
I6 is also the criterion that protects the last tie-break: if determinism rests on the order of the ISTAT codes, the engine has assumed the Italian context without declaring it. The ordering must be declared in the scenario.
Phase 2 merges contiguous centralities of different levels: the merged centrality remains a centrality and continues to attract municipalities, but no longer heads a system of its own. The number of systems decreases, not that of the centralities (decisions D11 and D12; the semantics is described in appendix A1 in the section What «merged» means: the two labels). Phase 4 uses the same semantics on the systems made up of a single municipality, with a different criterion: population decides, not level (decision D13).
| ID | What is verified | How |
|---|---|---|
| A1 | After phase 2 no centrality loses its original label: the number of centralities is unchanged | comparison of the sets before and after: same cardinality, same levels |
| A2 | The number of systems does not increase, and decreases by one for each merge; no system is headed by a merged centrality | count of the systems before and after, compared with the number of merges |
| A3 | A merged centrality keeps its attraction function | test case: a municipality closer in time to a merged centrality than to any other must be assigned to it |
| A4 | The attraction label is resolved recursively up to a non-merged centrality | test case with a three-step chain, level 5 to level 3 to level 1: the municipality attracted by the level 5 centrality must resolve to the system of level 1 |
| A5 | The two labels coexist in the output, and the full label shows the centrality through which the municipality entered the system | inspection of a municipality attracted by a merged centrality: its own original label, attraction label of the main centre, full label in the form Milano(Sesto San Giovanni) |
| A6 | In phase 2 only the pairs of levels declared in the scenario are merged, and the invariant holds for all of them: the main centre is of a strictly higher level | four test cases, in all of which the two centralities must come out of phase 2 distinct: two contiguous centralities of equal level; a centrality contiguous to one of lower level; a level 3 centrality contiguous to a level 2 one; a level 4 centrality contiguous to a level 3 one. The last two are pairs not declared in MAPS, even though the second level is higher and is the main centre for other pairs [D5] [D14] |
| A7 | In phase 2 the chain does not exceed the length that the declared pairs allow: two merges, in the MAPS parametrisation. Chains lengthened by phase 4 are measured by V9, without a methodological bound; the only bound is the technical one declared in the scenario (criterion A9) | test case with a row of level 4, 5 and 6 centralities contiguous to one another, which must remain at the head of distinct systems because no pair among those levels is declared; measurement of the longest chain on the real data |
| A8 | When several merges are possible in phase 2, the choice follows the declared order: level, weight, identifier | test cases: a centrality contiguous to two main centres of different level, then of equal level, then of equal level and equal weight |
| A9 | The procedure terminates and the recursive resolution is protected against cycles: declared maximum number of iterations and explicit error when it is exceeded | test case with a circular chain deliberately constructed in the data, which must produce an error and not an infinite recursion |
| A10 | The contiguity thresholds actually used are recorded in the output configuration, even when computed from a percentile | inspection of the output of two runs with different sets of centralities |
| A11 | Phase 4 does not modify the assignments of phase 3: it changes the system to which a municipality belongs, not the centrality that attracts it, and does not require rerunning phase 3 | comparison of the direct step of the attraction label of each municipality before and after phase 4: empty difference; only the resolved attraction labels change [D13] |
| A12 | In phase 4 the centre of the resulting system is the centrality with the larger population, even when it is of a lower level, and the centrality that loses remains a centrality | test cases: a system made up of a single level 6 municipality contiguous to the level 4 centre of a system of several municipalities, first with a larger and then with a smaller population than that centre. In the first case the level 6 municipality becomes the centre of the system, and the level 4 centre keeps its original label, level and attracted municipalities; in the second the level 6 municipality enters the existing system as a merged centre. A third case with a system made up of a single level 2 municipality, which must not start any merge. A fourth with a municipality left alone contiguous only to a centrality merged in phase 2, first with a smaller and then with a larger population than it: in the first case it must enter the existing system as a merged centre, in the second it must remain alone; in both the merged centrality must not change system. A fifth with a municipality left alone contiguous to two centralities, which must be compared with the one closest in time even when it is the less populous. A sixth with a level 4 municipality left alone contiguous to a system made up of a single level 3 municipality, which must enter that system. A seventh with a municipality left alone closer in time to a merged centrality with a smaller population than its own and also contiguous to a centrality that heads its own system, first with a larger and then with a smaller population than the latter: in the first case it must become the centre of that centrality's system, in the second enter it as a merged centre; in neither must it enter the system of the merged centrality [D13] [D23] [D24] [D25] [D26] |
A4 and A7 go together and are the core of the group. A4 verifies that the recursion is there: without recursive resolution, the municipality attracted by a merged centrality ends up in a system that does not exist. A7 verifies that it is bounded: it is the property that prevents a row of contiguous minor centralities from dragging into the same system a ribbon of municipalities as long as the Po Valley. The longest chain on the real data is also a number to look at in the first national run.
The third and fourth test cases of A6 are not a quibble. The pairs of levels that can be merged are a declared list, and they do not coincide with all those that respect the invariant: in MAPS a level 3 centrality contiguous to a level 2 one is not merged, although level 2 is higher and is the main centre for other pairs; and a level 4 centrality is not merged into a level 3 one, which is the main centre only for levels 5 and 6. An implementation that reduced phase 2 to a single inequality — «merge towards any admitted higher level» — would pass the first two cases and fail the other two, producing a tessellation different from the one the methodology describes. It is the easiest error to make in good faith, and it is the reason why the criterion lists four cases and not one.
A10 protects the comparability between two runs. The thresholds today are fixed values (3.09% for the shared boundary, 20 minutes for the time, decision D15), derived once as percentiles: if in another scenario they were again computed on the data, two runs would no longer be comparable unless the value used remains written in the output.
A12 reverses the criterion of the second version, which forbade merges towards a lower level in phase 4: with decision D13 the criterion of phase 4 is population, and level does not count. The scope of the change is however limited by the thresholds of the level calculation. A municipality that reaches phase 4 is of level 4, 5 or 6, so it has fewer than 50,000 inhabitants, while every level 1, 2 or 3 centrality has more: a municipality left alone can become the centre only of a system headed by another level 4, 5 or 6 centrality. How many systems change centre in this way is measured by V10.
| ID | What is verified | How |
|---|---|---|
| S1 | Each non-centrality municipality present in the travel time matrix is assigned to exactly one centrality | count over the total, net of the municipalities without times listed by R6 |
| S2 | Each centrality remains a centrality in the output — original label and level intact — even when merged, and none is recorded as an attracted municipality: its attraction label changes, not its nature | inspection of the rows of the centralities after phases 2, 3 and 4. For a merged centre the attraction label differs from the original label (Sesto San Giovanni carries Milano, and so does the centre that loses in phase 4); for a centre that heads its own system it coincides with it (Milano carries Milano) [D11] [D13] |
| S3 | The tie-break chain is applied in order: time, level, weight of the centrality; a merged centrality competes with its own level and its own weight, and the municipality that chooses it enters the system of its main centre | test cases with equal time, then with equal time and level; a case with a municipality equidistant from a level 3 centrality merged into a level 1 one and from a non-merged level 2 centrality, which must be assigned to the latter; a case with equal time and level between a merged centrality with a smaller population than the other, but with a main centre that has a larger one, which must be assigned to the other; no use of commuting flows or of contiguity [D8] [D21] [D22] |
| S4 | The last tie-break is deterministic and follows the ordering of the identifiers declared in the scenario | test case with equal time, level and weight; repetition with the records in reverse order |
| S5 | The time threshold excludes no municipality from the assignment: municipalities beyond the threshold are assigned and flagged as distant | count of the flagged municipalities; check that the tessellation remains complete over the municipalities present in the travel time matrix [D1] [D2] |
| S6 | The time threshold is a parameter of the scenario, not a constant | two runs at 30 and at 60 minutes: the count of distant municipalities changes, not the assignment |
| S7 | The distant municipalities can be extracted as a dataset of their own | extraction of the set of flagged municipalities, with the municipality code and the system they belong to; the geometry is added downstream [D2] [D19] |
| S8 | The resolved attraction label of each municipality indicates an existing system, headed by a non-merged centrality | referential integrity check on the resolution, not only on the direct step: no resolved label must point to a centrality that is itself merged into another |
S2 is the criterion that distinguishes merging from absorption, and for this reason it has more than one case. The property to be verified is not that the attraction label of a merged centrality differs from its own — that would also be satisfied by an implementation that downgrades it to a member municipality — but that only that label changes, while original label and level stay in place. A merged centrality is flagged, not downgraded.
S8 closes the loop on resolution: if the resolved label of a municipality points to a centrality that is itself merged, the recursion has stopped halfway. It is the error that is seen only in cases with two merges, those of the type level 5 to level 3 to level 1, and for this reason it must be looked for with a constructed test case.
| ID | What is verified | How |
|---|---|---|
| O1 | The output complies with the agreed schema, integrity constraints included | loading into the target table; the schema does not constrain the number of levels and provides for the flagging of distant municipalities and for the matrix variant [D9] |
| O1b | Each row declares from which phase and from which rule its membership of the system derives | inspection of a sample covering phases 2, 3 and 4 |
| O2 | Each municipality appears only once | count and unique key |
| O3 | The weight of each system is the sum of that of its member municipalities | independent recomputation |
| O5 | The dataset is accompanied by the configuration that generated it | presence of the artefact together with the output |
| O6 | The output declares which travel time matrix produced it | inspection of the field and of the manifest: fingerprint and description of the matrix; two runs on two different matrices must be distinguishable [D17] |
O4, which in the second version required valid geometries in a single reference system, leaves the verification of the modules together with the geometry (decision D19): the check remains necessary, and moves to the criteria of the national dataset D3.4, where the geometries of the systems are produced.
| ID | What is verified | How |
|---|---|---|
| P1 | The execution time of the algorithm on the declared reference case, with the contiguity and travel time matrices already computed, is within ten minutes on declared hardware. It is a limit on the duration of the computation, not a travel time threshold | measurement on a complete run. The reference case in MAPS is the national scale, approximately 8,000 units [D20] |
| P2 | The time is reported broken down by phase, with the calculation core — phases 2, 3 and 4, inputs already in memory — measured separately from the reading of the inputs and the writing of the output | inspection of the run report. It has no threshold of its own: it serves to make any overrun of P1 attributable |
| P3 | Rerunning a varied scenario does not require recomputing the travel time and boundary matrices | measurement of the second run, compared with that of the core |
Ten minutes is the proposed time limit, and there is a single threshold, on P1: it applies to the total, not to the parts. P2 is not a second limit but a request for instrumentation: if P1 overruns, the breakdown immediately says where. If the time is in the calculation core, the problem is algorithmic, typically a loop in Python instead of a matrix operation; if it is outside, it lies in the reading of the inputs or in the writing of the output, and is solved with a columnar format. They are two different diagnoses and two different remedies, and without the breakdown they cannot be told apart.
It is worth distinguishing what the project requires from what is expected, because only the former is a criterion. The project requires a run that can be repeated many times: the calibration of D3.3.2 and the simulator of WP5 depend on runs with different parameters. At ten minutes per run, a sensitivity analysis on twenty scenarios takes a little over three hours, unattended. This is why P3 matters more than P1: if each run recomputes the matrices, the limit is broken anyway.
Much less is expected, and it is worth knowing this so as not to read ten minutes as a forecast. Phase 3 looks, for each of the approximately 6,500 non-centralities, for the minimum over a set of centralities of the order of a thousand: about ten million comparisons, which on in-memory matrices take seconds. Phase 2 works on a few thousand pairs of contiguous centralities, phase 4 on the few centralities left alone, and the resolution of the labels on short chains. The time is concentrated at the edges, in reading the travel time matrix; the aggregation of the geometries of the municipalities by system, which on full-resolution boundaries would be the dominant item, lies outside the algorithm (decision D19). Ten minutes is therefore a wide margin, and deliberately so: an acceptance criterion must state what the project needs, not incorporate an estimate made by whoever writes it.
One consequence should be highlighted: ten minutes is not an interactive time. If the WP5 simulator has to respond while the user modifies a parameter, this is not achieved by tightening this limit, but with a different mechanism — precomputed scenarios, or a run on a territorial subset. It is a WP5 decision, to be taken knowing that the algorithm at national scale does not respond in real time.
P1 was one of the two points flagged in red by GSSI and GST on the second version of the criteria; the call of 7 October clarified that the limit concerns the duration of the computation, and the criterion now says so explicitly (decision D20).
The manual corrections leave the algorithm (decision D18). They are few, they are applied after the run and the calibration, and they concern Italian cases that an algorithm designed to be reused in another country must not know about; among them is Misiliscemi, created in 2021 by separation from Trapani and without travel times in the 2021 matrix, which is assigned to the Trapani system, and the Isole Tremiti, with no road connection and therefore without times, which remain a system made up of a single municipality. Criteria M1, M2 and M3 of the second version, which required the module to apply the corrections as exceptions declared in the scenario, are therefore removed from the verification of the modules.
The requirement that motivated them remains, and moves to the criteria of the national dataset D3.4, where the corrections are applied: the corrections are kept in a versioned list (type of correction, municipality, destination municipality, justification; the systems of origin and destination are derived at each run and recorded in the outcome of the application), applied by a script to the output of the algorithm and published together with the dataset. It is the condition for the published dataset to remain reconstructible: a correction made by opening the produced file cannot be redone by anyone, and R1-R3 would no longer hold for what is actually published. The number of corrections enters the validation as a measure of how well the automatic part is working.
These are not thresholds to be passed: they are numbers that the modules must compute at every run, because they are the raw material of D3.3.2, the validation and calibration report of the SLO Algorithm. They must be provided for from now on, because adding them to modules already written requires going back to them. The thresholds, where they make sense, will be agreed after seeing the first national run.
None of these measures depends on the data that define the levels. Three, however, depend on comparison data, external to the algorithm: they are the only ones that cannot be computed in an arbitrary context of use, and their absence must not prevent the run (criterion I7). For this reason they are in a separate table.
Computable from the inputs of the algorithm and its output alone. They must be produced at every run, always.
| ID | Metric | What it is for |
|---|---|---|
| V2 | Number of systems, distribution by number of municipalities and by weight | immediately catches degenerate results: a few huge systems or thousands of tiny systems |
| V3 | Number of systems made up of a single municipality remaining at the end, broken down by level of the centre | measures the effectiveness of phase 4; the systems with a level 1, 2 or 3 centre do not start merges and remain alone unless they receive a level 4 municipality left alone (Cesena, Chioggia and Messina are the examples of the GSSI draft), and must be counted separately |
| V4 | Share of weight within the time threshold from its own centre, and count of the municipalities flagged as distant | direct check of the one-hour travel constraint, and a number that can be communicated externally |
| V5 | Number of non-contiguous systems, with the list of isolated municipalities, computed on the contiguity matrix | assignment to the centre nearest in time does not guarantee that a system is a continuous area: a motorway can «bring closer» a distant hub |
| V9 | Number of merged centres per system, broken down between phase 2 and phase 4, and maximum length of the merge chain | measures how much phases 2 and 4 are aggregating. A system with twelve merged centres and a three-step chain is information, not necessarily an error, but it must be looked at [D11] [D12] [D13] |
| V10 | Number of systems of several municipalities whose centre changes in phase 4, because a contiguous municipality left alone has a larger population than the existing centre, with the list of the cases | it is the effect of the population rule on the systems already formed, which the GSSI draft itself calls an «absurd example»: it must be looked at case by case in the first national run [D13] |
On V5: it is not required that the systems be contiguous — that could be a legitimate result — but that the number of cases be known, because it is the first thing one notices when looking at the map. The contiguity matrix is enough to compute it, without the geometries.
Metric V7 of the second version, the number of manual corrections, leaves together with the corrections themselves (section Manual corrections) and moves to D3.4. Metric V8 becomes a comparison measure, because it requires a second travel time matrix.
They require data external to the algorithm: a flow matrix, the delineations to compare against, a second travel time matrix. They belong to the use that MAPS makes of the algorithm, not to the algorithm, and in another context of use they may be missing or be different.
| ID | Metric | External data required | What it is for |
|---|---|---|---|
| V1 | Share of trips that remain within each system | matrix of flows between municipalities: in MAPS, ISTAT commuting | it is the measure with which the scientific community will compare the SLO with the ISTAT Local Labour Systems (LLS) |
| V6 | Overlap with the 2021 Local Labour Systems, the inner areas of the National Strategy for Inner Areas (SNAI), the provinces | the comparison delineations | not in order to resemble them, but to be able to explain the deviations |
| V8 | Deviation between two tessellations produced with two different travel time matrices, for example optimal times and times with traffic: municipalities that change system, systems that change composition | a second travel time matrix | the two tessellations are two parallel results, not a result and its correction: the difference is itself a piece of data of interest. It is computed only if the second matrix exists [D17] |
V1 deserves two notes. The first: decision D8 removed commuting from the algorithm, and this is what gives it back a legitimate function — measuring downstream how much a system retains trips is validation, not an ingredient of the computation. The data serve the measurement, not the result, and this is the reason why their absence cannot block a run.
The second concerns the comparison with the Local Labour Systems, and must be borne in mind before reading the number: the merges of phase 2 raise V1 by construction, because a larger system retains more trips. A high value therefore does not say that the tessellation describes the territory well; it says so only for systems of equal size. It must be read together with V2 and V9, otherwise one measures aggregation and believes one is measuring quality.
The ten decisions left open in the first version of the criteria (3 September 2026) and two decisions that emerged during the discussion were taken in the call of 10 September 2026 between the consultant, GST and GSSI, and are incorporated in the specification of appendix A1. The table gives the outcome of each and the criteria that depend on it; three were modified by the decisions of 7 October, and the table points this out.
| ID | Outcome | Criteria that depend on it |
|---|---|---|
| D1 | The one-hour limit is retained, but as a flagging threshold and not an exclusion threshold | S5, S6, V4 |
| D2 | Municipalities out of reach are assigned to the nearest centre and flagged as distant; the set of flagged municipalities is a dataset of its own | S5, S7, V4 |
| D3 | ISTAT methodology on TomTom graph data, with two variants — optimal times and times with congestion — that produce two tessellations. Modified by D17: the algorithm receives a matrix, and the second variant is another input matrix | O6, P3, V8 |
| D4 | Among levels 6, 7 and 8 of the draft there is no order: they merge into a single level 6, «two services out of three» | C1, C6 |
| D5 | Phase 2 and phase 4 remain distinct: in phase 2 the only possible main centres are levels 1, 2 and 3. The part on phase 4 is replaced by D13 | A6, A7 |
| D6 | Schools: at least two tracks. Health: DEA facility present. Stations: category greater than or equal to Bronze. Replaced by D16 | C5 |
| D7 | The population thresholds are «greater than or equal to», and the rules are evaluated in order | C1, C2 |
| D8 | Commuting flows leave the tie-break chain, replaced by the population of the centrality | S3, S4 |
| D9 | The development of the modules takes on the reading of the WP2 data schema and the integration of what has changed [open] | O1, I2, I5 |
| D10 | Attributes as of 2025; 2021 travel time matrix brought to the 2025 boundaries: in mergers the municipality hosting the town hall of the new municipality is kept; the municipalities without times, such as Misiliscemi, enter with the manual corrections | R5, R6, C1, S1 |
| D11 | Phase 2 merges, it does not absorb: the merged centrality keeps its label and attraction function, and continues to attract municipalities in phase 3. The number of systems decreases, not that of the centralities | A1, A2, A3, A5, S2 |
| D12 | Each municipality has two labels — original and attraction — and the attraction label is assigned by resolving recursively the chain of merges up to a non-merged centrality | A4, A7, A9, O1b |
The call of 7 October 2026 between the consultant, GST and GSSI discussed the points on which the draft of the methodology sent by GSSI on 17 September diverged from the second version of the criteria and of the specification. The written summary of the decisions was confirmed by GSSI on 12 October, with three corrections incorporated here (D13, D18 and D21), together with a new draft of the methodology.
| ID | Outcome | Criteria that depend on it |
|---|---|---|
| D13 | Phase 4: a system made up of a single municipality with a level 4, 5 or 6 centre, if contiguous to another centrality of any level, merges with it, and the centre of the resulting system is the centrality with the larger population, even if of a lower level. The centre that loses remains a centrality, as in phase 2. There are no systems with two equal centres. The systems made up of a single municipality with a level 1, 2 or 3 centre remain such. Replaces the part of D5 on phase 4. Modified by D25: those systems do not start merges, but can receive a level 4 municipality left alone | I4, A11, A12, S2, V3, V9, V10 |
| D14 | Phase 2: level 1 is the main centre for all the other levels, level 2 for levels 4, 5 and 6, level 3 only for levels 5 and 6. The chained resolution of the labels is confirmed | A4, A6, A7 |
| D15 | Contiguity: the share of shared boundary is computed on the perimeter of the municipality that merges (Sesto San Giovanni with respect to Milano, not the other way round); the thresholds are fixed, 3.09% for the boundary and 20 minutes for the time, and the percentiles from which they derive are computed on the pairs of centralities only | A10 |
| D16 | Level 4: DEA facility present, more than one upper secondary school, station of category at least Silver. Levels 5 and 6: station of category at least Bronze. Replaces D6 | C5 |
| D17 | The algorithm receives a travel time matrix and does not go into how it is built. Optimal times are used today; a variant with traffic is another input matrix, not a rule of the algorithm. Modifies D3 | O6, P3, V8 |
| D18 | The manual corrections leave the algorithm: they are applied after the run and the calibration, and documented. The reproducibility requirement moves to the national dataset D3.4 | criteria M1-M3 and metric V7 removed |
| D19 | The geometry leaves the algorithm: the union of the geometries of the municipalities by system is done downstream | S7, P2, V5; criterion O4 removed |
| D20 | The ten-minute limit of criterion P1 is the execution time of the algorithm on the whole national territory, with the matrices already computed, not a travel time threshold | P1 |
| D21 | Phase 3: the assignment criteria are, in order, travel time, level of the centrality and population; contiguity and proximity are not assignment criteria. A centrality merged into another attracts on behalf of the main centre of its system (borrowed size): the municipality that chooses Sesto San Giovanni, merged into Milano, enters the system of Milano. In the tie-break the merged centrality competes with its own values (D22). The level calculation must be able to accommodate other criteria when other data arrive; the assignment stays fixed | S3 |
After the confirmation of 12 October, four cases remained that the new draft of the methodology did not regulate. The consultant put them to GSSI on 13 October; GSSI answered the same day, on 14 October clarified D22, D23 and D24, and on 15 October settled the limit case left between D23 and D24 (D26).
| ID | Outcome | Criteria depending on it |
|---|---|---|
| D22 | Phase 3: a merged centrality enters the tie-break with its own level and its own population, not with those of the main centre. Sesto San Giovanni (level 3) against Cinisello Balsamo (level 3): population decides; if Sesto San Giovanni wins, the municipality enters the system of Milano through it. Clarified by GSSI on 14 October, which corrects the reading of D21 given in the previous version, that is Sesto San Giovanni with the level of Milano | S3 |
| D23 | Phase 4: a municipality left alone contiguous to a centrality merged into another is compared with the population of that centrality (Abano Terme, not Padova). If the merged centrality has the larger population, the municipality enters the system of its main centre; if it has the smaller one, the comparison has no effect and D26 applies. The centrality merged in phase 2 does not leave its system. Clarified by GSSI on 14 October | A12, V3 |
| D24 | Phase 4: a municipality left alone contiguous to several centralities is compared with the one closest in travel time, and then population decides as in D13 and D23. Clarified by GSSI on 14 October; the answer of 13 October indicated the centrality with the largest population, which remains as the criterion for equal time (determinism rule) | A12 |
| D26 | Phase 4: if the contiguous centrality closest in time is a merged centrality with a smaller population than the municipality left alone (D23), the municipality is compared with the next contiguous centrality in time, and population decides as in D13: if it has a larger population than a centrality that heads its own system it becomes its centre, if it has a smaller one it enters it as a merged centre. It enters the system of the merged centrality only if it has a smaller population than it. Answer of GSSI of 15 October. Determinism rules: several smaller merged centralities are all skipped, in the same order of time; if no contiguous centrality remains, the municipality remains alone | A12, V3 |
| D25 | Phase 4: a system made up of a single municipality with a level 1, 2 or 3 centre does not start merges, but can receive them, and its centre always wins. The case arises only between a level 4 municipality left alone and a system made up of a single level 3 municipality, because the other pairs are already merged in phase 2 (D14) | A12, V3 |
D9 — alignment of the WP2 data schema. The table gold.dls_attractors, described in the Documento di Progettazione Tecnica Data-Lake (Data Lake Technical Design Document) of WP2, was designed on assumptions that the decisions of 10 September do not confirm: four levels with an integrity constraint that imposes them, against six; a continuous score from 0 to 100, which decision D4 makes unnecessary; four service categories, including commercial services, which the algorithm does not use. Two fields that are now needed are missing instead: the flag for distant municipalities and the indication of the travel time matrix used. The WP2 document has already been delivered: the revision must be tracked as a new version. Criterion O1 cannot be written in final form until the schema is settled.
On the integrity constraint that fixes the number of levels, a choice must be made, not an update: if the scheme of levels is a parameter, the constraint must be removed, not raised from four to six. Otherwise, the day commercial services enter the level calculation, a database migration is needed, and that is exactly what criteria I2 and I5 rule out. The four service categories provided for by the schema, on the other hand, are not an error: they belong to the input of the level calculation and can remain as a provision, provided the document states that the algorithm does not read them.
D9 does not concern the methodology and does not depend on GSSI: it is closed between module development and verification, and does not prevent the list of criteria from being considered frozen.
The questions to GSSI on the cases of phase 4 and of the tie-break are closed with the answers from 13 to 15 October (section The answers of 13/10/2026). The last limit case of phase 4, a municipality left alone whose contiguous centrality closest in time is a merged centrality with a smaller population than its own, is settled by D26 and described in appendix A1 in the section Cases the draft does not regulate.
The determinism rules, which serve only to make the result independent of the order in which the data reach the program and do not touch the method, are set in the specification and communicated to GSSI: the last tie-break on the identifier declared in the scenario (criterion S4), the order of choice among several possible main centres in phase 2 (criterion A8), and the simultaneous treatment of the municipalities left alone in phase 4, described in appendix A1 in the section Simultaneous treatment.
A determinism rule set after the first national run. The simultaneous treatment left one case open: a municipality left alone that chooses a centrality with a larger population and is in turn claimed by another municipality left alone, with a larger population than its own. The rule set on 5 November 2026 makes its own choice prevail: the claim has no effect, and the municipality that made it remains a system made up of a single municipality. In the national run it decided three cases (Castel Volturno, Conversano, Castellaneta). The rule must be communicated to GSSI; the alternative — the municipality whose claim is ignored moves on to the next centrality, as in decision D26 — touches the method, and in that case the code and the three outcomes would change.
The licence of the travel time matrix, ISTAT on TomTom graph, affects deliverables D3.4, D3.5 and the open data publication of WP6, and is described in appendix A1 in the section Points that remain open. It does not affect the verification of the modules.
The following observations do not enter into acceptance and do not affect the verification of the modules. They arose from reading the drafts of the methodology alongside the conceptual framework of WP1, and are addressed to GSSI, owner of the methodology, so that it may assess whether to incorporate them in drafting D3.1.
The algorithm is not a clustering algorithm, and it is useful to say so. It has no internal quality measure that it tries to improve: it applies a fixed sequence of rules. The project documentation uses the word «clustering» in several places, and this creates an expectation that the result does not meet. The rule-based choice is defensible — it is readable, every assignment is explainable, the public decision-maker can change a rule and see its effect, which an optimiser does not allow — but it must be declared as a choice. This is also the source of the weight given to the metrics in the section Metrics the modules must produce: without an internal quality measure, external comparison is the only way of saying something about the result.
The declared scope is multidimensional, the level calculation uses three services — and the answer lies in the design. The WP1 framework bases its argument on the fact that work-related commuting accounts for only 32% of trips, against 37.2% for family management, 26.2% for leisure and 4.6% for education (Audimob-ISFORT data), whereas the level calculation uses hospital, upper secondary school and station: leisure and retail do not appear. It is the first thing noticed by anyone who reads the two documents one after the other, and it is the most likely criticism in a scientific review.
The separation between level calculation and algorithm, clarified on 10 September, answers this criticism, provided that it is written into D3.1. The algorithm receives the levels, computed separately, and produces the tessellation. The three services belong to the level calculation, and they are three because today they are the ones available with national coverage and at municipal granularity. The day reliable data on commercial services and leisure exist, they enter the level rules and the algorithm runs identically: no line of the calculation engine changes, and the two tessellations are comparable because they are produced by the same engine.
Put this way, the limitation is a condition of the data with a declared way out, not a flaw of the method. And the separation has a value that goes beyond answering this criticism: an algorithm that receives levels, weights and two matrices is reusable on other territorial units and in other contexts, and it is the natural interface of the public library D3.5. It is also the reason why criteria I1-I5 of the section Independence of the algorithm from data and context are not formalities: they make the claim verifiable rather than declarative.
Horizontal relations no longer have a representation in the algorithm, and this must be written down. D1.2, in chapter 2 («Understanding the building blocks of local systems delimitation»), distinguishes vertical relations, between centres of different order, from horizontal ones, between centres of similar size or function without a dominant centre, and concludes that the delineation of local systems «requires a dual analytical lens that captures both dimensions». The system with two equal centres of phase 4, present in the GSSI draft of 25 August with the example of Ardea and Pomezia, was the only point of the algorithm that represented the latter. With decision D13 phase 4 decides on population and systems with two equal centres no longer exist: all relations between centres become hierarchical. The choice is legitimate, and it is GSSI's; it must however be justified in D3.1, because a reviewer will compare it with D1.2. On 14 October GSSI proposed to justify it with the empirical problem of systems made up of a single municipality, which is what makes a hierarchical rule based on population necessary, without going back to D1.2. The justification holds; it remains useful to add a sentence stating that horizontal relations are left out of the algorithm by choice, because D1.2 names them explicitly and whoever reads the two documents one after the other otherwise sees them disappear without explanation. GSSI agreed the same day to add it. Together with this, on 12 October GSSI took on to explain in D3.1 the use of the data on services as indirect indicators of other data, with references to the literature, and the fact that the dimensions of daily life of D1.2 enter the algorithm only through the level calculation.
Commuting serves to validate, not to compute. With decision D8 commuting flows left the algorithm, replaced by population as a tie-break criterion, and the drafts of 17 September and 12 October confirm this. The downstream use remains: the share of trips that remain within each system (metric V1) is the right measure for validating the result, and in that function there is nothing to justify.
Thresholds computed as a percentile are hard to defend in a simulator. A percentile is recomputed each time on the data: changing a rule of the level calculation changes the set of centralities, changes the distribution, and changes the contiguity threshold even though nobody has touched it. The draft of 17 September sets the thresholds at constant values (3.09% and 20 minutes), in line with this observation; the percentile remains the way in which the value was proposed, and it is documented in decision D15. It remains to be measured, as soon as the data are available, how many pairs of neighbouring centralities pass the two filters: if almost all of them do, the merges of phase 2 almost always occur and the result of the level calculation matters little.
What was verified. The code of the «maps-slo» library (deliverable D3.5), version 0.1.0, commit 53f71d9 of 5 November 2026: the level calculation and the aggregation algorithm, with the application to the Italian municipalities. The Stata routine delivered by GSSI on 16 October does not incorporate the decisions taken from 7 October onwards (D13-D26) and has not been rewritten: the code was therefore developed starting from the specification of appendix A1.
Environment. Python 3.13.11 on Linux x86_64, 16 processors, numpy 2.5.4, pandas 3.1.1; the manifest of each run records machine and versions.
Evidence. 168 automated tests, all passed, whose names carry the identifier of the criterion they verify; the national run of 5 November 2026 on the 7,896 municipalities of 2025, repeated twice with identical outcome and a third time with the distance threshold at 30 minutes; the national checks on the output. The criterion-by-criterion table is produced by a tool of the library from the test report and the national checks, and regenerates identically.
Data. The levels input to the national run are those computed by GSSI with the routine of 16 October: the data on services for all the municipalities, needed for the level calculation according to decision D16, are not yet available. The level calculation is verified on the constructed test cases (C1-C6) and compared with the GSSI levels on the 1,259 centralities: levels 1-3 all coincide, levels 4-6 differ because the routine uses definitions of the services different from D16. The 2021 time matrix is brought to the 2025 municipalities according to decision D10.
Result of the national run. 991 systems, of which 29 made up of a single municipality; 3 distant municipalities (Capraia Isola, Ponza, Ventotene); 2 municipalities without times (Isole Tremiti, Misiliscemi). After the downstream corrections (decision D18) the systems are 985. The computation of phases 2-4 takes less than half a second; the complete run between 14 and 31 seconds, almost all of it to load the travel time matrix into memory.
| Outcome | Criteria |
|---|---|
| satisfied, with tests or national run | 44 |
| satisfied, by code reading | 2 (R2, P3) |
| not verifiable | 2 (R3, O1) |
| not satisfied | 0 |
| Criterion | Outcome | Evidence |
|---|---|---|
| R1 | satisfied | 1 test and national run |
| R2 | satisfied, by code reading | src/maps_slo/cli.py: every parameter and every input path come from the scenario; the --manifest-extra option is only copied into the manifest |
| R3 | not verifiable | requires a run on a second machine, not yet done |
| R4 | satisfied | 6 tests |
| R5 | satisfied | 2 tests |
| R6 | satisfied | 1 test and national run: the reassignment table is built from the ISTAT list of the 2021-2025 changes (14 mergers and 2 code changes due to a change of province), and the reassignment stops if a 2021 code is neither among the 2025 municipalities nor in the table; the municipalities without times are two, Misiliscemi (separation) and Isole Tremiti (no road connection) |
| C1 | satisfied | 1 test and national run: levels all within the declared scheme; no municipality with two classes by construction, because the input identifiers are unique (criterion I1) |
| C2 | satisfied | 2 tests |
| C3 | satisfied | 1 test |
| C4 | satisfied | 2 tests |
| C5 | satisfied | 3 tests |
| C6 | satisfied | 1 test |
| I1 | satisfied | 3 tests |
| I2 | satisfied | 5 tests |
| I3 | satisfied | 2 tests |
| I4 | satisfied | 2 tests |
| I5 | satisfied | 1 test |
| I6 | satisfied | 6 tests |
| I7 | satisfied | 1 test |
| A1 | satisfied | 1 test |
| A2 | satisfied | 1 test |
| A3 | satisfied | 1 test |
| A4 | satisfied | 2 tests |
| A5 | satisfied | 1 test |
| A6 | satisfied | 6 tests |
| A7 | satisfied | 1 test |
| A8 | satisfied | 3 tests |
| A9 | satisfied | 2 tests |
| A10 | satisfied | 2 tests, one of which on two runs with different sets of centralities; manifest of the national run |
| A11 | satisfied | 1 test |
| A12 | satisfied | 12 tests |
| S1 | satisfied | national run |
| S2 | satisfied | 1 test |
| S3 | satisfied | 6 tests |
| S4 | satisfied | 2 tests |
| S5 | satisfied | 2 tests and national run |
| S6 | satisfied | 1 test and national run |
| S7 | satisfied | 1 test |
| S8 | satisfied | 1 test and national run |
| O1 | not verifiable | depends on the schema of the WP2 attractors table (decision D9), not yet defined |
| O1b | satisfied | 1 test |
| O2 | satisfied | 1 test and national run |
| O3 | satisfied | 1 test and national run |
| O5 | satisfied | 1 test |
| O6 | satisfied | 2 tests |
| P1 | satisfied | national run |
| P2 | satisfied | 1 test and national run |
| P3 | satisfied, by code reading | the library has no geographic or route-computation dependencies, and the construction of the problem reads only the time and contiguity tables; the 30-minute variant reports its own times |
Clarifications of the specification arising from the verification. The comparison between code and specification led to writing in appendix A1 five points that the version of 15 October did not state or stated imprecisely: the determinism rule of phase 4 described in the section Points still open; the «incomplete data» outcome of the level calculation; the municipalities without times, which in MAPS are two and not one; the exact meaning of four fields of the municipalities table (full label of a merged centre, time of a centrality claimed in phase 4, distant municipality, assignment phase); the code changes without change of territory in the reassignment to 2025.
Safeguards of the verification. The acceptance criteria were set and discussed with GST and GSSI before the code existed (section Purpose and object of the verification), and every outcome rests on evidence that anyone can repeat: the automated tests, the national run and the table linking them to the criteria are regenerated identically from the stated commit. Development and verification were not assigned to separate parties; for this reason the verification provides for two external checks, not yet concluded: the comparison with the output of the GSSI Stata routine, which requires the files produced by the GSSI run, not yet received, and the review of the constructed test cases by GSSI, collected in appendix A2 (Italian only: A2-test-cases). On 5 November 2026 the code and the documents were also compared point by point with the specification, using automated analysis tools; the findings are incorporated in this version.
Done. The acceptance criteria are at their third version (15 October 2026), and the verification has been carried out (section Verification outcome). They incorporate the twelve decisions of the call of 10 September and the nine of the call of 7 October, confirmed by GSSI on 12 October together with the new draft of the methodology, and the four answers of GSSI of 13 October on the cases the draft did not regulate; the specification of appendix A1 is aligned to the same decisions. Compared with the second version, criteria O4, M1, M2 and M3 and metric V7 are removed, and move to the national dataset D3.4, and criterion R6 and metric V10 are added. From this version the list of criteria is frozen.
Next steps.