Suggestions

Do you want to connect the Routing engine to your own planning system? Maybe you want to most optimal available
timeslots?

Say for instance that you have a fleet of 10 technicians for the next 2 weeks. You want to know the best timeslots for
each technician to visit a new customer visit.
You can use the suggest endpoint to get the best timeslot for each technician.

The solution will list the best timeslots for each technician in the suggestions section:

{
  "suggestions": [
    {
      "score": {
        "hardScore": 0,
        "mediumScore": 0,
        "softScore": -301,
        "feasible": true
      },
      "resource": "R-1",
      "date": "2023-01-13T08:10:00",
      "executedAfter": "JOB-1"
    }
  ]
}

The suggest endpoint can generate suggestions for one job or one job relation. In a suggest request the jobs that
are already planned need to be initialised using initialResource and initialArrival. By default, the solution will report only feasible timeslots
, however this can be changed in the options (by setting onlyFeasibleSuggestions to false). Additionally the list can be limited by maxSuggest option.

{
  "resources": [
    {
      "name": "R-1",
      "shifts": [
        {
          "from": "2023-01-13T08:00:00",
          "to": "2023-01-13T18:30:00"
        }
      ]
    },
    {
      "name": "R-2",
      "shifts": [
        {
          "from": "2023-01-13T08:00:00",
          "to": "2023-01-13T18:30:00"
        }
      ]
    }
  ],
  "jobs": [
    {
      "name": "JOB-1",
      "initialArrival": "2023-01-13T08:01:00",
      "initialResource": "R-2",
      "duration": 600
    },
    {
      "name": "JOB-2 is unplanned",
      "duration": 600
    },
    {
      "name": "JOB-3",
      "initialArrival": "2023-01-13T08:20:00",
      "initialResource": "R-1",
      "duration": 600
    },
    {
      "name": "JOB-4",
      "initialArrival": "2023-01-13T08:30:00",
      "initialResource": "R-1",
      "duration": 600
    },
    {
      "name": "JOB-5",
      "initialArrival": "2023-01-13T08:35:00",
      "initialResource": "R-1",
      "duration": 600
    }
  ],
  "options": {
      "maxSuggest" : 3,
      "onlyFeasibleSuggestions" : true
  }
}
{
  "score": {
    "hardScore": 0,
    "mediumScore": 0,
    "softScore": -301,
    "feasible": true
  },
  "trips": [
    {
      "visits": [
        {
          "arrival": "2023-01-13T08:00:00",
          "job": "JOB-1"
        },
        {
          "arrival": "2023-01-13T08:10:00",
          "job": "JOB-2 is unplanned"
        },
        {
          "arrival": "2023-01-13T08:20:00",
          "job": "JOB-3"
        },
        {
          "arrival": "2023-01-13T08:30:00",
          "job": "JOB-4"
        },
        {
          "arrival": "2023-01-13T08:40:00",
          "job": "JOB-5"
        }
      ],
      "resource": "R-1",
      "date": "2023-01-13",
      "departureTime": "2023-01-13T08:00:00",
      "waitTime": 0,
      "travelTime": 0,
      "workTime": 3000,
      "serviceTime": 3000
    }
  ],
  "totalTravelTimeInSeconds": 0,
  "totalServiceTimeInSeconds": 3000,
  "workloadFairness": 1.5,
  "suggestions": [
    {
      "score": {
        "hardScore": 0,
        "mediumScore": 0,
        "softScore": -301,
        "feasible": true
      },
      "resource": "R-1",
      "date": "2023-01-13T08:10:00",
      "executedAfter": "JOB-1"
    },
    {
      "score": {
        "hardScore": 0,
        "mediumScore": 0,
        "softScore": -901,
        "feasible": true
      },
      "resource": "R-1",
      "date": "2023-01-13T08:00:00",
      "executedAfter": "R-12023-01-13"
    },
    {
      "score": {
        "hardScore": 0,
        "mediumScore": 0,
        "softScore": -901,
        "feasible": true
      },
      "resource": "R-1",
      "date": "2023-01-13T08:20:00",
      "executedAfter": "JOB-3"
    },
    {
      "score": {
        "hardScore": 0,
        "mediumScore": 0,
        "softScore": -1501,
        "feasible": true
      },
      "resource": "R-1",
      "date": "2023-01-13T08:30:00",
      "executedAfter": "JOB-4"
    },
    {
      "score": {
        "hardScore": 0,
        "mediumScore": 0,
        "softScore": -1501,
        "feasible": true
      },
      "resource": "R-1",
      "date": "2023-01-13T08:40:00",
      "executedAfter": "JOB-5"
    }
  ],
  "status": "SOLVED"
}