Hello,
We are currently facing an issue with jsprit, it is a typical case of Shipments and vehicles with timewindows. We are having difficulty in understanding why Shipments are not being assigned despite having sufficient time window and capacity.
Here, we have 3 orders of same location with service time of 15 minutes and we have 1 vehicle with sufficient capacity to serve all the shipments. However, only 2 of them are getting assigned and there is still time left to server 3rd shipment. Ideally we expect that all 3 shipments should get served by 1 vehicle only.
Below is the solution file for this problem.
<?xml version="1.0" encoding="UTF-8"?> <problem xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com vrp_xml_schema.xsd"> <problemType> <fleetSize>FINITE</fleetSize> </problemType> <vehicles> <vehicle> <id>vehicle-2655</id> <typeId>vehicle-type2655</typeId> <startLocation> <id>1</id> </startLocation> <endLocation> <id>1</id> </endLocation> <timeSchedule> <start>0.0</start> <end>17154.0</end> </timeSchedule> <returnToDepot>false</returnToDepot> <skills>trk</skills> </vehicle> </vehicles> <vehicleTypes> <type> <id>vehicle-type2655</id> <capacity-dimensions> <dimension index="0">18</dimension> <dimension index="1">4000000</dimension> <dimension index="2">750</dimension> </capacity-dimensions> <costs> <fixed>0.0</fixed> <distance>1.0</distance> <time>0.0</time> </costs> </type> </vehicleTypes> <services> <service id="2" type="service"> <location> <id>2</id> <coord x="21.1117002" y="79.0729793"/> </location> <capacity-dimensions> <dimension index="0">1</dimension> <dimension index="1">1</dimension> <dimension index="2">0</dimension> </capacity-dimensions> <duration>15.0</duration> <timeWindows> <timeWindow> <start>16674.0</start> <end>17154.0</end> </timeWindow> </timeWindows> </service> <service id="3" type="service"> <location> <id>3</id> <coord x="21.1117002" y="79.0729793"/> </location> <capacity-dimensions> <dimension index="0">1</dimension> <dimension index="1">1</dimension> <dimension index="2">0</dimension> </capacity-dimensions> <duration>15.0</duration> <timeWindows> <timeWindow> <start>16674.0</start> <end>17154.0</end> </timeWindow> </timeWindows> </service> <service id="4" type="service"> <location> <id>4</id> <coord x="21.1117002" y="79.0729793"/> </location> <capacity-dimensions> <dimension index="0">1</dimension> <dimension index="1">1</dimension> <dimension index="2">0</dimension> </capacity-dimensions> <duration>15.0</duration> <timeWindows> <timeWindow> <start>16674.0</start> <end>17154.0</end> </timeWindow> </timeWindows> </service> </services> <solutions> <solution> <cost>3.64001638E8</cost> <routes> <route> <driverId>noDriver</driverId> <vehicleId>vehicle-2655</vehicleId> <start>0.0</start> <act type="service"> <serviceId>2</serviceId> <arrTime>545.457</arrTime> <endTime>16689.0</endTime> </act> <act type="service"> <serviceId>3</serviceId> <arrTime>16689.0</arrTime> <endTime>16704.0</endTime> </act> <end>16704.0</end> </route> </routes> <unassignedJobs> <job id="4"/> </unassignedJobs> </solution> </solutions> </problem>
Please let us know if we are doing/interpreting something wrong here. Thanks in advance for help.