vehicle routing problem: how to solve it in java?
TRANSCRIPT
StanislavKyfenko• TechnicalLeadatSoftServe• SoftwareengineermainlyfocusedondistributedsystemsdevelopmentandVRPsolutions
https://ua.linkedin.com/in/skyfenko
Agenda
• WhatisVRP?• VRPcharacteristicsandgoals• VRPtypes:fromsimplicitytocomplexity• OptaPlanner andjsprit• Q&A
WhatdoesVRPstandfor?
• VRPisoneofthemostpopularconstraintsatisfactionproblemsintheareasoftransportation,deliveryandlogistics• ThemainpurposeistodesignatleastonerouteforKvehicleswithLcapacityeachtodelivergoodsfromMdepotstoNcustomersinordertomeetthegivenconstraintsandtimewindows.• Effectiveutilizationofresources(vehicles)candecreasetransportationcostssignificantly
GoogleDirectionsAPI
• Disadvantages:• 2,500freedirectionsrequestsperday• Upto23waypointsallowedineachrequestcontaininganAPIkey• Upto8waypointswhennoAPIkeyissupplied• 10requestspersecond• Optimizationbasedontrafficjamsandroadsinfoonly
jsprit
• jsprit• cansolveproblemswithpickupsanddeliveries,backhauls,heterogeneousfleets,finiteandinfinitefleets,multipledepots,timewindows,openroutes,differentstartandendlocations,multiplecapacitydimensions,initialloads,skills…• allowsyoutodefineadditionalstateful andstatelessconstraintstoaccountfortherichnessofyourproblem.• isbenchmarkedagainstclassicalVRPinstances(e.g.Solomoninstances).• isreleasedunderLGPL(v3).
HowtocopewithVRPeffectively
• Don’tuseMDVRPwhencustomersaremostlyclusteredaroundonedepot• Themoreconstraintsyouhave,thelessprobabilityyousolveVRP• Don’tdefinecontroversialconstraintswiththesamestrength• Dohaveacodetosatisfyhardconstraintsfirst,thensoftones.• Usepositiveconstraintstomaximizevariableandnegativeones– tominimize
References
• https://github.com/graphhopper/jsprit• http://jsprit.github.io/• https://github.com/droolsjbpm/optaplanner• http://www.diku.dk/hjemmesider/ansatte/sropke/Papers/PHDThesis.pdf• https://docs.jboss.org/optaplanner/release/latest/optaplanner-docs/html_single