• Nie Znaleziono Wyników

Exact matching of attractive shared rides (ExMAS) for system-wide strategic evaluations

N/A
N/A
Protected

Academic year: 2021

Share "Exact matching of attractive shared rides (ExMAS) for system-wide strategic evaluations"

Copied!
27
0
0

Pełen tekst

(1)

Delft University of Technology

Exact matching of attractive shared rides (ExMAS) for system-wide strategic evaluations

Kucharski, Rafal; Cats, Oded

DOI

10.1016/j.trb.2020.06.006

Publication date

2020

Document Version

Final published version

Published in

Transportation Research Part B: Methodological

Citation (APA)

Kucharski, R., & Cats, O. (2020). Exact matching of attractive shared rides (ExMAS) for system-wide

strategic evaluations. Transportation Research Part B: Methodological, 139, 285-310.

https://doi.org/10.1016/j.trb.2020.06.006

Important note

To cite this publication, please use the final published version (if applicable).

Please check the document version above.

Copyright

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons. Takedown policy

Please contact us and provide details if you believe this document breaches copyrights. We will remove access to the work immediately and investigate your claim.

This work is downloaded from Delft University of Technology.

(2)

ContentslistsavailableatScienceDirect

Transportation

Research

Part

B

journalhomepage:www.elsevier.com/locate/trb

Exact

matching

of

attractive

shared

rides

(ExMAS)

for

system-wide

strategic

evaluations

Rafał Kucharski

,

Oded

Cats

Department of Transport & Planning, Delft University of Technology, the Netherlands

a

r

t

i

c

l

e

i

n

f

o

Article history: Received 29 November 2019 Revised 9 June 2020 Accepted 15 June 2020 Keywords: Ride-hailing Mobility on demand Ride-sharing Shareability Public transport

a

b

s

t

r

a

c

t

Thepremiseofride-sharingisthatserviceproviderscanofferadiscount,sothattravellers arecompensatedforprolongedtraveltimesandinduceddiscomfort,whilestillincreasing theirrevenues.Whilerecentlyproposedreal-timesolutionssupportonlineoperations, al-gorithmstoperformstrategicsystem-wideevaluationsarecruciallyneeded.We propose anexact,replicableanddemand-,ratherthansupply-drivenalgorithmformatchingtrips intosharedrides.We leverageondelimitingoursearchfor attractivesharedrides only, which,coupledwithadirectedshareabilitymulti-graphrepresentationandefficientgraph searcheswithpredetermined nodesequence, narrowsthe (otherwiseexploding) search-spaceeffectivelyenoughtoderiveanexactsolution.Theproposedutility-based formula-tionpavesthewayformodelintegrationintraveldemandmodels,allowingfora cross-scenariosensitivityanalysis,includingpricingstrategiesandregulationpolicies.Weapply theproposedalgorithminaseriesofexperimentsforthecaseofAmsterdam,wherewe performasystem-wideanalysisofthe ride-sharingperformance intermsofboth algo-rithmcomputations of shareabilityunder alternative demand, networkand service set-tingsaswellasbehaviouralparameters.InthecaseofAmsterdam,3000travellersoffered a30%discountform 1900 rides achievingan averageoccupancy of1.67 and yieldinga 30%vehicle-hoursreduction atthe costofhalvingserviceprovider revenuesanda17% increaseinpassenger-hours. Benchmarkingagainst time-windowconstrainedapproaches revealsthatouralgorithmreducesthesearch-spacemoreeffectively,whileyielding solu-tionsthataresubstantiallymoreattractivefortravellers.

© 2020TheAuthors.PublishedbyElsevierLtd. ThisisanopenaccessarticleundertheCCBYlicense. (http://creativecommons.org/licenses/by/4.0/)

1. Introduction

Mobilityplatformsdynamicallymatchsupplyanddemandinatwo-sidedmarket,enablingtheprovisionofflexible on-demandtransportservices.Nowadays,thankstothesteadilygrowingmarketshareofride-hailingservicesandtheirinstant operations,sharedridesarebecomingincreasinglyavailableandattractiveforbothsidesofthistwo-sidedmarket(Lietal., 2019b). The premise of ride-sharing is that travellers can travel for a reduced fee, while service providers can increase theirrevenues(Furuhataetal., 2013). Furthermore,sharedridesare believedtoalignwell withpolicy objectives,suchas

Corresponding author.

E-mail address: r.m.kucharski@tudelft.nl (R. Kucharski). https://doi.org/10.1016/j.trb.2020.06.006

0191-2615/© 2020 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY license. ( http://creativecommons.org/licenses/by/4.0/ )

(3)

Fig. 1. Road network graph of Amsterdam used in experiments, with sample rides: a) non-shared, private ride marked blue in the North, b) ride shared by two travellers marked green at the South, and c) ride shared by three travellers marked brown in the Central Amsterdam. Stars denote origins, triangles destinations and grey bold lines travellers’ shortest paths repsectively.

increasingaccessibilityandreducingcongestion.Notwithstanding,thepotentialofride-sharingisyettoberealisedin large-scaleoperations.

Travellers,requestingridesfrommobilityplatforms,areofferedasharedride,whereavehicleofferstopickthemupat their originanddropthemoff attheir destinationatspecifictimes.WeillustratethisinFig.1,whereprivate andshared ridesinAmsterdam,theNetherlands,are marked.Bothpick-upandtraveltimesmaydeviatefromthedesiredorminimal ones,sincethevehicleneedstomeettherequirementsofallpooledtravelrequests.Serviceproviderneedstocompensate thisinconvenience by meansofoffering a lowerfare, comparedto theprivate alternative.This canstill be viableforthe serviceprovider,ifitcannowbetterutiliseitscapacityandchargeseveralusersforaridesection,forwhichasingledriver commissionhastobepaid.

While offeringpotential benefits,sharedrides canalsobe challengingforbothserviceproviderandserviceusers.The mobilityplatformneedstobundletripsintoattractivesharedrides.Whilsttheproblemofidentifyingfeasiblesharedrides suffersfromthecurseofdimensionalityandishardlysolvableforreal-sizedemandlevels.Here,weexploitthe fundamen-talprerequisitefortheprovisionofsharedrides,namelyidentifyingridesthatcanbeshared,whileofferingalltravellersa servicethatisperceivedasmoreattractivethanthenon-shared,private,alternative.Thetrade-off exercisedbetweenprivate andsharedridesinvolves(i)thediscountedprice,(ii)traveltimedelaysand,(iii)on-boarddiscomfort.Notably,we demon-stratethat insuch context,thesearch-spaceisreducedeffectivelyenoughtoproposeexactmethod,sincetheproblem, as weformulateit,isnotNP-hardanymore.

Whilerecentlyproposed real-timesolutions (Alonso-Moraetal., 2017;Simonettoetal.,2019)effectivelysupportonline operations, algorithms toperformoffline demand-drivencomparative analyses arestill missing. We proposean algorithm forobtaining exactsolutions toefficientlyassessalarge numberofcity-widestrategic scenarios.The methodresultsina replicablesolution,whichallowsperformingacross-scenariosensitivityanalysiswhenahighqualitysolutioniscrucialfor assessingtheimpactofofferingsharedridesthroughtwo-sidedmobilityplatforms.Theproposedmethodoffersademand-, ratherthansupply-drivenanalysisofthemodalsplit,marketcompetitionandsystem-widetravellerswelfare.Oursolution approachcan thusbe embeddedintheanalysisofpricingstrategies,regulationpoliciesorcompetitionsettingsincluding supply-demandfeedbackloopsandemerging marketequilibria.Furthermore,theproposedutility-basedformulationpaves thewayformodelintegrationintravel demandmodels,allowing forexampletofeedtravel attributesback tothemodal choice level, utilising the latest findings from travel behaviour research (e.g.Alonso-Gonzlez et al. (2020b,c)). Tools and methods toproperlyforecastride-sharingplatform marketsharesundervarious circumstancesare ofinterestto

(4)

competi-tors(includingpublictransport)andpolicymakers.Betterunderstandingofsystem-widepropertiesiscrucialtocounteract potentiallynegativeimpactsofemergingmodesonequityandaccessibilityofpublictransport.

1.1. Relatedwork

WangandYang(2019)providearecentandexhaustiveoverviewofresearchtopicsinthedomainofride-sourcing sys-temsincludingsharedrides,whileMouradetal.(2019) reviewpreviously proposedmatchingalgorithms forsharedrides. Theproblemofmatchingtripsintosharedridescanbedecomposedintothefollowingsub-problems:

