{
  "id": "missing-weights",
  "title": "Explicit distances require an edge weight section",
  "input": {
    "path": "formats/tsplib/cases/missing-weights/input.txt",
    "text": "NAME : handmade-missing-weights\nTYPE : TSP\nDIMENSION : 5\nEDGE_WEIGHT_TYPE : EXPLICIT\nEOF\n"
  },
  "params": [],
  "commands": {
    "readJson": "iris read formats/tsplib/tsplib.iris formats/tsplib/cases/missing-weights/input.txt --json",
    "readDzn": "iris read formats/tsplib/tsplib.iris formats/tsplib/cases/missing-weights/input.txt --dzn",
    "readSummary": "iris read formats/tsplib/tsplib.iris formats/tsplib/cases/missing-weights/input.txt --summary",
    "errorJson": "iris-driver read formats/tsplib/tsplib.iris formats/tsplib/cases/missing-weights/input.txt --params '{}'"
  },
  "result": {
    "kind": "error",
    "json": "{\"code\":\"E-CHECK-FAILED\",\"message\":\"check failed: no EDGE_WEIGHT_SECTION\",\"input_location\":{\"origin\":\"formats/tsplib/cases/missing-weights/input.txt\",\"line\":5,\"column\":4},\"spec_location\":{\"origin\":\"formats/tsplib/tsplib.iris\",\"line\":38,\"column\":null},\"context\":null,\"record_path\":[]}",
    "diagnostic": "formats/tsplib/cases/missing-weights/input.txt:5:4: check failed: no EDGE_WEIGHT_SECTION\n     5 | EOF\n       |    ^\nspec: formats/tsplib/tsplib.iris:38\n"
  },
  "catalog": null,
  "downloads": {
    "input": "/examples/formats/tsplib/cases/missing-weights/input.txt",
    "spec": "/examples/formats/tsplib/tsplib.iris",
    "error.json": "/examples/formats/tsplib/cases/missing-weights/error.json",
    "error.txt": "/examples/formats/tsplib/cases/missing-weights/error.txt",
    "case": "/examples/formats/tsplib/cases/missing-weights/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"
  }
}
