Shifts
Every created shift creates a trip. You can easily create multiple shifts per resource per day.
Check out the Shift schema here for more information.
{
"resources": [
{
"name": "R-1",
"start": {
"latitude": 50.923554431590595,
"longitude": 4.890691212789399
},
"shifts": [
{
"from": "2023-01-01T08:00:00",
"to": "2023-01-01T10:00:00"
},
{
"from": "2023-01-01T14:00:00",
"to": "2023-01-01T17:00:00"
},
{
"from": "2023-01-02T14:00:00",
"to": "2023-01-02T17:00:00",
"overtimeEnd": "2023-01-02T19:00:00"
}
]
},
{
"name": "R-2",
"start": {
"latitude": 50.13244568727387,
"longitude": 4.541447618241604
},
"shifts": [
{
"from": "2023-01-01T08:00:00",
"to": "2023-01-01T10:00:00"
}
]
}
],
"jobs": [
{
"name": "JOB-1",
"location": {
"latitude": 50.54963315022148,
"longitude": 4.848855475505483
},
"duration": 3600
},
{
"name": "JOB-2",
"location": {
"latitude": 50.65910297910443600,
"longitude": 4.007987934186738
},
"duration": 3600
},
{
"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
},
{
"name": "JOB-11",
"location": {
"latitude": 50.53056087774939,
"longitude": 4.282406918673002
},
"duration": 3600
},
{
"name": "JOB-12",
"location": {
"latitude": 50.519348446781116,
"longitude": 4.36006931427360264
},
"duration": 3600
},
{
"name": "JOB-13",
"location": {
"latitude": 50.87057720121589,
"longitude": 4.805958437379695
},
"duration": 3600
},
{
"name": "JOB-14",
"location": {
"latitude": 50.11812826431248,
"longitude": 4.062272710168633600
},
"duration": 3600
},
{
"name": "JOB-15",
"location": {
"latitude": 50.6360015506794105,
"longitude": 4.411104770406091
},
"duration": 3600
}
],
"options": {
"partialPlanning": true
}
}
{
"score": {
"hardScore": 0,
"mediumScore": -28800,
"softScore": -19754,
"feasible": true
},
"trips": [
{
"visits": [
{
"arrival": "2023-01-01T14:21:30",
"job": "JOB-13",
"location": "50.87057720121589;4.805958437379695",
"breakTime": 0
},
{
"arrival": "2023-01-01T15:54:45",
"job": "JOB-6",
"location": "50.89633806889935;4.45161298168845",
"breakTime": 0
}
],
"resource": "R-1",
"date": "2023-01-01",
"departureTime": "2023-01-01T14:00:00",
"waitTime": 0,
"travelTime": 3285,
"workTime": 10485,
"serviceTime": 7200
},
{
"visits": [
{
"arrival": "2023-01-02T15:15:13",
"job": "JOB-11",
"location": "50.53056087774939;4.282406918673002",
"breakTime": 0
},
{
"arrival": "2023-01-02T16:25:19",
"job": "JOB-12",
"location": "50.519348446781116;4.360069314273603",
"breakTime": 0
},
{
"arrival": "2023-01-02T17:39:50",
"job": "JOB-7",
"location": "50.48191907288704;4.311723085641562",
"breakTime": 0
}
],
"resource": "R-1",
"date": "2023-01-02",
"departureTime": "2023-01-02T14:00:00",
"waitTime": 0,
"travelTime": 5990,
"workTime": 16790,
"serviceTime": 10800
},
{
"visits": [
{
"arrival": "2023-01-01T08:15:38",
"job": "JOB-9",
"location": "50.09960152277046;4.465866983600702",
"breakTime": 0
}
],
"resource": "R-2",
"date": "2023-01-01",
"departureTime": "2023-01-01T08:00:00",
"waitTime": 0,
"travelTime": 938,
"workTime": 4538,
"serviceTime": 3600
},
{
"visits": [
{
"arrival": "2023-01-01T08:58:55",
"job": "JOB-15",
"location": "50.63600155067941;4.411104770406091",
"breakTime": 0
}
],
"resource": "R-1",
"date": "2023-01-01",
"departureTime": "2023-01-01T08:00:00",
"waitTime": 0,
"travelTime": 3535,
"workTime": 7135,
"serviceTime": 3600
}
],
"totalTravelTimeInSeconds": 13748,
"totalServiceTimeInSeconds": 25200,
"workloadFairness": 0.2,
"unserved": [
"JOB-1",
"JOB-2",
"JOB-3",
"JOB-4",
"JOB-5",
"JOB-8",
"JOB-10",
"JOB-14"
],
"status": "SOLVED"
}
{
"score": {
"hardScore": 0,
"mediumScore": -28800,
"softScore": -19754,
"feasible": true
},
"conflicts": [
{
"constraint": "Shift End Conflict",
"score": "-5990hard",
"resource": "R-1"
}
],
"unresolved": [
{
"constraint": "SHIFT_END_CONFLICT",
"score": "-5990hard"
},
{
"constraint": "JOB_DAY_INDEX",
"score": "-16soft"
},
{
"constraint": "TRAVEL_TIME",
"score": "-13748soft"
},
{
"constraint": "UNUSED_RESOURCES",
"score": "-28800medium"
}
]
}
Updated 7 months ago