Upload
fwdays
View
2.497
Download
0
Embed Size (px)
Citation preview
Заголовок презентации
Имя и фамилия автора докладаКомпания
Контактные данные 1Контактные данные 2Контактные данные 3Контактные данные 4
VehicleRoutingProblem:howtosolveitinJava?
StanislavKyfenkoSoftServe
skype:stanislav.kyfenkoLinkedIn:https://ua.linkedin.com/in/skyfenko
StanislavKyfenko
• SeniorJavaDeveloperatSoftServe• 5+yearsofexperienceinJavadevelopment• SoftwareengineermainlyfocusedondistributedsystemsdevelopmentandVRPsolutions
https://ua.linkedin.com/in/skyfenko
Agenda
• WhatisVRP?• VRPcharacteristicsandgoals• VRPtypes:fromsimplicitytocomplexity• OptaPlanner andjsprit• Q&A
WhatdoesVRPstandfor?
• VRPisoneofthemostpopularconstraintsatisfactionproblemsintheareasoftransportation,deliveryandlogistics• ThemainpurposeistodesignatleastonerouteforKvehicleswithLcapacityeachtodelivergoodsfromMdepotstoNcustomersinordertomeetthegivenconstraintsandtimewindows.• Effectiveutilizationofresources(vehicles)candecreasetransportationcostssignificantly
VRPcharacteristics
Depot
TimeWindows
Location
Customer
TimeWindows
Location Accessibility
Demands
Vehicle
TimeWindows Returntodepot
Capacity Driverrestperiod
Route
Totalelapsedtime Timedelays
TotaldistanceTotalcost
VRPgoals
Totalelapsedtime Totaldistance Totalcost
Totalconsumedfuel Fleetofvehicles
VRPgoals
Totalprofit Customershappiness
VehicleRoutingProblemtypes
1.TravellingSalesmanProblem
Thesimplestone- TSP
2.CapacitatedVRP
CapacitatedVRP
3.VRPwithmultipledepots
VRPwithmultipledepots
4.SplitDeliveryVRP
SplitDeliveryVRP
5.PeriodicVRP
PeriodicVRP
6.StochasticVRP
StochasticVRP
7.VRPwithTimeWindows
VRPwithTimeWindows
OptaPlanner
OptaPlanner
OptaPlanner
Sample
Sample
Similartohard/softconstraints
Samle
GoogleDirectionsAPI
GoogleDirectionsAPI
• Disadvantages:• 2,500freedirectionsrequestsperday• Upto23waypointsallowedineachrequestcontaininganAPIkey• Upto8waypointswhennoAPIkeyissupplied• 10requestspersecond• Optimizationbasedontrafficjamsandroadsinfoonly
OptaPlanner demo
jsprit
jsprit
• jsprit• cansolveproblemswithpickupsanddeliveries,backhauls,heterogeneousfleets,finiteandinfinitefleets,multipledepots,timewindows,openroutes,differentstartandendlocations,multiplecapacitydimensions,initialloads,skills…• allowsyoutodefineadditionalstateful andstatelessconstraintstoaccountfortherichnessofyourproblem.• isbenchmarkedagainstclassicalVRPinstances(e.g.Solomoninstances).• isreleasedunderLGPL(v3).
jsprit demo
HowtocopewithVRPeffectively
• Don’tuseMDVRPwhencustomersaremostlyclusteredaroundonedepot• Themoreconstraintsyouhave,thelessprobabilityyousolveVRP• Don’tdefinecontroversialconstraintswiththesamestrength• Dohaveacodetosatisfyhardconstraintsfirst,thensoftones.• Usepositiveconstraintstomaximizevariableandnegativeones– tominimize
Thankyouforattention
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