determiningiftwoormoreridesmaybeshared,

identifyingallfeasiblesharedridesforasetoftriprequests,

assigningtripstosharedrides,

realisticsystemrepresentation(intermsofdemand,fleetandplatformoperations),

quantifyingandassessingresultsusingasetofperformanceindicators.

Inthefollowing,wediscussrelatedworkwhileconsideringhowtheseaspectswereaddressed.

Thesharedrides problemcanbe classifiedbasedonits formulation,dependingon systemsettings, objectivesandthe assumptions made. Trip requests may be treated as static, i.e. known in advance (oracle caseof Santi et al. (2014)), or dynamic, i.e.announced asan incomingstream and not known before a given announcement time (Agatz etal., 2011). The travel request-vehicleassignment maybe static, i.e.thefull schedule is determinedbefore the passenger enters the vehicle(Cordeau,2006),ordynamic,i.e.newrequestsmaybeassigneden-route,notknowntopassengerbefores/heenters the vehicle (Alonso-Mora et al., 2017). The fleet maybe explicitly considered, i.e. anygiven ride is served by a certain vehiclethatarrivesatacertaintime(Alonso-Moraetal.,2017;Simonettoetal.,2019),orassumedinstantlyavailableupon requestattheoriginlocation (Santietal., 2014;Tachetetal.,2017). Vehiclecapacity,themostimportantdeterminantof computationalcomplexity,canbelimitedtotwo(Santietal.,2014),four,eightortenpassengers(Alonso-Moraetal.,2017). Solutionapproachesmaybedesignedforonlineapplication,hencefocusingonfastandefficientsolutions(Simonettoetal., 2019),orofflinewherefocusisonnetwork-wideimpactonperformanceandmobility(Tachetetal.,2017).Thesearchspace maybethuseitherexhaustivelyexplored(whichwasconsideredhithertoinfeasibleduetothecurseofdimensionalityapart fromsmallinstances likeinCordeau(2006)),decomposedintosmallerspatially partitionedproblems(Pelzeretal.,2015), temporallypartitionedproblems(Simonettoetal.,2019),exploredviaheuristics(Alonso-Moraetal.,2017),ornarroweddue toassumedcapacitylimitations(Santietal.,2014).Accordingly,solutionssoughtmaybeexact(Cordeau,2006)or heuristic-based(Simonettoetal.,2019).

Theobjectiveofthetrip-rideassignment hasbeenformulated intermsofthecost forthe:a)operator(vehicle-hours, revenues, served trips) (Hosni etal., 2014), b) traveller (generalisedtravel costs, travel times,delays, fares) (Santi et al., 2014), c) a mixtureof both(CápandAlonsoMora, 2018), ord)system performance (Santos andXavier, 2013). The con-straintsimposedonvehiclesmayincludethemaximaldetourandtheprofitabilityofsharedrides,whereasconstraints im-posedontravelrequestsmayinvolvedeparturetimewindowandmaximaldetourormaximalwalkingdistance.Constraints were assumed fixed in all past work, with the exception of (de Ruijteret al., 2020) who expressed it using a compen-satoryfunctionoftripattributes.Thetraveldemandgivenasinput,maybegeneratedbasedonobservedride-hailingtrips (Tachetetal.,2017),observedride-sharingtrips(Lietal.,2019b)orsampledfromsynthetictraveldemanddata(Hosnietal., 2014).Demandinmostofstudiesisconsideredasexogenous,i.e.triprequestsarefixedandnotsensitivetosharing incen-tivesandperformance.Endogenousdemand,wheremodalcompetitionisreproducedtosomeextent,bothbetweenprivate (non-shared)andshared ride,aswell asinrelation toother modes(public transportand private car)is scarce.Demand istypicallymicroscopicallyrepresented,withexceptionofmatchingalgorithm byFriedrichetal.(2018),whichcan be in-tegratedinexistingmacroscopictraveldemandmodels.Finally,themostimportantnetworkproperty,travel time,maybe fixedandstatic,fixed anddynamic(Alonso-Moraetal., 2017)orflow-dependent(i.e.sensitivetoflowchangesinduced by ride-sharing)(Narayanetal.,2019).

Mostoftheanalytical experimentsandsimulation studiesconcluded thatride-sharing canyield remarkableefficiency gains.Findingssuggestedafleetsizereductionof85%(Alonso-Moraetal.,2017),47%or35%mileagereductions(Qianetal., 2017) and (Friedrich et al., 2018), 42% reduction in the number of rides (Pelzer et al., 2015) or 19% cost reductions (SantosandXavier,2013).

Theapproachtakeninalloftheaforementionedresearchwastoidentifyasetofsharedrides,thatsatisfypre-specified constraintsrelatedtothecompatibilityoftrip combinations.Thelatterincludesimposingthresholds,relatedtomaximum waitingtime ormaximumdetour that were set asfixed constraintsforeach passenger trip.The shareof travel requests that could not be served giventheseconstraints wasused asone ofthe performance indicators.Travellers were consid-eredcaptive users ofthe ride-sharing service andinsensitive to the level ofservice offered. This resulted in generating unattractivesharedrides,whilesignificantlyincreasing thesearchspaceofsharedrides.The searchspaceofpractical-size problemswasneverexploredexhaustively,duetothedeploymentofover-optimisticassumptionsonfeasibility,leadingto acombinatoricallyexplodingsearchspace.Furthermore,suchassumptions mayresultwithpassenger-vehicleassignments thatyield travel delaysthatmaynot be acceptablein reality(e.g. 7minutesdetour and7minutes extrawaitingtime in NewYork Cityreportedby Simonetto etal.(2019)).While empirical studies onthe performance ofride-sharing services are still scarce,there isevidence tosuggest that the vastmajority ofpassengers opt forthe private ridealternative (e.g. 75%inNewYorkCity,(LLC,2019);93% inChengdu,(Lietal.,2019b))andeventhosethatdochooseforthesharedoption

(5)

only seldom endup actually sharing (partof) their ride withat leastone other traveller (e.g.18% of those requestedin Toronto(BigDataInnovationTeam,2019)).Thereis,therefore,aneedtobetterunderstandtheviabilityoftheride-sharing alternativebyanalysingtherelationbetweenthediscountofferedforsharedrides,theshareofpassengersthatchoosefor asharedride,thelevelofservicedeliveredandserviceprofitability.

Thecombinatorialproblemofidentifyingsharedtrips becomesquicklydifficultwithanincreasingnumberoftravel re-questsandsharingdegree(i.e.maximalnumberofpassengerssharingaride).Santietal.(2014)arguethatthecombinatorial explosionof thematchingproblemwilllimit thepotentialofride-sharing inpractice.Asarguedby Mouradetal.(2019), exactsolutionshavebeensofaravailable onlyforoversimplified instancesandthereisaneed forimprovedheuristics,in termsofquality,aswellascomputationtimes.Previousattemptstoaddressthisproblemhaveconsiderablysimplifiedthe problemtoreduceitscomplexityby:consideringasmallnumberoftravelrequests(Hosnietal.,2014),stronglyrestricting thenumberoftrips thatcanbe matched(Santietal., 2014), orproposingheuristics(Simonettoetal.,2019;Alonso-Mora etal.,2017).Alternatively,thepotentialfortripsharingwasexploredusinggenericandaggregatespatialandtemporaltrip similaritycharacteristicstoobtainroughapproximations(BicocchiandMamei,2014).

Withintherapidlygrowingliteratureonsharedrideswebuildinthisstudyontheconceptofshareabilitygraphs intro-ducedby(Santietal., 2014),furtherextendedformultipleridesandfleetconsiderationsin(Alonso-Mora etal.,2017)and theinclusionofride-sharingutility in(deRuijteretal.,2020).Santietal.(2014) introducedtheso-calledshareability net-work,wherearcsconnectpairwiseshareabletrips.TripsareshareableinSantietal.(2014)if:(i)requestedwithinthesame time-windowand(ii)satisfypre-setdelaythresholds.Santietal.(2014)castthetripsharingproblemasamaximal match-ingonshareabilitygraph,withexactsolutionforpairwiseshareabletrips(withtheobjectiveofeithermaximisethenumber ofsharedtripsorminimisetheirtraveltimeinaweightedmatchingversion).Forridesconsistingofthreepassengersthey castshareabilitygraphasa hypergraphandpropose heuristics,whilearguingthat higherdegreesarecomputationally in-feasible.Alonso-Moraetal.(2017)extendtheconceptofshareabilityproposedby(Santietal.,2014)allowingformorethan twopeopletosharearide(upto10per vehicle)andexplicitlyconsideringfleetoperations. Theydividethetime-window ofSantietal.(2014),intoseparateparametersformaximalwaitingandtraveldelay,whichmaycompensateforeachother. TheshareabilitygraphofSantietal.(2014)isfurtherexploitedandridesofdegreegreaterthantwoaresearchedasgraph cliques,whichAlonso-Moraetal.(2017)formally introduceasridecandidates.Ridecandidatesarefeasibleonlyifthereis avehiclethatcanserveitandifasequenceofpickupanddrop-off pointsmaybevisited,whilefeasibleforalltravellers.

