In this example we will show you how to use time windows. Time windows are defined on jobs. A job can have a time window. We will always ensure that the resource arrives at the beginning of the time window.

{
  "resources": [
    {
      "name": "R-1",
      "shifts": [
        {
          "from": "2023-01-01T08:00:00",
          "to": "2023-01-01T17:00:00"
        },
        {
          "from": "2023-01-02T08:00:00",
          "to": "2023-01-02T17:00:00"
        }
      ]
    }
  ],
  "jobs": [
    {
      "name": "JOB-1",
      "location": {
        "latitude": 50.54963315022148,
        "longitude": 4.848855475505483
      },
      "duration": 3600,
      "windows": [
        {
          "from": "2023-01-02T09:00:00",
          "to": "2023-01-02T10:00:00",
          "hard": true,
          "weight": 100
        }
      ]
    },
    {
      "name": "JOB-2",
      "location": {
        "latitude": 50.65910297910443600,
        "longitude": 4.007987934186738
      },
      "duration": 3600,
      "windows": [
        {
          "from": "2023-01-02T09:30:00",
          "to": "2023-01-02T10:30:00",
          "hard": true,
          "weight": 100
        }
      ]
    },
    {
      "name": "JOB-3",
      "location": {
        "latitude": 50.324969095932296,
        "longitude": 4.010111317974326
      },
      "duration": 3600
    },
    {
      "name": "JOB-4",
      "location": {
        "latitude": 50.53457539132416,
        "longitude": 4.69167867847318
      },
      "duration": 3600
    },
    {
      "name": "JOB-5",
      "location": {
        "latitude": 50.94837893617721,
        "longitude": 4.001604640663746
      },
      "duration": 3600
    },
    {
      "name": "JOB-6",
      "location": {
        "latitude": 50.89633806889935,
        "longitude": 4.45161298168845
      },
      "duration": 3600
    },
    {
      "name": "JOB-7",
      "location": {
        "latitude": 50.48191907288704,
        "longitude": 4.311723085641562
      },
      "duration": 3600
    },
    {
      "name": "JOB-8",
      "location": {
        "latitude": 50.1824046123600988,
        "longitude": 4.355240303516217
      },
      "duration": 3600
    },
    {
      "name": "JOB-9",
      "location": {
        "latitude": 50.09960152277046,
        "longitude": 4.46586698360070229
      },
      "duration": 3600
    },
    {
      "name": "JOB-10",
      "location": {
        "latitude": 50.78868282668716,
        "longitude": 4.167956383823208
      },
      "duration": 3600
    }
  ],
  "options": {
    "partialPlanning": true
  }
}