{
  "id": "euc-2d-five",
  "title": "Five cities given by two-dimensional coordinates",
  "input": {
    "path": "formats/tsplib/cases/euc-2d-five/input.txt",
    "text": "NAME : handmade-euc-2d-five\nTYPE : TSP\nDIMENSION : 5\nEDGE_WEIGHT_TYPE : EUC_2D\nNODE_COORD_TYPE : TWOD_COORDS\nNODE_COORD_SECTION\n1 0 0\n2 3 0\n3 3 4\n4 0 4\n5 1.5 2\nEOF\n"
  },
  "params": [],
  "commands": {
    "readJson": "iris read formats/tsplib/tsplib.iris formats/tsplib/cases/euc-2d-five/input.txt --json",
    "readDzn": "iris read formats/tsplib/tsplib.iris formats/tsplib/cases/euc-2d-five/input.txt --dzn",
    "readSummary": "iris read formats/tsplib/tsplib.iris formats/tsplib/cases/euc-2d-five/input.txt --summary",
    "errorJson": null
  },
  "result": {
    "kind": "success",
    "json": "{\"iris\":\"0.1\",\"entries\":[{\"name\":\"name\",\"type\":\"string\",\"depth\":0,\"value\":\"handmade-euc-2d-five\"},{\"name\":\"type\",\"type\":\"string\",\"depth\":0,\"value\":\"TSP\"},{\"name\":\"n\",\"type\":\"int\",\"depth\":0,\"value\":5},{\"name\":\"edge_weight_type\",\"type\":\"string\",\"depth\":0,\"value\":\"EUC_2D\"},{\"name\":\"node_coord_type\",\"type\":\"string\",\"depth\":0,\"value\":\"TWOD_COORDS\"},{\"name\":\"node\",\"type\":\"int\",\"depth\":1,\"value\":[1,2,3,4,5]},{\"name\":\"x\",\"type\":\"float\",\"depth\":1,\"value\":[0,3,3,0,1.5]},{\"name\":\"y\",\"type\":\"float\",\"depth\":1,\"value\":[0,0,4,4,2]}]}\n",
    "dzn": "name = \"handmade-euc-2d-five\";\n'type' = \"TSP\";\nn = 5;\nedge_weight_type = \"EUC_2D\";\nnode_coord_type = \"TWOD_COORDS\";\nnode = [1, 2, 3, 4, 5];\nx = [0.0, 3.0, 3.0, 0.0, 1.5];\ny = [0.0, 0.0, 4.0, 4.0, 2.0];\n",
    "summary": "formats/tsplib/cases/euc-2d-five/input.txt [tsplib]\n  name: string \"handmade-euc-2d-five\"\n  type: string \"TSP\"\n  n: int 5\n  edge_weight_type: string \"EUC_2D\"\n  node_coord_type: string \"TWOD_COORDS\"\n  node: int array 5\n  x: float array 5\n  y: float array 5\n"
  },
  "catalog": null,
  "downloads": {
    "input": "/examples/formats/tsplib/cases/euc-2d-five/input.txt",
    "spec": "/examples/formats/tsplib/tsplib.iris",
    "data.json": "/examples/formats/tsplib/cases/euc-2d-five/data.json",
    "data.dzn": "/examples/formats/tsplib/cases/euc-2d-five/data.dzn",
    "summary.txt": "/examples/formats/tsplib/cases/euc-2d-five/summary.txt",
    "case": "/examples/formats/tsplib/cases/euc-2d-five/case.json"
  },
  "spec": {
    "path": "formats/tsplib/tsplib.iris",
    "text": "format tsplib\n\ncomment \"COMMENT\"\nsections until \"EOF\" {\n  \"NAME : {name:rest}\" optional\n  \"TYPE : {type:word}\" optional\n  \"DIMENSION : {n:2..46340}\"\n  \"EDGE_WEIGHT_TYPE : {edge_weight_type:word}\" optional\n  \"EDGE_WEIGHT_FORMAT : {edge_weight_format:word}\" optional\n  \"NODE_COORD_TYPE : {node_coord_type:word}\" optional\n  \"DISPLAY_DATA_TYPE : {display_data_type:word}\" optional\n  \"NODE_COORD_SECTION\" optional {\n    repeat n {\n      node: int\n      x: float\n      y: float\n    }\n  }\n  \"EDGE_WEIGHT_SECTION\" optional {\n    if !defined(edge_weight_format) {\n      let edge_weight_format = \"FULL_MATRIX\"\n    }\n    weight[n][n]: 0..gecode.int_max / n layout edge_weight_format\n  }\n  \"DISPLAY_DATA_SECTION\" optional {\n    repeat n {\n      display_node: int\n      display_x: float\n      display_y: float\n    }\n  }\n}\nif !defined(edge_weight_type) {\n  let edge_weight_type = \"EXPLICIT\"\n}\n\nif edge_weight_type == \"EXPLICIT\" {\n  check defined(weight) \"no EDGE_WEIGHT_SECTION\"\n  check size(weight) == n \"edge weights do not match DIMENSION\"\n} else {\n  check edge_weight_type == \"EUC_2D\" ||\n    edge_weight_type == \"CEIL_2D\" ||\n    edge_weight_type == \"ATT\" ||\n    edge_weight_type == \"GEO\"\n    \"EDGE_WEIGHT_TYPE must be EXPLICIT, EUC_2D, CEIL_2D, ATT, or GEO\"\n  check defined(x) \"no NODE_COORD_SECTION\"\n  check size(x) == n \"coordinates do not match DIMENSION\"\n  check x >= -1e9 && x <= 1e9 && y >= -1e9 && y <= 1e9 \"coordinates must be between -1e9 and 1e9\"\n}\n"
  }
}