Past research focusedon real-timeoperationsandtheneedto developheuristicstoensure their applicability.In most cases,real-timefleetoperationsofserviceproviderareexplicitlyconsidered,whiledemandisrepresentedaslargely insen-sitivetosystemperformanceandonlyconditionalonfleetavailability.Moreover,theprofitabilityofsharedridesforservice provider,expressed asa functionofoffered discount,wasalsonot considered,presumablyduetomodels’insensitivity to users’choice betweenprivate andsharedrides.Conversely, thiswork pertainstooffline strategicapplications.Inorderto devisebusinessstrategiesandpolicies,transportauthoritiesandserviceprovidersneedtoassessalargernumberof scenar-iosatthecity-widelevel.Scenariosofinterestpertain,forexample,topricingstrategies,regulationpolicies(Lietal.,2019a) orcompetitionsettings(Pandeyetal.,2019;KalczynskiandMiklas-Kalczynska,2019).Thiscallsforthedevelopmentofan exactalgorithm,thatwillenableofflinecity-wideevaluations,wherethequalityofthesolutionneedstosupportbusiness orpolicydecisions,andtheplannerisinterestedinexploitingarangeofpotentialspecificationsofsystemparameters.The algorithm needs hence to also be efficient,in particular giventhe numberof requests that need to be handled andthe resultingsolutionspace.

1.2. Studyobjectivesandapproach

The primeobjectiveofthispaperis topropose ascalable algorithm,capableofhandlinglarge-scale travel demandto efficientlyidentify attractiveshared rides ofanydegreewithin acceptable computationtime forthe purposeofassessing strategicscenarios. Tothisend, we proposean offline,demand-orientedsolutiontosolvetheride-sharingtrip-vehicle as-signment.The proposed methodof ExactMatching of AttractiveShared rides (ExMAS)matches trips into rides, that are attractiveforallpassengers’involvedand(optionally)profitablefortheserviceprovider.

Wearguethat traveldemandcharacteristicsare such,thatthenumberofattractivesharedridesimplodes,ratherthan explodes,withtheirdegree,permittingthedevelopmentanddeploymentofan exhaustivealgorithmtoenumerateall fea-sible andattractive shared rides. Without relying on heuristics, we representthe compatibility andsequencing of travel requestsusingamulti-graphrepresentation,allowingtheidentificationofsharedridesofhigherdegreebyperforming effi-cientgraphsearches.Weaddressthecomplexityofthetrip-sharingproblemby narrowingthesearchestoattractiverides only andthenleverageon a directedmulti-graph, to incrementallysearch forrides ofhigherdegrees. Inourhierarchical approachtripsare graduallymatchedintoridesofincreasingdegree.Thisiskeytoefficientlyreducethesearchspace be-forethedegreemakes computationsintractable. Thisisachievedbymeans of(i) hierarchicallyexploringthesearchspace ensuring thatanyexplored rideofndegreeis composedoffeasibleshareable n− 1degree ridesand(ii)maintainingthe orderofvisitedoriginsanddestinations,to predeterminethesequence andavoidcombinatorialsearches.Thisway,while searching fora rideshared by fourpassengers, we do not process all four-element subsetsof trips, iteratingthrough all feasiblepermutationsoforiginsanddestinations.Instead,wefirstidentifytriples,composedoftripswhichareallpairwise shareablewitha potential fourthtrip andevaluatealreadypredeterminedsequence oforigins anddestinations, reducing thus the numberofcomputationally expensive calculationstoa few precise andtargeted ones. Thisapproach makes an, otherwiseinfeasible,problemsolvablewithinacceptablecomputationtime.

(6)

Theapproachproposedinthisstudyallows ustoanalyseoverall passengerwelfarechangesunderalternativedemand, network andservice settings aswell as behavioural parameters. We perform a system-wide analysisof the ride-sharing performance, interms of shareabilityof real-sizeurban demand patterns aswell as indicatorsto quantify its impact on passengers,operator andthe systemasa whole.We complementsystemperformanceoutputs withmoredetailed share-abilityindicators,computedforthetotaltraveldemand(andnot limitedtotaxidemandonlywhicharguablyhasspecific properties),sampledfromtheactualAmsterdamdemandpatterns.

Triputilityformulasareincorporatedinourapproach,assumingthatpassengersconsiderasharedrideattractiveif,and onlyif, its utility is greater thanthe utility oftravel alternatives. An alternative maybe anyother mode, buthereby we considerthat passengers are making a choice betweenprivate andshared on-demand services.In thisstudywe assume that, likein other travel choice situations, travellers trade-off different attributesandtheir choice canbe represented as aprobabilisticoutcome ofacompensatoryfunction composedofasetoftravelattributes. Weherebyadopttheapproach proposedindeRuijteretal.(2020).Thisimpliesthat,insteadofspecifyingtime-windowsconstraintsthatmustbesatisfied foraridetobeshared,weformulatethewillingnesstoshareasacompensatorycostfunctionattheindividualpassenger levelconsideringtrade-offsbetweendelayscausedbydetours,traveldiscomfortrelatedtosharingavehicleandafare dis-countassociatedwithasharedride.Recentbehaviouralresearchindicatesthattravellerspreferencesinthecontextof ride-sharingcan indeedbe well explainedusingcompensatory discrete choicemodels (Al-Ayyash etal., 2016;Alonso-Gonzlez etal.,2020c;Freietal.,2017).We,therefore,adoptthewell-establishedutilitymaximisationmodellingframeworktoallow travellerstochoosebetweenindividualandsharedrides.Inordertoexaminethefullsharingpotential,weassumethatthe supplycanscaleaccordinglyanddonotspecifyan a-priorilimit onthefleet sizeandcapacity.Weproposean exactand completesolutiontechniquethatisapplicabletothelarge-scaleproblems.

Benchmarkingourresultswiththepreviously proposednon-compensatorytime-windowsapproachrevealsthat: (i) on onehand,fixedtimewindowsdonotallow identifyingattractiverideswhichdonotfitthestrictnon-compensatory win-dows;and(ii)ontheotherhand,asignificantshareoftheridesfittingwithinthewindowsarenotperceivedasattractive. Consequently,in our experimentsExMAS outperformsprevious time-windowsapproachesin termsof: (i) improved per-formance fortravellers (in terms of passenger hours reductions); and(ii) effectively reducing the search spaceto allow forexact searches.Consequently, computationtimesremain feasiblefor offline,city-wide analyses. Moreover, further de-composingtheproblemintosmallerbatches (astypicallyappliedinonlinesolutions)yieldscomputationtimeswhichare promisingforreal-timeoperations(below10sfordemandlevelsaround5000trips/hour).

Theremainderofthepaperisorganisedasfollows.Inthenext section,weintroduceamethodtodetermineattractive sharedrides, search for them andfinally optimallyassign passenger trips to shared rides. Section 3 details an extensive setofexperimentsapplied forthecaseofAmsterdam. Wediscusstheimplications ofourfindings, studylimitationsand directionsforfurtherresearchinSection4.

2. Method-Exactmatchingofattractivesharedrides(ExMAS)

Inthefollowing,wefirstformulatethesharingutilityinSection2.1,wethenintroducethetrip-rideassignmentproblem inSection 2.2.InSection2.3wedetailalgorithmtoidentifyattractivesharedrides ofincrementallyincreasing degree.We firstproposepair-wisesearches(Section2.3.1),onwhichwebuildadirectedmulti-graphinSection2.3.2,basedonwhich wefinallyintroducecompletesearchesforsharedridesofhigherdegreeinSection2.3.3.Altogetherthissequenceofsteps constitutestheExactMatchingofSharedRides(ExMAS)algorithm,formalisedin Section2.3.4 andavailableonlineubder publicrepository(github.com/rafalkucharskipk/ExMAS).

2.1. Attractivesharedrides

Weconsider passenger trip requestsQ =

{

Q1 ,Q2 ,...,Qn

}

,withsingle tripi defined asa combinationofits origin oi,

