{
  "id": "jsplib",
  "title": "Three-job instance with JSPLIB comments",
  "input": {
    "path": "formats/jobshop/cases/jsplib/input.txt",
    "text": "# Hand-made JSPLIB style file\n# Jobs and machines, then machine-duration pairs\n3 3\n0 3 2 2 1 4\n1 2 0 1 2 3\n2 4 1 3 0 2\n"
  },
  "params": [],
  "commands": {
    "readJson": "iris read formats/jobshop/jobshop.iris formats/jobshop/cases/jsplib/input.txt --json",
    "readDzn": "iris read formats/jobshop/jobshop.iris formats/jobshop/cases/jsplib/input.txt --dzn",
    "readSummary": "iris read formats/jobshop/jobshop.iris formats/jobshop/cases/jsplib/input.txt --summary",
    "errorJson": null
  },
  "result": {
    "kind": "success",
    "json": "{\"iris\":\"0.1\",\"entries\":[{\"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,2,1],[1,0,2],[2,1,0]]},{\"name\":\"duration\",\"type\":\"int\",\"depth\":2,\"value\":[[3,2,4],[2,1,3],[4,3,2]]}]}\n",
    "dzn": "n_jobs = 3;\nn_machines = 3;\nmachine = [| 0, 2, 1\n  | 1, 0, 2\n  | 2, 1, 0 |];\nduration = [| 3, 2, 4\n  | 2, 1, 3\n  | 4, 3, 2 |];\n",
    "summary": "formats/jobshop/cases/jsplib/input.txt [jobshop]\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/jsplib/input.txt",
    "text": "formats/jobshop/cases/jsplib/input.txt: 1 instance\n",
    "dznCommand": "iris list formats/jobshop/jobshop.iris formats/jobshop/cases/jsplib/input.txt --dzn",
    "dzn": "instances = 1;\n"
  },
  "downloads": {
    "input": "/examples/formats/jobshop/cases/jsplib/input.txt",
    "spec": "/examples/formats/jobshop/jobshop.iris",
    "data.json": "/examples/formats/jobshop/cases/jsplib/data.json",
    "data.dzn": "/examples/formats/jobshop/cases/jsplib/data.dzn",
    "summary.txt": "/examples/formats/jobshop/cases/jsplib/summary.txt",
    "catalog.txt": "/examples/formats/jobshop/cases/jsplib/catalog.txt",
    "catalog.dzn": "/examples/formats/jobshop/cases/jsplib/catalog.dzn",
    "case": "/examples/formats/jobshop/cases/jsplib/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"
  }
}
