{
  "id": "or-library",
  "title": "Named three-job instance with OR-Library wrappers",
  "input": {
    "path": "formats/jobshop/cases/or-library/input.txt",
    "text": "Hand-made OR-Library style file\n+++++++++++++++++++++++++++++\ninstance handmade-or\n+++++++++++++++++++++++++++++\nThree jobs on three machines\n3 3\n0 2 1 3 2 1\n1 1 2 4 0 2\n2 3 0 1 1 2\n"
  },
  "params": [
    {
      "name": "instance",
      "value": "handmade-or"
    }
  ],
  "commands": {
    "readJson": "iris read formats/jobshop/jobshop.iris formats/jobshop/cases/or-library/input.txt --json --param instance=handmade-or",
    "readDzn": "iris read formats/jobshop/jobshop.iris formats/jobshop/cases/or-library/input.txt --dzn --param instance=handmade-or",
    "readSummary": "iris read formats/jobshop/jobshop.iris formats/jobshop/cases/or-library/input.txt --summary --param instance=handmade-or",
    "errorJson": null
  },
  "result": {
    "kind": "success",
    "json": "{\"iris\":\"0.1\",\"entries\":[{\"name\":\"name\",\"type\":\"string\",\"depth\":0,\"value\":\"handmade-or\"},{\"name\":\"n_jobs\",\"type\":\"int\",\"depth\":0,\"value\":3},{\"name\":\"n_machines\",\"type\":\"int\",\"depth\":0,\"value\":3},{\"name\":\"machine\",\"type\":\"int\",\"depth\":2,\"value\":[[0,1,2],[1,2,0],[2,0,1]]},{\"name\":\"duration\",\"type\":\"int\",\"depth\":2,\"value\":[[2,3,1],[1,4,2],[3,1,2]]}]}\n",
    "dzn": "name = \"handmade-or\";\nn_jobs = 3;\nn_machines = 3;\nmachine = [| 0, 1, 2\n  | 1, 2, 0\n  | 2, 0, 1 |];\nduration = [| 2, 3, 1\n  | 1, 4, 2\n  | 3, 1, 2 |];\n",
    "summary": "formats/jobshop/cases/or-library/input.txt [jobshop]\n  name: string \"handmade-or\"\n  n_jobs: int 3\n  n_machines: int 3\n  machine: int array 3 x 3\n  duration: int array 3 x 3\n"
  },
  "catalog": {
    "command": "iris list formats/jobshop/jobshop.iris formats/jobshop/cases/or-library/input.txt",
    "text": "formats/jobshop/cases/or-library/input.txt: 1 instance\n  1 handmade-or\n",
    "dznCommand": "iris list formats/jobshop/jobshop.iris formats/jobshop/cases/or-library/input.txt --dzn",
    "dzn": "instances = 1;\nname = [\"handmade-or\"];\n"
  },
  "downloads": {
    "input": "/examples/formats/jobshop/cases/or-library/input.txt",
    "spec": "/examples/formats/jobshop/jobshop.iris",
    "data.json": "/examples/formats/jobshop/cases/or-library/data.json",
    "data.dzn": "/examples/formats/jobshop/cases/or-library/data.dzn",
    "summary.txt": "/examples/formats/jobshop/cases/or-library/summary.txt",
    "catalog.txt": "/examples/formats/jobshop/cases/or-library/catalog.txt",
    "catalog.dzn": "/examples/formats/jobshop/cases/or-library/catalog.dzn",
    "case": "/examples/formats/jobshop/cases/or-library/case.json"
  },
  "spec": {
    "path": "formats/jobshop/jobshop.iris",
    "text": "format jobshop\n\ncomment \"#\" \"+++\"\ninstances {\n  sections skip other {\n    \"instance {name:word}\" optional\n    \"{n_jobs:1..} {n_machines:1..}\" last {\n      check n_jobs <= (gecode.int_max - 2) / 2 / n_machines \"there are too many jobs and machines\"\n\n      repeat n_jobs as jobs {\n        each job\n        repeat n_machines as steps {\n          each step\n          machine: 0..<n_machines\n          duration: 0..\n        }\n      }\n    }\n  }\n\n  check distinct(job.machine) \"a job uses a machine twice; each job must use every machine once\"\n  check sum(j in jobs: sum(j.duration)) <= gecode.int_max \"the total duration is too large\"\n}\n"
  }
}
