terminalObject
An island is, by definition, an area of the topology that cannot be reached from anywhere else by ordinary travel. Terminals are what make it reachable: a terminal is an access point on an island, and each terminal declares the connections it offers to terminals elsewhere.
Terminals are authored as a map keyed by terminal name under
topography’s terminal. The key is the terminal’s
identifier — used for diagnostics and as the name another terminal’s connects targets.
-
atlocation - The terminal’s position within the topology.
-
connectsconnection - The terminals directly reachable from here, keyed by destination terminal name — see below.
How a cross-island journey is built
Section titled “How a cross-island journey is built”When the destination lies on a different island, the journey is composed of three legs:
- To the terminal. The resource travels from where it is to a terminal offering a connection to the destination island. Spiral optimises this leg — the terminal it uses is part of the schedule it is solving, not simply the closest one, so a terminal further away may win if the crossing or the onward leg makes the whole journey better.
- The connection. Spiral adds the crossing’s declared
time, and itsdistanceif one is given. This leg is not computed from the map — a ferry does not travel at road speeds, and its schedule is a property of the service, so it is stated rather than derived. - From the arrival terminal to the destination. Ordinary travel on the destination island, from the terminal the connection lands at to the final stop.
The three legs are summed into the journey’s distance and travel time, so a stop on another island costs what it really costs — and a resource with no viable route to that island simply cannot serve it.
connects
Section titled “connects”connects is a map keyed by destination terminal name; each value describes the crossing to that
terminal:
-
timetimeInterval - Scheduled crossing time from this terminal to the connected one.
-
distancedistancedefault0 - Distance covered by the crossing, added to the journey’s total. Available, but not used by any current map — every shipped crossing declares time alone and so contributes no distance. Stated rather than derived: the crossing does not follow the road network the map describes.
Connections are declared per direction. A crossing that runs both ways appears in both terminals’
connects maps — which is also how a one-way service, or an asymmetric crossing time, is expressed.
"terminal": { "Portsmouth": { "at": [50.7969, -1.1092], "connects": { "Guernsey": { "time": "24:00:00" }, "Jersey": { "time": "24:00:00" } } }, "Guernsey": { "at": [49.4598, -2.5353], "connects": { "Portsmouth": { "time": "24:00:00" } } }}Time alone is the shape every current map uses, and the one to copy. distance may be added to a
crossing — { "time": "24:00:00", "distance": "180km" } — but it defaults to 0, so a crossing that
omits it contributes travel time to the journey and no distance.
Reaching an island at all
Section titled “Reaching an island at all”An island with no terminal, or whose terminals offer no connection from anywhere a resource can be, is unreachable — stops on it cannot be served. That is a modelling decision rather than a fault, and it is the mechanism behind an island being excluded from an operation: remove the connection and the island leaves the servable world.
Related
Section titled “Related”- islandObject — the areas terminals exist to connect
- topographyObject
- distance · timeInterval