What is the problem? Assign vehicles of 2 types to cater to all PD
- without violating the
- capacity constraint
- vehicle constraint
- service length / duration
- minimizing the
- cost
Pseudocode to add two types of vehicles
- choose pd pair having the maximum round trip distance/earliest deadline time
- add it as the first route and choose vehicle type based on the least fixed cost per capacity of vehicle
- while there is no remaining unrouted PD pairs
- for each of the unrouted PD pairs
- add each pd pairs to the existing routes if feasible
- create new route if not feasible
- calculate the fixed+running cost
- save least cost and corresponding pd pair
- remove the added pd
- choose that PD pair having least insertion cost
- add that pd pair to the solution
- remove PD from set
- for each of the unrouted PD pairs
Modifications to be made in
- Dataset [done]
- Add 4 values in row 1
- No of type B vehicles
- Capacity of type B vehicles
- Fixed Cost of A
- Fixed Cost of B
- Read dataset function [done]
- Read the new capacity and no of type B vehicles
- Sol must be modified to identify dif vehicle types in the routes [done] struct { vector typeOfVehicle = {0, 1, 1, 0, 1}; // if no of routes = 5 // 0 - typeA, 1 - type B }
- Modify solution cost by updating it with fixed + running cost [done]
Note
- The solution requires atleast one PD pair to add further PD pairs because the alogirthm adds and removes PD pairs to exisitng solution to check the feasibility and cost and choose those solutions which have least cost of insertion.
- The service length limit should be always >= the maximum of 0 - P - D - 0; where P is an element of pikcup set and D an element of delivery set.
Criterias of choosing vehicle
- vehicle availability: if one vehicle type is available and other type is not -> assign vehicle that is avaibale
- least cost (cost/capacity): if both vehicle types are available -> assign vehicle with least cost/capacity