{
  "title": "Problem Data",
  "description": "The data required to present a problem for solving with VRSolver",
  "definitions": {
    "Job": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "ID": {
          "type": "string"
        },
        "UnassignedWeight": {
          "type": "number"
        },
        "Parts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/JobPart"
          }
        }
      },
      "required": [
        "ID",
        "UnassignedWeight",
        "Parts"
      ]
    },
    "JobPart": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "LoadChange": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "type": "number"
          }
        },
        "ID": {
          "type": "string"
        },
        "WindowOpen": {
          "type": "string",
          "format": "date-time"
        },
        "WindowClose": {
          "type": "string",
          "format": "date-time"
        },
        "SoftWindowClose": {
          "type": "string",
          "format": "date-time"
        },
        "SoftWindowIsUsed": {
          "type": "boolean"
        },
        "JobTime": {
          "type": "string"
        },
        "Loc": {
          "$ref": "#/definitions/Location"
        },
        "Position": {
          "type": "integer",
          "enum": [
            0,
            1
          ]
        },
        "Type": {
          "type": "integer",
          "enum": [
            0,
            1
          ]
        },
        "Label": {
          "type": [
            "string",
            "null"
          ]
        },
        "ExternalID": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "ID",
        "WindowOpen",
        "WindowClose",
        "JobTime",
        "Loc"
      ]
    },
    "Location": {
      "type": "object",
      "properties": {
        "Index": {
          "type": "integer"
        },
        "Lat": {
          "type": "number"
        },
        "Long": {
          "type": "number"
        },
        "ID": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "Index"
      ]
    },
    "Resource": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "MaxWorkTime": {
          "type": "string"
        },
        "MaxDrivingTime": {
          "type": "string"
        },
        "MaxWorkTimeSoftConstraint": {
          "type": "string"
        },
        "MaxWorkTimeSoftConstraintWeight": {
          "type": "number"
        },
        "MinWorkTimeSoftConstraint": {
          "type": "string"
        },
        "MinWorkTimeSoftConstraintWeight": {
          "type": "number"
        },
        "MaxJobTimeSoftConstraint": {
          "type": "string"
        },
        "MaxJobTimeSoftConstraintWeight": {
          "type": "number"
        },
        "MinJobTimeSoftConstraint": {
          "type": "string"
        },
        "MinJobTimeSoftConstraintWeight": {
          "type": "number"
        },
        "MaxLoad": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "type": "number"
          }
        },
        "ID": {
          "type": "string"
        },
        "ExternalID": {
          "type": [
            "string",
            "null"
          ]
        },
        "TimeMatrixIndex": {
          "type": "integer"
        },
        "EarliestStart": {
          "type": "string",
          "format": "date-time"
        },
        "LatestStart": {
          "type": "string",
          "format": "date-time"
        },
        "LatestReturn": {
          "type": "string",
          "format": "date-time"
        },
        "StartLocation": {
          "$ref": "#/definitions/Location"
        },
        "EndLocation": {
          "$ref": "#/definitions/Location"
        },
        "ServiceTimeMultiplier": {
          "type": "number"
        },
        "UseCost": {
          "type": "number"
        }
      },
      "required": [
        "ID",
        "TimeMatrixIndex",
        "EarliestStart",
        "LatestStart",
        "LatestReturn",
        "StartLocation",
        "EndLocation",
        "UseCost"
      ]
    },
    "ResourceJob": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "JobID": {
          "type": "string"
        },
        "ResourceID": {
          "type": "string"
        }
      },
      "required": [
        "JobID",
        "ResourceID"
      ]
    },
    "TravelTime": {
      "type": "array",
      "properties": {
        "Distance": {
          "type": "number"
        },
        "TimeSpan": {
          "type": "string"
        }
      },
      "required": [
        "Distance",
        "TimeSpan"
      ]
    }
  },
  "type": "object",
  "properties": {
    "Jobs": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Job"
      }
    },
    "Resources": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Resource"
      }
    },
    "FixedAssigns": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/ResourceJob"
      }
    },
    "NotAssigns": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/ResourceJob"
      }
    },
    "TravelTimes": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/TravelTime"
      }
    },
    "LeaveStartLocationAsLateAsPossible": {
      "type": "boolean"
    },
    "MaxWorkTime": {
      "type": "string"
    },
    "MaxDrivingTime": {
      "type": "string"
    },
    "TotalDistanceWeight": {
      "type": "number"
    },
    "TotalLatenessWeight": {
      "type": "number"
    },
    "TotalWorkTimeWeight": {
      "type": "number"
    }
  },
  "required": [
    "Jobs",
    "Resources",
    "TravelTimes"
  ]
}