2

Vehicle Routing Problem using Or-Tools (PYTHON) - Auto decide initial start point.

I referred this https://developers.google.com/optimization/routing/vrp

I want to create a pickup drop service for employees with multiple location.

i want CVRP to auto decide start point and drop point will be company address and auto decide stop point and pickup will be company address.

i searched but there is no such model available, it shows round scenario depot address will be start and end point and because of this employee which stay close to company have to take a long ride to reach company.

is there any thing that i can change for FirstSolutionStrategy.PATH_CHEAPEST_ARC and it will work as i expected, there is no cost issue, needed optimize route for employee

is there anything available in php that will also work for me.

Arun Maurya
  • 91
  • 1
  • 10
  • Auto decide? based on what exactly CVRP will decide the start or end point? You do realize that VRP can only be solved correctly if a start and end points are fixed(They can be the same point). There is no Auto decide here. In provided google example the start and end points are fixed, and are the same - depot, but they still take part in calculations. For your data I would say that a start/end point to all routes is - company address. Vehicle starts from it, takes all workers to their homes or from them and returns to the company – Eugene Anisiutkin Mar 20 '20 at 08:16
  • @EugeneAnisiutkin thank for reply, start or end point is same i agree, but i want vehicle first should go at the end of route and then while coming to office pickup all the employee respectively, and for drop last employee should be which is longest distance for that vehicle route, that will help to reduce employee tavelling time. need help for this case – Arun Maurya Mar 20 '20 at 08:30
  • Moving a vehicle to an end point first opposes a VRP solution. a VRP with a start and end point at the company is *the least time it takes a vehicle to travel from company, pass though all employee addresses and return to the company*. Which means that *all employees will wait the least possible time for the vehicle*. I am not sure how exacly this does not suit you, because a better solution simply does not exist. Moving vehicle to an so called *end point* actually will make it worse, and all employees will have to wait longer for the vehicle. – Eugene Anisiutkin Mar 20 '20 at 09:07
  • 1
    Side Note: Looks like you do not want your vehicle return to the company after it delivered all employees and stay at the last point it was before returning to the company. You can get that by doing VRP on company start, company end and just remove the last pass and remember vehicle position, use that for next VRP with a start point at remembered and an end point at company. But no extra moving vehicle or it won't be VRP solution. – Eugene Anisiutkin Mar 20 '20 at 09:22
  • got you point, is there any thing from FirstSolutionStrategy.PATH_CHEAPEST_ARC will help me to reduce time, i can provide 2 vehicle extra for every route capacity, cost doesn't matter much – Arun Maurya Mar 20 '20 at 11:03

1 Answers1

3

Don't fully understand your problem(s).

Mizux
  • 8,222
  • 7
  • 32
  • 48