TSPTW
All formats · Reader spec · Cases and output
tsptw.iris reads the node count (including the depot), a
square travel-time matrix, then each node’s ready and due times. Node 0
is the depot. The spec requires each time window to be ordered and the
depot to open at time 0. Data contains n, dist, ready, and due.
The format source is López-Ibáñez and Blum’s TSPTW instance format. The reader spec is copied verbatim from Gecode’s tsptw.cpp.
- three-nodes has a depot and two customers, with asymmetric travel times and valid windows.
- reversed-window gives the first customer
ready time 8 and due time 2. The reference reports
E-CHECK-FAILEDat line 6, column 1, with record path[1].
These are hand-made samples under the repository’s MIT license. See the library README for case layout, validation, and Gecode notices.
Reader spec
From Gecode commit 5e7bbd5c26b0702c6fd652356b2289da0710ac3c. Source notices.
Cases and output
Run the commands from the repository root. Successful reads show dzn, JSON, and a summary. Rejected inputs show the CLI's diagnostic and caret, with the stable error code beside it.
reversed-window
A customer closes before it opens
E-CHECK-FAILED
check failed for record 2 of 'nodes': the time window of a node is invalid
iris read formats/tsptw/tsptw.iris formats/tsptw/cases/reversed-window/input.txt --dznformats/tsptw/cases/reversed-window/input.txt:6:1: check failed for record 2 of 'nodes': the time window of a node is invalid
6 | 8 2
| ^
spec: formats/tsptw/tsptw.iris:14
Input rejected
three-nodes
Depot and two customers with valid time windows
dzn
iris read formats/tsptw/tsptw.iris formats/tsptw/cases/three-nodes/input.txt --dznJSON
iris read formats/tsptw/tsptw.iris formats/tsptw/cases/three-nodes/input.txt --jsonSummary
iris read formats/tsptw/tsptw.iris formats/tsptw/cases/three-nodes/input.txt --summary