destinationdianddesiredpick-uptimetip:

Qi=

(

oi,di,tip

)

(1)

Traveltimes,ti,arecalculated ontheroad networkgraphG(N, A), whereAis thesetofroute-able arcs,andN istheset ofnodes,pertaining topick-upanddrop-off locations oi,diN. Weuse efficientlook-up tablesto querynetwork travel

timest(o,d,to)betweenoriginnodeo,destinationnodedatdeparturetimeto.Fareiscalculatedbasedondistanceli(oi,di)

withagivenservicefare

λ

ns(€ /km).Hereweconsiderthattravellers,currentlyusinganon-sharedon-demandservice(i.e.

privateride),willoptforsharedridesiftheyfindthemsuperior,i.e.moreattractive.Ifpassengeridecidestotakeaprivate ride,heispicked-upfromhisoriginoiattimetipandreacheshisdestinationdiattimetipayingafeeof

λ

nsli.

Traveltimeandfare,coupledwithvalue-of-time

β

t andcost-sensitivity

β

c allowtoexpressthe(dis)utilityofthe

non-sharedtripas:

Uins=

β

c

λ

nsl

i+

β

tti (2)

Letusnowconsiderapassengerbeingofferedasharedrider,suchthatheispicked-upfromoriginattimetˆipandarrivesat hisdestinationattˆi.Foratypicalsharedridethetraveltimeislonger(tˆi≥ ti)thanfornon-sharedprivaterideandpick-up

(7)

timemaybedifferentfromrequested(tˆip=tip).Whichyieldsadifferentutilityterm,thatweexpressasfollows:

Us

i,r=

β

c

λ

sli+

β

t

β

s

(

tˆi+

β

d

(

tˆip− t p

i

))

(3)

Theutilityofasharedrideinvolvesa(possiblydifferent)valueoftime,furtherpenalisedwith

β

stoaccountforthe

discom-fortofasharedride.Thetriptimehasnowtwocomponents:traveltimetˆi(possiblylongerthanfornon-sharedride)anda

delay(tˆip− tip).Pick-updelayisweightedwithanadditionalmultiplier

β

d,whichmaybedifferentforearlyandlate

depar-turesdependingonthetrippurpose.Such longerandlesscomfortabletripsmaybeattractiveonlyiftheserviceprovider offersalowerservicefeerate

λ

s,suchthatitcompensatesforthelossinutilitycausedbysharing.

Toidentifywhensharingisattractive,weexpressthesharingutilityasthedifferencebetweenthesharedandnon-shared utilityterms:

Ui,r=Ui,rs − Uins=

β

c

λ

li+

β

t

(

ti

β

s

(

tˆi+

β

d

(

tˆip− tip

)))

+

ε

(4)

where

λ

=

λ

s

λ

ns is thediscount offered forsharing a ride,i.e.the discount inper-kilometrefare, compared toa

non-sharedride.Thisformulationallowstoexpresstheutilityofsharingwith:oneservicedesignparameter

λ

,setofbehavioural parameters (value-of-time

β

t, cost-sensitivity

β

c, delaysensitivity

β

d,sharing discomfort

β

s), and threevariables (travel

distance,travel timeandpick-updelay).Mind,that bothtravel timeandcosts areperceived negatively (throughnegative signs of both

β

c and

β

t). The random term

ε

allows to consider both deterministic (if

ε

=0) and probabilistic systems

(where

ε

representssomerandomdistribution).Inthefollowingweadoptadeterministicbinarychoicemodel.

WeassertthatasharedriderisattractiveforiifUi,rispositive,denotedinwhatfollowswithadummybinaryvariable:

bi,r=



1 ifUi,r>0

0 otherwise (5)

Intheremainder,weconsiderasystemwherethediscountparameter

λ

<0(i.e.

λ

s<

λ

ns)allowsto(atleastpartially)

compensateforthedownsidesofa sharedride,namely:longertraveltime,departure delayandthediscomfortassociated withsharingatrip.Sinceweareinterestedintherelativeutility ofsharedvs.private trips,wesetthepickup-updelayto nullforprivatetripsandforsharedtripsitrepresentsthedelaystemmingfromsharing.Otherdelaycomponents(primarily thoserelatedtotheserviceoperations)areassumedconstantoveralternativesandthuscancelouteachotherintheutility formula(Eq.4).

Inabovesettingweconsiderthecompetitionbetweennon-sharedandsharedride-hailing,which,withoutlossof gen-erality,maybereformulatedintocompetitionwithprivate car(inwhichcasetravelcostsaredifferentyetin-vehicletimes remainroughlyunchanged)orpublictransport(inwhichcase

λ

swouldpresumablybeabove

λ

ns).Mind,thatinthe

exper-imentsforreadabilitywe usethemoreintuitive relativediscount, i.e.

λ

= −

(

λ

s

λ

ns

)

/

λ

ns.Sothat

λ

= 0.2inexperiments

impliesthatthesharedridefareis20%lowerthantheprivatealternative.

The formulationproposed above is generic andcan be extended toaccommodate various utility specifications. Inthe following,weincludeintheutilityfunctionvariablesandparametersthatareeitherknown,orcanbeestimated.For exam-ple,recentstudiesprovideestimatesforthevalue-of-timeforurbanpooledon-demandservicesbasedonstatedpreferences datacollectedinchoiceexperiments(Alonso-Gonzlezetal.,2020a).Asnewinsightsaregainedfromtravelbehaviourstudies concerning:thevalue-of-reliability(Alonso-Gonzlezetal.,2020a),tastevariationamongriders(LavieriandBhat,2019)and attitudinalclasses(Alonso-Gonzlezetal.,2020b),theutilityformulationmaybespecifiedaccordinglyandfurtherextended. Furthermore,theincreasingdeploymentofride-poolingon-demandtransportserviceswillallowfutureresearchtoestimate users’willingness-to-share(orinreversedterms,willingness-to-payforaprivateride) aswell asthedisutilityinduced by delayfromrevealedpreferencesdata.

Importantly,our formulationdoesnot requiredefininga (possiblyarbitrary)timewindow fortripdeparture,since we derivethe delaydirectlyfromutilities.Tothisend, weintroduce theso-calledtripflexibilityparameter

δ

i,expressingthe

maximalextentoftriptraveltime,forwhichsharingisstillattractive(andbeyondwhichitbecomesunattractive).Weread itdirectlyfromtheutilityformula(Eq.4),assumingthatthetraveltimetiisextendedby

δ

isuchthatutilityiszero,which

yields:

δ

i=



1

β

s− 1



ti+

β

c

β

t

β

s

λ

li (6)

Solutionoftheaboveposesanupperlimitontraveltimeextension, beyondwhichasharedtripbecomesunattractive, i.e.break-evenpoint attheindividuallevel.Wefindthisformulationefficienttodeterminerides,forwhichtˆi≤ ti+

δ

iand

|

tˆip− tp

i

|

δ

i/

β

d holdstrue,aspotentiallyattractive. Sucha formulationallows toextendthestatictime window,usedin

previousstudies,anddirectlyidentifyboundsforattractivesharedride. LetusdefineariderservingQr⊆ Qtripsthrough:

r=

(

Qr,Or,Dr,trp

)

(7)

whereQr isasequenceofservedtrips, Or andDr are orderedsequencesofserved trips’originsanddestinations, respec-tively,and thetrp denotes departure time fromthe first origin. We consideronly rides forwhich originsalways precede

(8)

destinations,i.e.nodestinationisservedbeforethelastorigin. Bygeneratingsequencesoforiginsandsequences of desti-nationswegetthescheduleofaride,Nr=

(

o1 ,o2 ,...on,d1 ,d2 ,...,dn

)

.Thenumberoftripsservedby arideiscalledthe

degree,ororderofasharedrideandisdenotedbymr=



Qr



.

Riderservesasequenceofnodesnintimeinstancestˆr,n,calculatedrecursivelystartingattimeinstantt1 p,shiftedwith

δ

r,andmovingforwardforeachserved nodewiththetraveltime tbetweenconsecutivenodes,plusanadditionalservice

timetsforeachpick-upanddrop-off:

ˆ tr,n=



tnp+

δ

r ifn=Nr,1 ˆ tr,n−1 +t

(

Nr,n−1 ,Nr,n,tˆr,n−1

)

+ts otherwise (8)

Thetotaltraveltimeofarideistr=tˆr,N− ˆtr,1 .Traveltimeanddeparturedelayforeachservedtriparerespectively: ˆ tr,i=tˆr,di− ˆtr,oi (9) ˆ trp,i=tˆr,oi− t p i. (10)

