Job shop
All formats · Reader spec · Cases and output
jobshop.iris reads job and machine counts, then one
(machine, duration) pair per operation in each job. Machine numbers
start at 0. Free text, # comments, and +++ separators are skipped.
Each job must use every machine once. Data contains the counts and
two-dimensional machine and duration arrays, plus name when present.
The format sources are the OR-Library job shop documentation and the format description at the start of jobshop1.txt, also used by JSPLIB. The reader spec is copied verbatim from Gecode’s job-shop.cpp.
- or-library has three jobs and three machines,
a description, separators, and
instance handmade-or. Itsparams.jsonselects that instance by name. - jsplib has a different 3×3 instance with comment headers and no instance name.
- duplicate-machine uses machine 0 twice
in the first job. The reference reports
E-CHECK-FAILEDwith record path[0].
The instances statement also supports files with several instances;
these samples each contain one. 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.
duplicate-machine
A job uses machine zero twice
Parameters: instance=handmade-invalid
E-CHECK-FAILED
check failed for record 1 of 'jobs': a job uses a machine twice; each job must use every machine once
iris read formats/jobshop/jobshop.iris formats/jobshop/cases/duplicate-machine/input.txt --dzn --param instance=handmade-invalidformats/jobshop/cases/duplicate-machine/input.txt:3:1: check failed for record 1 of 'jobs': a job uses a machine twice; each job must use every machine once
3 | 0 2 0 3 2 1
| ^
while reading: instance [1]
spec: formats/jobshop/jobshop.iris:21
Input rejected
jsplib
Three-job instance with JSPLIB comments
dzn
iris read formats/jobshop/jobshop.iris formats/jobshop/cases/jsplib/input.txt --dznJSON
iris read formats/jobshop/jobshop.iris formats/jobshop/cases/jsplib/input.txt --jsonSummary
iris read formats/jobshop/jobshop.iris formats/jobshop/cases/jsplib/input.txt --summaryor-library
Named three-job instance with OR-Library wrappers
Parameters: instance=handmade-or
dzn
iris read formats/jobshop/jobshop.iris formats/jobshop/cases/or-library/input.txt --dzn --param instance=handmade-orJSON
iris read formats/jobshop/jobshop.iris formats/jobshop/cases/or-library/input.txt --json --param instance=handmade-orSummary
iris read formats/jobshop/jobshop.iris formats/jobshop/cases/or-library/input.txt --summary --param instance=handmade-or