DEV Community

Cover image for The Answer You Didn't Want: Fiskardo Evacuation Routing
Panagis Tzivras
Panagis Tzivras

Posted on

The Answer You Didn't Want: Fiskardo Evacuation Routing

During a wildfire, how long does it take to move people out of Fiskardo by road?

That was the question. It sounds like a database query, because it is one: load the road network, pick a start, run pgRouting's pgr_dijkstra, read the cost. Milliseconds of compute. One number.

The first number the twin gave me was absurd. And my instinct was to distrust the model. That instinct was correct, but for the wrong reasons. The model was not lying. My data was wrong in five ways. The sixth way was me.

This is the story of all six.

Round 1: The dead table

The routing query ran cleanly and returned plausible-looking paths. The problem: it was reading an old import table left over from an earlier iteration. The geometry looked like Kefalonia. The connectivity was garbage. The network I was querying was a ghost.

Lesson one of geospatial debugging: a query that runs is not a query that is right.

Round 2: The real network was somewhere else

The live road network lived in a different table. Not a bug, just archaeology. But it means everything the first queries "proved" was noise. I threw the results away and started over.

Round 3: cost_m is not a distance

The cost column in my routing table was named cost_m. I assumed meters. It was minutes. (pgRouting itself returns cost and agg_cost; the misleading name was ours.)

Every distance I had reported so far was actually a travel time. This is the kind of error that doesn't crash. It just quietly corrupts every conclusion you draw from it, forever, until someone reads the schema with suspicious eyes.

Round 4: Mixed SRIDs

Somewhere in the pipeline, two projections had crept in. Geometry in one spatial reference system was being measured against geometry in another. Distances were quietly, consistently wrong by a factor only a geodesist would guess.

A digital twin with two coordinate systems is not a twin. It is two maps arguing.

Round 5: The row-order bug

pgr_dijkstra returns path segments. The results looked scrambled: segments out of order, the route jumping back on itself.

The bug was mine. I was reading the result rows in the order the database happened to return them instead of ordering by seq. The path was correct the whole time. I was reading the sentence word by word, in a shuffled order, and calling it gibberish.

Round 6: The road that might not be there

The final answer was now stable. But it was still wrong in a way no query could detect.

The route took an enormous detour inland, ignoring a 15 km coastal road in favor of 29 km of mountain. The prime suspect is a connectivity gap on the Evreti stretch. A node that doesn't quite snap. Invisible to every attribute query. The autopsy is still open.

What we know for certain: the router prefers a 29 km detour over a 15 km coastal road, the road's data looks clean, and local knowledge says the road is fine. The model and the map disagree, and the argument is documented.

A suspected data gap, wearing a software bug's clothes.

The answer

After six rounds, the twin gave me its answer:

Agia Effimia Marina. 29.0 km. 44 minutes. 116 road segments.

That is the answer you didn't want. Forty-four minutes is not a comfortable number if you are standing in Fiskardo watching smoke. At every round of this forensic, a prettier wrong answer was available. Faster numbers. Shorter routes. Numbers that would have looked great in a demo.

The value of this digital twin was never going to be that it produces answers. Any GIS produces answers. The value is that this answer survived six rounds of me trying to break it, and it is still standing.

The lighthouse test

The same engine, asked a different question, once ranked an abandoned lighthouse on an uninhabited islet as the hardest place to reach in an emergency: 108.1 minutes from the nearest fire station. Island-wide worst. The tower was leveled in the Italian bombings of 1942; what remained was felled by the 1950 earthquake. Technically correct, contextually meaningless.

Put the two stories together and you get the real design principle:

The twin finds edge cases and reports reachability honestly. Humans supply context and priority.

A bombed lighthouse and a hospital get the same accessibility score. That is not a flaw in the model. That is the model telling you exactly which decisions it cannot make for you.

Why this matters for civil protection

Evacuation planning runs on numbers. If those numbers come from an unvalidated model with a dead table, a minutes-as-meters column, and an unsolved coastal detour, the plan is a rumor with a map attached.

The uncomfortable number, validated, is worth more than the comfortable one, invented. That is what "no black boxes" means in practice. Not a slogan on an open data page. Six rounds of forensic debugging before a single digit goes public.

Every model in ARGOS carries its validation with it: what was tested, against which events, what worked, what didn't. This routing layer is no exception.

The methodology, the code, and every wrong answer along the way are public. A map that argues back must also admit when it is unsure.

Links:

Built in Kefalonia. Watching over the places we call home.

Top comments (0)