Fromtheabove,wecancalculaterideutilityforeachofthetripssharingit,Ui,r.Weareinterestedwhetheralongertravel

timetˆr,iandapick-updelaytˆrp,iarecompensatedbythepricediscount

λ

liinEq.4.Wesaythatarideisattractiveonlyif

itisattractive(positivesharingutility)forallthetripssharingtherespectiveride,whichleadstofollowingrideutilityUr

formulation: Ur=  iQr Ui,r· br=  iQr Ui,r·  iQr bi,r, (11)

wherebr istheridefeasibility, computedasthe productoftripfeasibility bi,r (Eq.5). Theutility ofaride depends,apart

fromconsecutivetravel timesbetweenservednodes,onthedeparture timefromthefirst node,whichmaybe shiftedin ordertomaximisethetriputility.Todeterminethe optimalshift,yielding themaximalutility forsharingpassengers,we firstupdatethetripflexibilitywiththeactualtraveltimeextension:

δ

i,r=

δ

i

(

tˆr,i− ti

)

, (12)

whichconstitutesboundsfortheacceptabledeparture timeforeachtrip.Withinthebounds,we identifytheoptimal de-parturetimetr∗p ,forwhichUrismaximised.Rideutility,expressedasafunctionofdeparturetime,isa piece-wiselinear

function,whereoptimumcanbe foundanalytically.Here,we formulatean analyticalsolutiononlyfortripsofsecond de-gree,where the search space is still sufficiently large to call for the formulation of an analytical approach. For trips of higherdegree,wefindthat

δ

i,r narrowsthesearchspaceeffectively.Sothat,itcanbeexhaustivelysearchedforminimum andanalyticalsolutionsareobsolete:

trp=argmax tr∗p

Ur

(

tr∗p

)

(13)

2.1.1. Schedulinghorizon

Weexplicitlyaccountforschedulingconstraints.Specifically,foraridetobefeasibleitisnotsufficientthatitisattractive forallthetrips,butitmustalsobefeasiblyscheduledintime.Weintroduceaso-calledschedulinghorizonT,meaningthat trips are requested T seconds before the desired departure time tip. This allows to introduce an additional criterion for shareability:

br>0 ⇐⇒

|

tip− tjp

|

<T

i,jQr (14)

WetreatT asanexogenous parameterinourmodel.LargevaluesofT,implythatthe fullshareabilitypotential is re-vealed, sometimes referred to as’oracle’ settings (Santi et al., 2014) since it assumes that everything is known well in advance.Incontrast,whenTissmallthesettingisclosertoreal-timesystemoperationswheretripsaretypicallyrequested aslateaspossible,whichsignificantlylimitstheshareability,aswedemonstrateinouranalysis.

2.1.2. Profitablesharedride

Inthefollowing,wefocusontheprofitabilityofthesystemunderfixeddemandforon-demandservices.Thekeycontrol variableforserviceprovideristhediscountrateoffered forsharedrides.Ifthelatteristoolow itwillnotencourage trav-ellerstoshareandimpedethesharingpotential.Conversely,ifsettoohigh,serviceprovidermayfindithardtocompensate foritslostrevenueswithdetours,which,withhighdiscountrate,aremoreacceptablefortravellers.Thisstressestheneed todevelopamodel,thataccountsforthesecomplexinter-dependenciesandfeedbackloops,toanalyseserviceperformance. Asharedridegeneratesrevenuesandcosts.Withoutlossofgenerality,wemayassumerevenuestobethesumoffares paidbytravellers, whilethecosts,to beproportional totheridelength.The revenuesgeneratedby asharedrideare the sumoftripslengthslimultipliedbythereducedtripfare

λ

swhilethecostsareproportionaltoridelengthlr.Theprofitis

(9)

Fig. 2. Visualisation of trip-ride incidence matrix I m,r for 50 trips and 320 rides. Rows denote trips and columns denote rides of increasing degree (number

of trips per ride). Starting with a diagonal part of single rides, followed with FIFO pairwise shared rides, LIFO pairwise shared rides and finally triplets. Each trip may be assigned to only one ride, despite being shareable with multiple others trips via multiple rides.

oftriplengthsmultipliedby

λ

nswhilecostsareproportionaltothesumoftriplengthsl

i.Weareinterestedindetermining

whetherasharedrideyieldsahigherprofitforserviceproviderthanservingitbyofferingprivaterides:

 iQr

λ

sl i− lr>  iQr

λ

nsl i−  iQr li (15)

Whichyieldsthattheridediscount

λ

rcanbeexpressedas:

λ

r=1−

lr



iQrli

(16)

Thisallowsforaclearcomparisonwiththediscount

λ

offeredtopassenger,todeterminewhethertherideisprofitable

br>0 ⇐⇒

λ

r

λ

(17)

Dependingon theproblemsetting,onemaywish touse theaboveconditiondirectly, todetermineifa sharedrideis attractivefromtheperspectiveofallinvolvedpassengersaswellasprofitable.Keepinginmindthatprofitableridesofhigh degree may be composed ofnon-profitable rides oflower degree,the conditionshould be applied onlyafter the search spacehasbeenexploredandnotaspartofthehierarchicalexploration,asintroducedinthefollowingsections,otherwise potentiallyfeasibleridesofhigherdegreewillbeleftunidentified.

Note,thattheaboveconditionimpliesthateachofthesharedridesdirectlyyieldsaprofit,ratherthanthewholeservice. The proposed algorithm allows forspecifyingboth myopic, aswell asglobalprofitability conditions, asillustrated inour experiments.Toassessserviceprofitability weintroduceatermforthetotalcostreduction



.Calculatedusinga formula similarto(Eq.17),yetaggregatedforalltherides:



=1−  rRlr  rR  iQrli =1−Lr Lq (18)

wherewecomputethecostreductionthroughtheratiooftotalrideslength(Lr)tototaltripslength(Lq).Thisformulamay

be furtherusedtodetermineserviceprofitabilityattheaggregatelevel.Inparticular, ifcomputedonlyforsharedridesit indicatessharedridesprofitability



r.

2.2. Trip-rideassignmentproblem

Inthetypical,urbandemandpatternasingletripmaybeassignedtomorethanoneride,sothatthenumberoffeasible ridesisgreaterthanthenumberoftrips(asillustratedonFig.2).Toaddressthis,weformulateaso-calledtrip-rideproblem, formulatedasanassignmentproblem, whereeach tripi isunilaterallyassignedtoanattractiveriderandtheassignment yieldsminimal costs.Itisthen formulatedasaproblemofidentifyingabinaryvectorxroflengthequaltothenumberof

rides



R



,i.e.anassignmentvariableequaltoone ifarideisselectedandzerootherwise(Eq.19c).Thecosts CR arethen

expressedasthecostofeachridecr,multipliedbytheassignmentvariablexrandaggregatedforallrides(Eq.19a).

In particular, we consider two cost functions: service provider perspective (minimising the sumof ride time tr) and

passengerperspective(maximisethesumofutilitiesUr,i),whichcanbeextendedtoanyridecostformula.

Theassignmentshallmeettheconstraintofassigningeachtriptoexactlyoneride,obtainedthroughtherow-wisesum ofassignment variablexrandtrip-rideincidentmatrix Ii,r.The latteris abinarymatrix,whicheachentryisone ifrider

serves tripiandzerootherwise(Eq.19b),asillustrated inFig.2.Eventually,asolutiontotheproblem(Eq.19a)istheset ofridesR∗⊆Rsuchthatxr=1

rR∗.Weexpresstheshareabilityproblemasthefollowingbinaryprogram:

min CR

(

xr

)

=  rR crxr (19a) subjectto iQ Ii,rxr=1, (19b) xr

{

0,1

}

. (19c)

(10)

Otherauthorsaddressedthisproblembysolvingthemaximalmatchingproblemontheshareabilitygraph(Santietal., 2014),whichissuitableonlyfortrips ofadegreenot greaterthantwo,wheretrip-rideincidencematrixIi,r maybe easily

convertedintoagraph.Ifweconsiderridesofthreeormoretrips,suchmappingisnotobvious,andrequiresahypergraph representation(Santi etal., 2014) forwhich most of classic graph algorithms do not apply. Therefore,in the above, we adoptalinearproblemformulationof(Alonso-Moraetal.,2017),whichisapplicableforanysharingdegree.Notably,since ridesidentifiedwithouralgorithmarestrictlyattractivefortravellers,wehavenowmoreflexibilityinformulatingobjective functionstooptimiseforsystemexternalitiesorplatformobjectives,sincewecanguaranteethattheywillbecomposedof attractivesharedrides.

