My problem has vehicles with different pax capacities (3, 4, 6, 8). I’m wondering how it is possible to discard solutions which don’t maximize vehicle’s occupation. For example, if a service requires 3 car seats, a vehicle with 8 seats cannot fulfil this task (we must use a vehicle with 3 car seats). I guess a hard route constraint would work. My implementation starts getting the vehicle capacity through insertionContext.getNewVehicle().getType().getCapacityDimensions.get(1) and then compare it with the number of Job’s pax. I’m obtaining a solution which sometimes ignores the hard constraint, although I can’t find any case in which the constraint evaluates true for such cases (pairs vehicle-job). Is it possible that a service is inserted without being evaluated by the constraint?
Thank you all in advance