0

I am working my way into the Here Tour and have already done some planning. However, I am now dealing with a problem where more is to be transported than the vehicles can carry.

Problem I want to transport 100 units to 10 points. I only have one vehicle with a capacity of 50, so I can't transport everything in one trip. The time and the distance that the vehicle travels are not limited.

I have already looked up what can be done with such a problem.

  1. use more vehicles
  2. use a bigger vehicle
  3. define a second shift for the vehicle so that it drives twice.

I would like to implement it as in solution 3). The number and the vehicles should not be changed. The vehicle should drive more often. But since I don't know how long the first trip will take. I cannot say when the second shift should start.

Do you have an idea how to solve this best.

1 Answers1

0

Using option#3 can easily solve the problem: In the problem file define 2 time shifts for the vehicle, add 10 delivery jobs with 24hs pf time window. The solution will have all 10 jobs served by 1 vehicle.

For the example:

{
  "fleet": {
    "types": [
      {
        "id": "vehicle_1",
        "profile": "car_1",
        "costs": {
          "fixed": 12.0,
          "distance": 0.003,
          "time": 0.008
        },
        "shifts": [
          {
            "start": {
              "time": "2021-07-17T00:01:00Z",
              "location": {
                "lat": 52.530971,
                "lng": 13.384915
              }
            },
            "end": {
              "time": "2021-07-17T12:00:00Z",
              "location": {
                "lat": 52.530971,
                "lng": 13.384915
              }
            }
          },
          {
            "start": {
              "time": "2021-07-17T12:01:00Z",
              "location": {
                "lat": 52.530971,
                "lng": 13.384915
              }
            },
            "end": {
              "time": "2021-07-17T23:59:00Z",
              "location": {
                "lat": 52.530971,
                "lng": 13.384915
              }
            }
          }
        ],
        "capacity": [
          50
        ],

        "limits": {
          "maxDistance": 3000000,
          "shiftTime": 86400
        },
        "amount": 1
      }
    ],
    "profiles": [
      {
        "type": "car",
        "name": "car_1"
      }
    ]
  },
  "plan": {
    "jobs": [

      {
       "id": "job_1",
       "tasks": {
           "deliveries": [
                 {
                   "places": [
                     {
                       "times": [
                         [
                           "2021-07-17T00:01:00Z",
                           "2021-07-17T23:59:00Z"
                         ]
                       ],
                       "location": {
                         "lat": 52.400971,
                         "lng": 13.284915
                       },
                       "duration": 900
                     }
                   ],
                   "demand": [
                     10
                   ]
                 }
               ]
       }
     },
     {
        "id": "job_2",
        "tasks": {
          "deliveries": [
            {
              "places": [
                {
                  "times": [
                    [
                      "2021-07-17T00:01:00Z",
                      "2021-07-17T23:59:00Z"
                    ]
                  ],
                  "location": {
                    "lat": 52.2346971,
                    "lng": 13.274915
                  },
                  "duration": 900
                }
              ],
              "demand": [
                10
              ]
            }
          ]
        }
      },
      {
         "id": "job_3",
         "tasks": {
           "deliveries": [
             {
               "places": [
                 {
                   "times": [
                     [
                       "2021-07-17T00:01:00Z",
                       "2021-07-17T23:59:00Z"
                     ]
                   ],
                   "location": {
                     "lat": 52.660971,
                     "lng": 13.314915
                   },
                   "duration": 900
                 }
               ],
               "demand": [
                 10
               ]
             }
           ]
         }
       },
       {
          "id": "job_4",
          "tasks": {
            "deliveries": [
              {
                "places": [
                  {
                    "times": [
                      [
                        "2021-07-17T00:01:00Z",
                        "2021-07-17T23:59:00Z"
                      ]
                    ],
                    "location": {
                      "lat": 52.244971,
                      "lng": 13.344915
                    },
                    "duration": 900
                  }
                ],
                "demand": [
                  10
                ]
              }
            ]
          }
        },
        {
           "id": "job_5",
           "tasks": {
             "deliveries": [
               {
                 "places": [
                   {
                     "times": [
                       [
                         "2021-07-17T00:01:00Z",
                         "2021-07-17T23:59:00Z"
                       ]
                     ],
                     "location": {
                       "lat": 52.150971,
                       "lng": 13.214915
                     },
                     "duration": 900
                   }
                 ],
                 "demand": [
                   10
                 ]
               }
             ]
           }
         },
         {
            "id": "job_6",
            "tasks": {
              "deliveries": [
                {
                  "places": [
                    {
                      "times": [
                        [
                          "2021-07-17T00:01:00Z",
                          "2021-07-17T23:59:00Z"
                        ]
                      ],
                      "location": {
                        "lat": 52.430971,
                        "lng": 13.3454915
                      },
                      "duration": 900
                    }
                  ],
                  "demand": [
                    10
                  ]
                }
              ]
            }
          },
          {
             "id": "job_7",
             "tasks": {
               "deliveries": [
                 {
                   "places": [
                     {
                       "times": [
                         [
                           "2021-07-17T00:01:00Z",
                           "2021-07-17T23:59:00Z"
                         ]
                       ],
                       "location": {
                         "lat": 52.2344971,
                         "lng": 13.224915
                       },
                       "duration": 900
                     }
                   ],
                   "demand": [
                     10
                   ]
                 }
               ]
             }
           }
           ,
           {
              "id": "job_8",
              "tasks": {
                "deliveries": [
                  {
                    "places": [
                      {
                        "times": [
                          [
                            "2021-07-17T00:01:00Z",
                            "2021-07-17T23:59:00Z"
                          ]
                        ],
                        "location": {
                          "lat": 52.330971,
                          "lng": 13.354915
                        },
                        "duration": 900
                      }
                    ],
                    "demand": [
                      10
                    ]
                  }
                ]
              }
            },
            {
               "id": "job_9",
               "tasks": {
                 "deliveries": [
                   {
                     "places": [
                       {
                         "times": [
                           [
                             "2021-07-17T00:01:00Z",
                             "2021-07-17T23:59:00Z"
                           ]
                         ],
                         "location": {
                           "lat": 52.250971,
                           "lng": 13.316915
                         },
                         "duration": 900
                       }
                     ],
                     "demand": [
                       10
                     ]
                   }
                 ]
               }
             },
             {
                "id": "job_10",
                "tasks": {
                  "deliveries": [
                    {
                      "places": [
                        {
                          "times": [
                            [
                              "2021-07-17T00:01:00Z",
                              "2021-07-17T23:59:00Z"
                            ]
                          ],
                          "location": {
                            "lat": 52.420971,
                            "lng": 13.344915
                          },
                          "duration": 900
                        }
                      ],
                      "demand": [
                        10
                      ]
                    }
                  ]
                }
              }
    ]
  }
}