2.3.Algorithmtoidentifyattractiverides

Despiteitsclearform,thetrip-rideassignmentproblemdescribedaboveishardlysolvableinpractice.Themaindifficulty isto enumerate all the feasible attractive rides inwhich trips may be shared. Thisrefers first to finding all the subsets

Qr⊆ Q(thereare2n− 1subsetsforntrips),secondlygeneratingalltheorderedpermutationsoforiginsanddestinationsof eachidentifiedsubset(2· n!fortripofn-degree),andfinallyevaluatingtheutilityofeachrideUr(whichrequiresquerying

traveltimelook-uptableforeachtripsegment(Eq.8))anddeterminingtheoptimaldeparturetimetomaximiserideutility (Eq.13).Weaddressthiscomplexitybydevelopinganoriginal ExMASalgorithmasdetailedinthefollowingsections.The algorithmhierarchicallysearcheswithin thespaceoffeasibleridesRandefficientlynarrows it,beforeentering intocostly computations.We initialisea setR1 ofnon-shared singlerides (whichare alsosingle-elementsubsetsoftripsetQ),with anullutilityandacostthatequalsthedirecttravel timeti).Wethenincrementally increasethedegreeofsearchedrides.

Startingwithmatchingtrippairsintoridesofseconddegree,fromwhichwebuildadirectedmulti-graph,wherewesearch ridesofhigherdegree.

2.3.1. Attractiveridesofseconddegree.

Westart withidentifyingtrip pairs,whichcan be attractivelyshared byforming arideof seconddegree. Twotrips,i

andj,maybesharedinsixways(asdepictedinFig.3). Twoofwhichare non-shared(a,b)onFig.3),forwhichthefirst tripendsbeforethesecondonestartsandarenotconsideredfurtherhere.Twoforwhichoriginiisvisitedpriortoorigin

j (c,d).The former(c)isfurther calledFIFO(sincethe firstto bepicked-upis alsothefirst passengerto bedropped-off) andthelatter(d)calledLIFO (sincethelast passengerpicked-upisthe firstone dropped-off).In theproposed algorithm theorientedtrippairsareexplored,thuswefirstidentifyrideswhereoriginiprecedesoriginj,whiletheopposite(e,fon

Fig.3)areexploredthroughinversesearchesj,i. Weidentifytwosetsofpairwiseshareabletrips:

Fig. 3. Six possible ways to combine two trips i and j : non-shared sequences (a,b), FIFO and LIFO sequences with origin i visited first (c,d), FIFO and LIFO sequences with origin j visited first (e,f). Ones identified within the algorithm are a FIFO sequence where i precedes j for origin and destination (c) and LIFO sequence (d). First two are out of scope, since they are not shared, while last two are explored through the inverse search.

(11)

(a)R2pairwiseFIFOtrips(20),forwhichi≺jforbothoriginsanddestination(21):

R2=

{

ri j:Qr=

(

i,j

)

,Or=

(

oi,oj

)

,Dr=

(

di,dj

)

}

(20)

oi≺ ojdi≺ dj

ri, jR2 (21)

(b)R2 pairwiseLIFOtrips(22),forwhichdjisvisitedpriortodi(23)

R2=

{

ri j:Qr=

(

i,j

)

,Or=

(

oi,oj

)

,Dr=

(

dj,di

)

}

(22)

oi≺ ojdj≺ di

ri, jR2 (23)

Forn trips we have n2 trip pairs forming a potential sharedrides to explore, which evenfor a medium trip setsize

resultsina verylargesearch space.Toestimatethe sharingutility ofseconddegree sharedride,oneneeds todetermine traveltimesforeachtripsegmentt(oi,oj),t(oj,di)andt(dj,di)(asdepictedinFig.4)anddeterminetheoptimaldeparture

timetip.

We propose thefollowing,sequential reduction,aiming to efficientlyreducing the dimensionalityofthe search space. Allfiltersbelowarederivedfromthetriputility formula(Eq.4) andorderedtoeffectivelyreduce thesizeofthesolution spaceunderconsideration,beforeexecuting costly traveltime queries,neededforevaluatingutilities. Theresultingsetof attractivepairwiseridesrandrisobtainedifalltheaboveconditionsaremet:

a) Schedulinghorizonfilter:

bi,r=1 ⇐⇒

|

tjp− t p

i

|

<T (24)

Firstwecheck,whethertwotripsarerequestedwithinthesameschedulinghorizon(Eq.14). b) Departurecompatibilityfilter:

bi,r=1 ⇐⇒

(

tpj+

δ

j

)

(

tip

δ

i

)

(25)

bi,r=1 ⇐⇒

(

tpj

δ

j

)

(

tip+ti+

δ

i

)

(26)

Followed withfiltering trips, for whichorigins cannot be reached, even if travel timesare zero.We employ the trip schedulingflexibilityterm(

δ

ofEq.6),ratherthanfixedtime-windows.

Conditions24–26allowtoreduce thesamplesizeatleastbyan orderofmagnitudeinrealistic settings.Notably,they canbeevaluatedusingsolelytripdatatiand

δ

i(ofsizen,ratherthantrip-pairdataofsizen2 ).

c) Origincompatibilityfilter:

bi,r=1 ⇐⇒

(

tip+t

(

oi,oj

)

+

δ

i

)

(

tjp

δ

j

)

(27)

bi,r=1 ⇐⇒

(

tip+t

(

oi,oj

)

δ

i

)

(

tjp+

δ

j

)

(28)

WenowincludethetraveltimebetweenoiandojinEqs.25and26,toguaranteethatoriginjisreachablefromiwithin

departureflexibilitywindowsofbothtrips.Mind,thattraveltimesarefirstqueriedin(Eq.27),whenthereducedsearch spaceisalreadyreducedsignificantly.

d) Attractivenessfori:

bi,r=1 ⇐⇒ Ui,r>0 (29)

Aftermakingsuretriporiginsarereachable,we cannowdeterminethesharingutility fortripidirectlyfromEq.4.To thisend,wequeryforthetraveltimeonthesecondsegmentofthetrip:t(oj,di).

e) LIFOattractivenessfori:

bi,r=1 ⇐⇒ Ui,r>0∧Ui,r>0 (30)

At thisstage we mayexploit the utility dominance ofFIFO over LIFO (Ui,r≥ Ui,r ) anduse thealready decimatedtrip candidatessettodetermineLIFOridesr.Wegeneraterfromrbyswitchingtheorderofvisiteddestinationnodesand updatingtraveltimesti,tj,accordingtoFig.4.Traveltimeisnowlongerforiandshorterforj.UsingEq.30wecheck,

whethertheutilityfori,whichwaspositivewhentˆiwastoi,oj+toj,di,remainspositivewhentˆiisnowtoi,oj+toj,dj+tdi,dj. f) Attractivenessforj:

bj,r=1 ⇐⇒ Uj,r>0 (31)

bj,r=1 ⇐⇒ Uj,r>0 (32)

ThefinalconditionforbothFIFOandLIFO ridesisthattheutility (Eq.4) ispositivealsoforthesecond tripj.Now,we queryforthelastsegmentoftheride:t(di,dj)forFIFOandt(dj,di)forLIFO.

(12)

TodeterminethesharingutilitywithEqs.29and31,theoptimaldeparturetimetrp needstobedetermined.Mindthat, thankstothefiltersEqs.25and(26),thesearch spaceisalreadyreducedtoreachableorigins.Ifdestinationjisreachable fromoiandistime-wiseacceptableforbothi andj,thenwe candistributethetotaldeparturedelay

(

tip+t

(

oi,oj

)

− tpj

))

evenlybetweensharingpassengers.Otherwise,oneoftheboundariesneedstobeexploited, namelythesmalleramong

δ

i

and

δ

j.Whichleadstothefollowinganalyticalformulation:

δ

r=min

(

0.5

(

tip+t

(

oi,oj

)

− tpj

))

,

δ

i,

δ

j

)

(33)

We summarisethe above sequence withthe following algorithm, toidentify attractive shared rides ofsecond degree (Algorithm1). Thesequencingof’if’conditionsaimsatminimisingthenumberofpairsinthetripsetbeforequeryingthe

Algorithm1:IdentifypairwiseshareableFIFOandLIFOtrips.

PairwiseShareable

(

R1,T

)

inputs:

R1 * single trips

T * network travel times

output:

R2 * pairwise shareable trips

foreachiQdo // iterate through all trip pairs

foreach jQdo // and identify pairs with:

