I have the following CVRPTW problem and I'm trying to find a good solution with OptaPlanner. Time is in hh:mm:ss format.
My DRL file is like this. Moreover I defined also a hard contraint relative to the arrival before ready time. My solver configuration is like this, with the difference of the termination tag:
<termination>
<terminationCompositionStyle>OR</terminationCompositionStyle>
<maximumSecondsSpend>10</maximumSecondsSpend>
<scoreAttained>0hard/-750000soft</scoreAttained>
</termination>
This is the problem statement:
PROBLEM STATEMENT:
CustID ReadyTIME DueTIME ServiceDUR DEMAND
1 20:38:18 20:44:18 00:05:00 2
2 20:20:53 20:26:53 00:05:00 4
3 20:51:39 20:57:39 00:05:00 3
4 20:20:18 20:26:18 00:05:00 6
5 20:34:15 20:40:15 00:05:00 5
6 20:21:40 20:27:40 00:05:00 10
I have 2 vehicles with both a capacity of 10 items and 1 depot.
This is the solution (customers grouped by vehicle and sorted by arrival time):
Vehicle 1 Capacity 10 - from Depot [1]
[6] D: 10 Ar.T: 20:21:40 Prev.D: 00:02:21 Next.D: --:--:--
Vehicle 2 Capacity 10 - from Depot [1]
[4] D: 6 Ar.T: 20:20:18 Prev.D: 00:01:08 Next.D: 00:02:21
[2] D: 4 Ar.T: 20:27:42 Prev.D: 00:02:24 Next.D: 00:03:38
[5] D: 5 Ar.T: 20:36:03 Prev.D: 00:03:21 Next.D: 00:02:09
[1] D: 2 Ar.T: 20:43:26 Prev.D: 00:02:23 Next.D: 00:07:23
[3] D: 3 Ar.T: 20:55:40 Prev.D: 00:07:14 Next.D: --:--:--
(D = demand, Ar.T = arrival time, Prev.D = distance from previous location, Next.D distance from next location)
As you can see vehicle 2 have to transport 6+4+5+2+3=20 items, which is greater than the capacity. I don't understand why the solver suggest me this solution if there's a hard contraint relative to the capacity in the configuration.
Considering my rules, this is not an acceptable solution. Am I missing something? Isn't there a condition where the solver provides no solution? Is it contemplated a "solver failed" termination?