if

|

tpj − tp

i

|

<T then // Scheduling horizon filter (eq. 24)

if

(

tpj+

δ

j

)

(

tip

δ

i

)

then // Departure

if

(

tpj

δ

j

)

(

tip+ti+

δ

i

)

then // compatibility filter (eq. 25, 26)

queryt

(

oi,oj

)

if

(

tip+t

(

oi,oj

)

+

δ

j

)

(

tip

δ

i

)

then

if

(

tip+t

(

oi,oj

)

+

δ

j

)

(

tip+

δ

i

)

then // Origin comp. filters (eq. 27, 28)

queryt

(

oj,di

)

ˆ

trp=min

(

0.5

(

tip+t

(

oi,oj

)

− tpj

))

,

δ

i,

δ

j

)

* Optimal departure time (eq. 33)

r=

((

i,j

)

,

(

oi,oj

)

,

(

di,dj

)

,tˆrp

)

ifUi,r>0then // positive U for i (eq. 29)

queryt

(

di,dj

)

ifUj,r>0then // positiveU for j (eq. 31)

R2+=r * success for FIFO

r=

((

i,j

)

,

(

oi,oj

)

,

(

dj,di

)

,tˆrp

)

* potential LIFO candidate

queryt

(

dj,di

)

ifUj,r >0then // positiveU for j (eq. 30)

ifUi,r >0then // positive U for i

R2 +=r * success for LIFO (eq. 32)

Result:R2=R2R2

traveltimesanddeterminingoptimaldeparture time(whichismostcomputationallyexpensive).Thisprocedureproves to behighlyuseful:first,bycuttingthecomputationtimesbyanorderofmagnitudeandsecond,byenablingthecomputation ofpair-wiseshareabilityoflargetripsets.Theefficiencyofthisapproachisillustratedforasetof1000tripsinFig.5where 3600 shareabletrip pairs are identified froma search spaceof one million trip pairs. Importantly, the algorithm is not

Fig. 5. Pairwise trip shareability matrix, where search space for shareable pairs i, j (marked in black) is gradually reduced with consecutive filters. The initial set of 1 0 0 0 0 0 0 pairs is reduced to 135 0 0 0 with ( Eqs. 24, 25 and 26 ), then to 66 0 0 0 with ( Eqs. 27, 28 ). Next, only 14 0 0 0 pairs have a positive utility for i ( Eq. 29 ) and finally just 3 600 pairs happen to be attractively shareable also for j ( Eq. 31 ). Computation time for one million pairs is around 15s.

(13)

Fig. 6. Shareability graph with multiple directed edges per pair of trips (FIFO and LIFO). Dashed edges illustrate two possible extensions of a ride of third degree into fourth degree.

heuristic andprovides theexactsolutionwithin areasonableamountoftime. Itisimplemented usingefficientSQLtable joinsandqueries.

2.3.2. Shareabilitygraph

StartingwiththesetoffeasibleridesofseconddegreeR,weincrementallyexploreridesofhigherorders.First,wecreate ashareabilitygraphS=G

(

Q,R

)

wherenodesaretrips QQandarcsare pair-wiseshareableridesrR2,asdepictedin Fig. 6.Contrary to (Santi etal., 2014), ourgraph is directed, since arcs denotepairwise shareability,where the order of origins anddestinationsmattersandisalready determined.Moreover, multipleedges are allowed per node pair, one for FIFO andanotherforLIFO pair-wiseshareability. Inparticular,two nodes(trips) maybeconnected withfour edges(FIFO andLIFOridesperdirectioni,jandj,i).

Fig.6 illustratesthe proposedgraph witheight trips,connected bytwelveedges. Isolated node(Q1 ) cannot beshared withanyother trip.TripQ2 canbe sharedwithQ3 bothin FIFOandLIFO sequence,yetonly whenQ2 is picked-upfirst.

Q4 canbesharedwithQ5 inbothordersandwithQ2 asasecond triponly.TripsQ5 ,Q6 andQ7 formpotentiallyshareable triplet (r5,6,7 ), where the order oforigins is predeterminedby the edges creatingthe cycle: O5 ,6 ,7 =

(

o5 ,o6 ,o7

)

, D5 ,6 ,7 =

(

d5 ,d6 ,d7

)

.

Directedmulti-graphisfound highlyefficientinsearchingforhigherorderrides.Weintroducethefollowingtheorems forextendingagenericriderwithatripq,whichweutiliseinidentifyingridesofhigherorder:

Theorem1. Attractivesharedriderofanordergreaterthanone,canbeextendedintoanattractiverideofahigherdegreerby addingtripqifandonlyifalltripsiQraredirectlyconnectedwithnodeqthroughadirectedgeri,q ingraphS.Setofedges,

suchthateachtripinrisconnectedwithqwithexactlyoneedge,iscalledanextensionofrintoq,denotedE(r,q)(alsoknown asastaringraphtheory):

br=1 ⇐⇒ br·



ri,qE(r,q)bi,q=1

Theorem1canbederiveddirectlyfromthefactthattheutilityofeachtripin theextendedrideUr (Eq.4)islowerorequal

totheutilityofthistripinthenon-extendedrideUr,since bothtraveltimeandwaitingtimeneedtobeeithergreaterorequal

fortheextendedride.Ifso,risfeasibleonlyifallrE(r,q)arefeasible,i.e.theyhavebeenidentifiedasridesofseconddegree andarethereforeedgesinS.

Theorem 2. Foreach extension E(r, q) of rider to ride r with trip q, there exists atmost one feasible order of origins and destinationsforrider,thatisunambiguouslyreadfromtypesofedgesE(r,q),connectingtripsofriderwithtripq.

Theorem2isderivedasfollows:1)ThankstothedirectednatureofthegraphS,theorderinwhichoriginsarevisitedinthe currentlyexploredextensionE(r,q)ispredetermined.Bydefinitionoi≺oj

ri,jRforbothFIFOandLIFOedges(Eqs.21,23).In

particular,oi≺oq

ri,qE(r,q),thusorigindqcanbevisitedonlyafteralloriginsarevisitedandbeforethefirstdestinationis

visited.2) Analogically,theorderofdestinationsisalsopredetermined,albeitthedestination maybeplacedatanyposition.To determineit,letusdivideE(r,q)intoFIFOedgesE+ =E

(

r,q

)

:rR2andLIFOedgesE−=E

(

r,q

)

:rR2 .FromEq.21wehave

lower bounds dr≺ dq

rE+ , and fromEq.23 we can establishupperbounds dq≺ dr

rE.Thecombination of which

yields two bounds between which destination dq may be inserted: max

(

dE+

)

≺ dq≺ min

(

dE

)

. Being either infeasible (when

lower bound max

(

dE+

)

isgreater than upperbound min

(

dE

)

)or pointingexactly to one feasibleposition (sincein thatcase

max

(

dE+

)

alwaysdirectlysucceedsmin

(

dE

)

).

WeillustratethiswiththeexampleshowninFig.6.Feasiblerider,servingtripsQ5 ,Q6 andQ7 ,maybepotentiallyextended to riderservingalsorideQ8 ,sincethereisastar-graph(dashed edges)connecting allthetripsfromrwithQ8 ,allowingfora so calledextensionE(r,q)of riderwith tripq (seeTheorem1).Infact,there aretwosuchstar graphs,since tripsQ7 and Q8 areconnectedbytwoedges.Onlyoneofthem,however,yieldsafeasibleride(seeTheorem2).Forbothcandidateridesoffourth degreeorigino8 willbevisitedfourthwithin rider.If weconsideranextensioncomposedofLIFOedges only,thenweidentify afeasiblesequenceofdestinations,whered8 isthefirstvisiteddestination,sincealltheedgesofextensionE(r,q)areLIFOtype, i.e.d8 ≺di

ri,qE(q,r).Ifwe,however,considerasecondextensionwhereQ7 andQ8 areconnectedwithFIFOedge,weendup withaninfeasibledestinationsequence:d8 ≺d5 ≺d7 ≺d8 ,i.e.max

(

dE+

)

>min

(

dE

)

inTheorem2.

(14)

Fig. 7. Ride utility U r , as a function of departure time t rp for candidate rides of fourth degree. Bold lines denote feasible rides (i.e. utility is positive for

all trips at some departure time), and light lines denote infeasible trips. A period of indifference can be observed for all rides. We select the earliest time instant of that period allowing for the longest acceptable delays in the actual real-time operations.

2.3.3. Matchingtripsintohigherorderrides

Weutilisetheabovetheorems toproposea methodto identifyallfeasibleandattractiveextensionsofrider.Wefirst identifynodes (trips) Sr pair-wiseshareable withall trips of ride r.They are found through the intersectionof trips S+ i

shareablewitheachtripride: Sr=



iQrS +

i (34)

Then,foreach candidate triprSr,we enumeratestargraphs (extensions)E(q, r) connecting tripsof riderwithtrip q.

SincegraphS isamulti-graphwithtwopossible arcsconnectinganordered pairofnodes,fortripofdegreenthere are 2n possibleextensionsE(q,r) ifthe graphiscomplete.However,thegraphis likelytobesparse (aswe showbelow)and

sparsityincreasesfor higherdegrees. Moreover, fora generic ride ofdegree n not morethan n+1destination insertion pointsarepossible.Foreachextension E(q,r)we determinean insertionpointforthedestinationanditsfeasibility(using

Theorem2):

max

(

dE+

)

≺ dq≺ min

(

dE

)

(35)

Whenweidentifyfeasiblerider,weneedtodetermineitsoptimaldeparturetimetrpwithEq.13.Weleveragehereonthe previouslydefinedtripflexibility

δ

iasthemaximaldeparturedelayforall tripsofsharerides.Thanks tothis, andthefact

thattheshareabilitygraphissparse,sothatthenumberoffeasibleridesstronglydecreaseswiththedegree,wecannarrow thesearchspaceefficientlytoallowperforminganexhaustivesearch(withEq.13).Fig.7depictstheutilityasafunctionof departuretime,forasampleofridesoffourthdegree.Incase,whenadeparturetime thatyieldsapositiveutilitycannot befoundwithintheboundaries,wecanalreadyconcludethattherideisinfeasibleandterminate.Otherwise,we evaluate theutilityofeachtripwithinthenewrider(andterminateassoonasanon-positiveutilityisfound).

WesummarisetheaboveinAlgorithm2,which,foranygenericriderofdegreen,findsallfeasibleridesofdegreen+1 extendingit.Notethatthealreadyorderedsequenceoftripsinriderisextendedsothattheneworiginisalwaysinserted atthelastposition,othersequences(iffeasible)areexploredasextensionsofdifferentrides.Theproposedgraphmethods canbeseenasanextensionofonesproposedby(Alonso-Moraetal.,2017),yetsuitedforadirectedgraphandhierarchical searches,withtheoptimaldeparture timeandpredeterminedsequenceallowing toavoidheuristicsoftravellingsalesman problemforridesofdegree greater thanthree.Importantly, Algorithm2doesnot requirequeryingtravel times,sinceall traveltimesofriderarealreadystoredingraphS.

2.3.4. Implementation

Belowwe introduce the complete ExMAS algorithm (Algorithm 3), to match trips into attractive rides. The proposed algorithmfirst identifies attractive ridesof second degree R2 (with Algorithm1), basedon which adirected multi-graph

Sis built.Then ititerateswithincrementally increasing degreeof searchedrides untilall feasiblerides are explored.For eachdegreen,weloopoverallidentifiedridesofdegreen− 1andextendthemtofeasiblerides(withAlgorithm2).When extensionsofdegreen− 1ridesareallidentified,thealgorithmproceedstoloopoverridesofdegreenandextendsthem toridesofdegreen+1.Thiscontinuesuntilnomoreextensionsarefound.

Onceallfeasibleridesareidentified,wesolvethetrip-rideassignmentproblem,definingtheridecostcrtofindthe

opti-malsolution(withEq.19a).Optionally,beforesolving,wemayapplyafiltertomaintainonlyprofitablerides(byemploying

(15)

Algorithm2:Extendrider. ExtendRide

(

r,S

)

inputs: r // extended ride S // shareability graph output:

R // set of feasible rides obtained as an extension of r

Sr=iQrS

+

i // find trips shareable with all trips of ride r

foreachqSrdo // trip candidates

foreachE

(

q,r

)

E

(

q,r

)

do // extensions of r with q

E=E+ ∪E− // divide into FIFO and LIFO edges

ifmax

(

dE+

)

<min

(

dE

)

then // if there is feasible order of destinations (eq. 35)

r=rq // extend ride r

Or ←Or

(

oq

)

// insert origin at the last position

Dr ←insertdqtoDr atpositionmin

(

E

)

(

max

(

E+

))

/2 // insert destination

trp=argmaxt∗p r Ur

(

t

∗p

r

)

// determine optimal departure time

foreachiQrdo // trips of a new ride r

ifUi,r≤ 0then // check if sharing utility is positive

break // early exit

R+=r // success

Result:R

Table 1

Search space and its reduction for a sample of 30 0 0 trips in Amsterdam. Out of 4.65 × 10 20 theoretically feasible trips shared by five passengers only 123 have to be actually examined and 76 of which are identified as attractive and 44 of those are assigned as part of the optimal solution. Out of 6.47 × 10 11 trips of third degree only 1807 need to be explored, 243 of which are found feasible and up to 160 are selected within the trip-ride assignment. For pair-wise computations, set of efficient filters ( Algorithm 1 ) managed to gradually narrow to 5270 attractive pairwise shareable rides, forming arcs in our shareability graph.

degree: 1 2 3 4 5 6 7

search theoretical 3.00 × 10 3 3.60 × 10 7 6.47 × 10 11 1.55 × 10 16 4.65 × 10 20 1.67 × 10 25 7.01 × 10 29

space: explored 3000 8,997,000 1807 226 123 24 0

attractive 3000 5270 243 130 76 8 0

assigned 1422 435 160 44 8 2 0

Akey featureofthealgorithm isthat thesearchspace, whichtheoretically explodescombinatorially,becomessmaller witheachadditionaldegreethankstoanefficientreduction.ThiscanbeseeninTable1where3000tripsarematchedinto ridesinrealisticsettingandparameterization(thespecificationthereofisdetailedinthenextsection).Outof4.65× 1020

theoreticallyfeasibletripssharedbyfivepassengers,only123neededtobeexplored,76wereidentifiedasattractiveand8 wereassignedintheoptimalsolution.Outof6.47× 1011 tripsofthirddegree,only1807neededtobeexplored,243were

foundfeasibleandfinally160wereselectedwithinthetrip-rideassignment.

The algorithm is implemented in Python 3.7 using

pandas

library for data management and SQL-like queries and

networkx

forgraph operations. Computationtimesare reportedin Section 3.2.9.The codeis open-source andavailable onapublicrepository.

2.4. Shareabilityindicators

Weanalyseride-sharingwiththefollowingsetofsystem-wideindicators,computedforthesetofridesR∗resultingfrom

algorithm3:

Tqtotalpassenger-hourstravelled,Tq=iQti,r,

Trtotalvehicle-hourstravelled,Tr=iRtr,

Lrtotalvehicle-kilometrestravelled,Lr=iRlr,

Urtotalpassengerutility,U=iQUi,r,

Rnumberofrides,R=



R



, Itotalrevenue,I=iQ

λ

i· li,

Oaverageoccupancy,O=Tq/Tr.

We compare thevalues obtainedfor sharedrides to the oneswithout sharing andreport the relative difference that stemsfromsharing,e.g.



Tq=

(

Tqs− Tqns

)

/Tqns.

Cytaty

Powiązane dokumenty

Tak więc sam świat nas otaczający, a raczej trudności powstające przy opisywaniu go za pom ocą aparatu klasycznej teorii mnogości, stały się pow odem poszukiwania

Efektywność ekonomiczna poszczególnych technologii energetycznych, dla wa- runków uśrednionych dla całej UE, została przedstawiona w dokumencie Komisji Europejskiej:

In the green region of color space, a wide-gamut display has some added value, but it is noted that 90% of the observers prefer a boundary that is halfway between EBU and the

In authors opinion the proposed set of indicators is a useful tool for measuring the three dimensions of sustainable development, which is adapted to the

of higher level representation by adjusting the weights on each individual source for improving the video captioning performance. 3) We develop a novel backward stochastic LSTM

Sama koncepcja trójprzym ierza o charakterze zaczepnym w rogów księcia polskiego jest w konkretnym w ypadku w ysoce nieprawdopodobna. Jakich korzyści m ógł się

Można by bowiem stwierdzić, że zmiana zasad wyborczych na Węgrzech pozytywnie wpłynęła na proporcjonalność systemu, jednak należy pamiętać o poczynionej przez

Elementem większości charakterystyk jest określenie pochodzenia społecz­ nego biskupa, przy czym w grę wchodzi w zasadzie jedynie elitamo-magnacki rodowód, bądź