24
Portland State University Portland State University PDXScholar PDXScholar Engineering and Technology Management Student Projects Engineering and Technology Management Winter 2018 Minimizing Commute Distance for Small Groups: A Minimizing Commute Distance for Small Groups: A Linear Programming Approach Linear Programming Approach Kevin Payne Portland State University Kritika Kumari Portland State University Levi Huddleston Portland State University Rabi Hassan Portland State University Follow this and additional works at: https://pdxscholar.library.pdx.edu/etm_studentprojects Part of the Operational Research Commons, and the Transportation Commons Let us know how access to this document benefits you. Citation Details Citation Details Payne, Kevin; Kumari, Kritika; Huddleston, Levi; and Hassan, Rabi, "Minimizing Commute Distance for Small Groups: A Linear Programming Approach" (2018). Engineering and Technology Management Student Projects. 2104. https://pdxscholar.library.pdx.edu/etm_studentprojects/2104 This Project is brought to you for free and open access. It has been accepted for inclusion in Engineering and Technology Management Student Projects by an authorized administrator of PDXScholar. Please contact us if we can make this document more accessible: [email protected].

Minimizing Commute Distance for Small Groups: A Linear

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Portland State University Portland State University

PDXScholar PDXScholar

Engineering and Technology Management Student Projects Engineering and Technology Management

Winter 2018

Minimizing Commute Distance for Small Groups: A Minimizing Commute Distance for Small Groups: A

Linear Programming Approach Linear Programming Approach

Kevin Payne Portland State University

Kritika Kumari Portland State University

Levi Huddleston Portland State University

Rabi Hassan Portland State University

Follow this and additional works at: https://pdxscholar.library.pdx.edu/etm_studentprojects

Part of the Operational Research Commons, and the Transportation Commons

Let us know how access to this document benefits you.

Citation Details Citation Details Payne, Kevin; Kumari, Kritika; Huddleston, Levi; and Hassan, Rabi, "Minimizing Commute Distance for Small Groups: A Linear Programming Approach" (2018). Engineering and Technology Management Student Projects. 2104. https://pdxscholar.library.pdx.edu/etm_studentprojects/2104

This Project is brought to you for free and open access. It has been accepted for inclusion in Engineering and Technology Management Student Projects by an authorized administrator of PDXScholar. Please contact us if we can make this document more accessible: [email protected].

ETMOFFICEUSEONLYReportNo.:Type: StudentProjectNote:

MinimizingCommuteDistanceforSmallGroups:ALinearProgrammingApproach

CourseTitle:OperationsResearch

CourseNumber:ETM540

Instructor:TimothyAnderson

Term:Winter

Year:2018

Author(s):KevinPayne,KritikaKumari,LeviHuddleston,RabiHassan

2

Abstract:Thispaperaimstominimizetotaldrivetimebetweenmembersandtheirrespectivegroupleader.Givenalimitongroupsizeanddaysavailable,howcanaformulationofagroupoccursuchthatthesumofthetotaldrivetimeisminimized.ToaccomplishthistaskaLinearProgram(LP)isimplementedthatincludesthreesetsofbinarydecisionsvariablessummingto4100variablesandavarietyofconstraintssummingbetween4200and4341dependingontheconstraintsenforced.For200membersand15leaderstheminimizedaveragecommutingtimewasfoundtobebetween4.99and5.36minutesdependingonthedistributionofavailabilityassumed.

Keywords:LinearProgramming

3

TableofContents

Abstract......................................................................................................................................................2

TableofContents…………………………………………………………………………………………………………………………………..3

Introduction...............................................................................................................................................4

LiteratureReview…....................................................................................................................................5

ProjectObjective........................................................................................................................................7

Results…………………………………....................................................................................................................10

Conclusion.................................................................................................................................................12

Appendix………….........................................................................................................................................14

Rcode…………….........................................................................................................................................19

4

Introduction

Oneofthekeyfunctionsofachurchistoprovideamemberwithavenuetobuildasenseof

communitywithotherchurchmembers.Oneoftheprimaryreasonswhycongregantswillselectasmall

churchtoattendratherthanalargechurchistheclose-knitcommunitythatmanysmallchurcheslend

themselvesto.Becauseregularchurch-goersoflargechurchesrarelyknow–letalonerecognize–all

theothercongregants,largechurcheswilloftenofferspiritually-relatedspecialinterestgroupsor

connectcongregantsintosmallgroupswheremembersareencouragedtoengagewiththeirfaith.

Whilechurchesofmoderatetolargesizecanoftenaccommodateamanualsortingprocessof

connectinginterestedmembertoavailablesmallgroups,theprocesscanbecomecumbersomefor

churcheswithweeklyworshippersabovetwothousand.Theprocessisoftencomplicatedbythefact

thatmemberswishtoattendasmallgrouplocatedclosetotheirresidence.Smallgroupsaretypically

hostedbyamemberofthesmallgroupattheirprivateresidence,howeveritisnotunusualthatthe

grouplocationalternatesbetweenmembers’residences.

Churchleadersaretaskedwithconnectingnewcongregantswithexistinggroups,formingnew

groups,and/orencouragingmaturecongregantstoformagroupoftheirown.Manychurchestakea

directhandinthemanagementofthesmallgroupsthatformbetweenthemembersoftheirchurch.

Becausethewell-beingofchurch-goers–especiallyregularchurch-goerswhoareinvolvedbeyondthe

Sundayservice–isvitaltothesuccessofachurch,itisimportantthattheleadersofthechurchensure

thatmembersaresatisfiedwithintheirsmallgroupsandthatthefundamentalprinciplesoffaithheldby

thechurcharenotcompromised.Therearemanyalternativepurposesbehindencouragingsmall

groups.Thesepurposesincludebutarenotlimitedtoconstructinganavenuetobuildupmoreleaders

forthechurch,providinganavenueforchurch-memberstoservetheirlocalcommunityorasocialneed

thattheyfeelpassionateabout,andincreasingthehealthofamember’sspirituallife.Whilethe

selectionofmembersforagroupdoesnothaveadeterministiceffectonthefulfillmentofthechurch’s

goals,factorssuchasthedistributionofageandgenderwithinagroup,thegeographicproximityof

groupmemberstoeachother,andthespiritualmaturityofgroupmembersdoplayanimportantrolein

thedegreeofsuccessintheabovegoalsthatthegroupachieves.

Theanalysisdoneinthispaperistoclustermembersofachurchintomultiplegroupssuchthat

thecharacteristicsofthegroupareoptimalforsuccess.AninterviewwasconductedwithCollin

5

Mayjack(PastorofCommunities)andGavinBennett(DirectorofCommunities)fromtheBridgetown

Churchinwhichthemanualsortingprocessforconnectingcongregantswithsmallgroupswasdescribed

andtheformulationofthisprojectbegan.Allchurch-goerswhowishtojoinasmallgroup(knownasa

BridgetownCommunity)mustfilloutaquestionnaire.Thesequestionswillultimatelyserveasourdata

forourmodel.Forinformationprivacyreasons,dataonaddressesofcongregantscouldnotbe

obtained.However,adatasetofaddressesinthePortlandareawasobtainedandtransformedtothe

sameformatasthespreadsheettemplateprovidedbyBridgetownChurch.

Inadditiontohomeaddress,thespreadsheettemplatealsoincludedfieldsforage,gender,

scheduleavailabilityanddesiretoleadasmallgroup.Thedistributionforage,gender,geographic

proximity,andavailabilityofmembers’scheduleswasdiscussedBridgetownleaders.Thedemographics

informationcouldbeusedforfutureworkbutwasnotincludedinourinitialanalysis.Themostrecent

Basicscohortconsistedofapproximately200members,with20membersexpressinginterestinleading

agroup.Anidealgroupsizeconsistsof10-15people,butbecausemembersmayoptoutoftheirgroup,

theoptimizationproblemallowsformationofgroupssized12-18people.Thereisalsoanon-binding

constraintthatlimitsthemaximumnumberofleadersto15.

LiteratureReview

Theproblemofgroupingmembersbyleaderis,atbase,aclusteringproblem.However,

becausetheprobleminvolvesassigningmemberstopre-specifiedleaders,typicaldatamining

algorithmssuchasK-meansclusteringcouldnotbeused.Rather,nonlinearoptimizationisthetool

usedtoselectaspecifiednumberofleadersfromalargergroupofpotentialleaderssuchthatthe

distancefrommemberstoleadersisminimizedandavailabilityconstraintsofmembersaresatisfied.

Ingeneral,optimizationproblemshavethefollowingcomponents:

•Anobjective–expressedasafunctiontomaximizeorminimize.

•Decisionvariables–elementsoftheproblemathandthatcanbechanged.

•Parameters–characteristicsoftheproblemthatarefixed.

•Constraints–limitsontheobjectiveordecisionvariables.

6

AlfredWeber(1970)wasthepioneerinresearchinlocationanalysis,afieldconcernedwith

locatingfacilitiessuchthatcostanddistanceareminimized.Manyfacilitylocationproblemsaremulti-

objectiveinnature,thetoptwoobjectivesbeingcost/distanceminimizationanddemandcoverage.

Profitmaximizationandenvironmentalconcernsarealsooccasionallyfactoredintolocationanalysis

objectivefunctions,buttraditionallyminimizingcost/timehasbeentheprimaryobjectiveofsuch

models.1

Facilitylocationproblemscanalsobeclassifiedaccordingtonumberoflevels.Bi-levelproblems

aresignificantlymoredifficulttoconstruct,asonemustformulatethemodelsuchthatthereisaleader

andafollowerindecisionmakingandwhereinformationavailabilityisdifferentatdifferentstagesof

decisionmaking.2Ourmodelinvolvesonlyonelevelofdecision-making:whichmemberstoassignto

whichleadersonagivenday.

Ouroptimizationproblemcouldbecategorizedfurtherasaschedulingproblem,asthe

availabilityofeachleaderandmembermustmatchinordertoformgroups.Examiningtheliteraturein

thisfield,wedistinguishedthreemaingroupsofschedulingproblems:shiftscheduling,daysoff

schedulingandtourscheduling,whichcombinesthefirsttwotypes.Ourprojectfallsunderthesecond

category(daysoffor“day-of-week”scheduling),astheavailabilityconstraintinourmodelforcesthe

optimizationofmemberandleaderschedulessuchthatallmembersofagroupcanmeetwiththe

leaderonatleastonedayoftheweek.3

Theschedulingproblemwithinourmodelcanbeclassifiedmorespecificallyasaspecialformof

coveringproblemwhereonefollowershouldbegroupedwithoneleader.Schillingetal.(1993)4classify

suchmodelsthatusetheconceptofcoveringintwocategories:(1)SetCoveringProblems(SCP)where

coverageisrequiredand(2)MaximalCoveringLocationProblems(MCLP)wherecoverageisoptimized.

OurprojecttakestheSetCoveringProblem(SCP)approach.

1Current,J.,Min,H.,&Schilling,D.(1990).Multiobjectiveanalysisoffacilitylocationdecisions.EuropeanJournalofOperationalResearch,49(3),295-307.2Caunhye,A.M.,Nie,X.,&Pokharel,S.(2012).Optimizationmodelsinemergencylogistics:Aliteraturereview.Socio-economicplanningsciences,46(1),4-13.3Baker,K.R.(1976).Workforceallocationincyclicalschedulingproblems:Asurvey.JournaloftheOperationalResearchSociety,27(1),155-167.4Schilling,D.A.(1993).Areviewofcoveringproblemsinfacilitylocation.LocationScience,1,25-55.

7

RevelleandHogan(1989)introducerandomnessinavailabilityandconsiderstraveltimeas

deterministic.5Ouranalysislikewiseconsidersmemberavailabilitytoberandomandusesonenon-

rush-hourestimateofdrivetimebetweeneverymemberwitheachpossibleleader.

Intheirnurseschedulingproblem,Bruckeretal.[56]constructshiftsequencesforeachnurse,

withthedifferingskilllevelsofnursesbeingcodedashardconstraints.6Whiletheavailabilityof

membersisconstructedasahardconstraintinourmodel,themostprudentmethodofincorporating

genderandagetargetswouldbetoformulatethesegoalsassecondaryobjectives.Settingappropriate

weightstothesesecondaryobjectiveswouldbeequivalenttoforcingasoftconstraintontheobjective

ofminimizingdistance.Thus,similartotheeffectofavailabilityontheobjectivevalueofourmodel,

incorporatingageandgenderintotheobjectivefunctionwouldresultinasolutioninwhichmembers

arematchedwithleadersthatarepotentiallyfurtherawaythanotherwise.Formulatingmember

characteristicsashardconstraints(asinBruckeretal.[56])wouldgreatlyincreasetheaveragedistance

betweenmemberandleader.BecausethemainconcernofBridgetownChurchistominimizedistance

betweenmembersandleaders,itwasdeterminedthatfactoringingenderandagewouldunnecessarily

complicatethemodel.

ProjectObjective

Thisoptimizationproblemselectsleaders,andmemberstobeinagroupwiththoseleaders,

suchthattheoveralldrivetimetraveledisminimized.Thefirsttaskafterattainingthedatasetwhich

includedthosevariableslistedabove,istofindthedrivetimetraveledbetweenmembersandleaders.

Thisisthecruxoftheoptimizationproblem,sincethemainobjectiveistominimizedrivetimesubjectto

avarietyofconstraints.TofindthesetimestraveleditmaybetemptingtousesomeformofEuclidian

distanceasameasureanddividebyaveragespeed,butoftentimesthiscanbemisleadingsinceactual

drivetimesmaybemuchdifferent.Tocounteractthis,thisresearchpullsdrivetimedatafromGoogle

Map’sAPIinseconds,aswellasdistance.Thetotalnumberofsecondsdrivenforallmemberstotheir

5ReVelle,C.,&Hogan,K.(1989).Themaximumavailabilitylocationproblem.TransportationScience,23(3),192-200.6VandenBergh,J.,Beliën,J.,DeBruecker,P.,Demeulemeester,E.,&DeBoeck,L.(2013).Personnelscheduling:Aliteraturereview.EuropeanJournalofOperationalResearch,226(3),367-385.

8

selectedleaderswillbetheobjectivevalueforourminimizationproblem.Algebraicallytheformulation

isasfollows:

!"#"$"%&{ )"$& $, + ∗ -[$, +]}

122

345

12

645

7ℎ&9&)"$& $, + :&;"#&<=ℎ&:9">&�"$&?&=@&&#$&$?&9$A#:+&A:&9+, A#:

- $, + "<&BCA+=D1";$&$?&9$"<A<<"F#&:=D+&A:&9+, 0D=ℎ&9@"<&

Therearemanyconstraintsneededinthismodelsothattheassignmentsofindividualsto

leadersisbothrealisticandoptimal.Thefirstmostobviousconstraintisthateverymemberneedstobe

assignedaleader.Thisisshownbelow.

- $, + = 1∀!&$?&9<$JD#<=9A"#=K

12

645

Next,itmustbeimposedthatifamemberisassignedtoaleader,thenitmustbetruethattheleader

hasbeenhasbeenchosenoutofthepoolofpotentialleaders.Itisimportanttorecallthatnotall

individualswhospecifythattheywishtoleadagroupwillendupleading.Forthisreason,itisnecessary

toimposethefollowingcondition.

- $, + ≤ M + ∀!&$?&9<$A#:N&A:&9<+JD#<=9A"#=KK

7ℎ&9&M + "<&BCA+=D1";OD=&#="A++&A:&9�"<A<<"F#&:=D?&A9&A+"%&:+&A:&9

Theaboveconditionrestrictsthevalueof- $, + suchthatnomembermwillbeassignedtoagroup

leaderlifthegroupleaderdoesnotexist.Next,arestraintmustbeinplacetolimitthetotalnumberof

leaders.Otherwiseallleaderswilllikelybeselectedsinceitcouldreducetotaldrivetime.Thefollowing

constraintrestrictsthetotalnumberofleadersallowable.

M[+]

12

645

≤ 20 − RJD#<=9A"#=KKK

7ℎ&9&R"<AO9&:&;"#&:OA9A$&=&9?M=ℎ&C<&9

9

Thelastconstraintthatwillmaketheoptimizationproblemrealistic,isthatthetotalsizeofeverygroup

needstobegreaterorequaltotwelvebutlessthanorequaltoeighteen.Thisconstraintcanbe

implementedasfollows.

- $, + ≤ 18A#: - $, + ≥ 12 ∗ M + ∀

122

345

122

345

N&A:&9<+JD#<=9A"#=KU

Theseconstraintsinsurethatforallleadersthemaximumnumberofmembersmustbelessthanor

equalto18.Inaddition,iftheleadersareselected,thentheirgroupmembersshouldsumgreaterthan

orequalto12.Theseconstraintswouldensurethatrealisticgroupingswouldbemade.

Moreconstraintsareneededinordertotakeintoaccounttheaddeddimensionofavailability.If

twoindividualsdonothavematchingschedulesthenthesetwoindividualsshouldnotbeplacedinthe

samegroupevenifthetwoindividualsarecloseinproximity.Wecanextendthissothatifamemberis

assignedagroupthenallmembersinthatgroupmusthaveacommondayavailability.Thisensuresthat

therearenoschedulingconflictsbetweenmembersinthesamegroup.Thisconstraintcanbe

implementedasfollows.

- $, + ∗ V>A"+A?"+"=M $, +, W

122

345

≥ - $, +

122

345

− X − 18 ∗ 9 +, W − M + + 1 JD#<=9A"#=U

∀N&A:&9<+A#:WAM<W

V#:

9 W, +

Z

5

≤ 3∀N&A:&9<+JD#<=9A"#=UK

7ℎ&9&V>A"+A?"+"=M"<&BCA+=D1";$&$?&�$A#:+&A:&9+\A#$&&=D#WAMW, 0D=ℎ&9@"<&

9 +, W "<&BCA+=D1";N&A:&9+D#WAMW"<#D=<&+&\=&:

X"<AO9&:&;"#&:OA9A$&=&9=ℎA=<D;=&#<=ℎ&\D#=<9A"#=

TheabovestatementsinConstraintsVandVIensurethatifamemberisassignedtoagroup

thenthetotalavailabilitymustbegreaterthanorequaltothetotalnumberofindividualsinthatgroup

foratleastonedayD.Since9 +, W needstobelessthanthreeinConstraintVI,thisensuresonlyoneof

10

thethreedayswillbeabindingconstraint.Inaddition,theincludedM + inConstraintVIprovidesa

measuresuchthatifthememberisnotcreatedthenthegroupavailabilityconstraintwilleasilybemet.

Kisequalto0iftheconstraintishardorischosenasequaling2iftheconstraintissoft.Thetotal

population’savailabilityincludingbothmembersandleadersintermsofpercentagesfollowstwo

distributions.Thefirstisoftenreferredinthispaperasthe‘MoreAvailability’matrixandfollowsthe

followingdistributionwith1percentofindividualsareavailableforonly1day,1percentofindividuals

areavailableforonly2days,30percentofindividualsareavailablefor3days,and68percentof

individualsareavailableforallfourdays.Theseconddistributionoftenreferredtoasthe‘Fewer

Availability’matrixhasadistributionsuchthat5%areavailableforonlyoneday,25%fortwo,40%for

threeand30%forfour.Theseconstraintstogetherwithanavailabilitymatrixwillprovidefora

minimizeddrivetimetraveledthatwillplacemembersintogroupsandselectrespectiveleaderforthose

groupssuchthatthereisatleastonedaywhereeveryonecanmeet.

Results

Asnotedintheabstract,theoptimalaveragecommutetimewasbetween4.99and5.36

minutesforthe200membersdependingonavailability.InRstudiotheLPsolver“symphony”and

“GLPK”wereusedtosolvetheseproblems.The“symphony”solversolutionwasultimatelyused.Figure

1intheappendixdisplaystheinitialproblemsetwithmemberscodedinthecolorblueandleaders

codedinwiththecolorred.Figure2displaysthesameaddresses,yetcolorcodeseachmember’s

addressbasedonwhotheirrespectiveleaderisfortheirgroup.Thisoptimizationusesallconstraints

andthe‘MoreAvailability’matrixwithKsettozerotofindanobjectivevalueof59870secondsor4.99

minutesonaverageperperson.Anaccessibleversion,withinteractivetoolsforbothmapshasbeen

madeaccessiblethroughthefollowinglinks.

Figure1:https://drive.google.com/open?id=1r8m2RUSJWpFgb6FZSjkWKiVrWt7e4-Fy&usp=sharing

Figure2:https://drive.google.com/open?id=1t7aPwC66Bbo38NjuCMkVC7_Xb7skBDmv&usp=sharing

Inadditiontotheinitialproblem,avarietyofotherproblemswerealsosolved.Oneofthese

problemswastoassesstheimpactsoftheavailability,groupsize,andleadersizeconstraintsonthe

optimalsolution.Itcanbeobservedinthedescriptionofthe‘MoreAvailability’matrixthat98percent

11

ofallindividualsinthepopulationareavailableformorethanthreedaysaweek.Asaresult,itwouldbe

expectedthattheremovalofsuchaneasilysatisfiedconstraintmaynotdrasticallyaffecttheoptimal

solution.Removingtheotherconstraintswoulddecreasecommutetime,butthesizeoftheeffectmay

bevaguer.Afterremovingallconstraintsdealingwithgroupsize,numberofleaderandavailability,time

traveleddecreasedbyabout18secondsperperson.Althoughthisamountmayseemsmallonan

individuallevel,thetotalincreaseintimetraveledduetoconstraintsis3,642seconds–aboutanhour

ofextracommutetimeaggregatedacrossallmemberseachweek.

Whileitmaybeinterestingtoanalyzetheimpactofthegroupsizeandleadersizeconstraintson

commutetime,theseconstraintsareessentialcomponentsofthesolutiondesiredbythechurch.Using

anavailabilitymatrixthatismorealignedwithactualreportedavailabilityofchurchmembers(the‘Less

Availability’matrix),the‘symphony’solverreportsaninfeasiblesolution.Tofindasolution,Kissetto

twosothatatleasttwomembersinagroupareallowedtobeunavailable.Underthisformulation,the

LPproblemisfeasibleandtheoptimalsolutionforthe‘LessAvailability’matrixis60449seconds(on

average5.36minutespermember).Comparingthissolutiontothepreviousresultwherethe‘More

Availability’matrixwasused,wefindthatreducingtheavailabilityofmembersandleadersaddsatotal

of60449–59870=579secondsor9.65minutestototalcommutetimeperweek.Thisisparticularly

interesting,sinceavailabilitydecreasesquitedramatically,whilethesolutiononlyincreasesslightlyin

termsoftime.ThelaxingoftheavailabilityconstraintwithKequaltotwo,allowsforthismodest

increase.TheclusteringofthisLPcanbeseeninFigure3,orinthelinkprovidedbelow.

Figure3:https://drive.google.com/open?id=1LDiGu6W57vkdD0wkQ9IKojFlFmpvEYjd&usp=sharing

Figures4and5giveasummaryofthefindingswithdifferentconstraints.Figure4presentsthe

objectivevalueforavarietyofdifferentconstraints.Asisexpectedandwillalwaysbetheresultof

imposingmorestringentconstraints,theobjectivevalueincreaseswitheachadditionofanew

constraint.SpecialattentionshouldbegiventotheimpactofhavingKequalstotwoontheobjective

function.NotonlydoesitallowtheLPtofindasolution,butitonlymarginallyincreasestheobjective

value.Figure5displayshowmanymemberseachleaderisassignedfordifferinglevelsofconstraints.

Withnoconstraintsimposed,numberofmembersperleaderisvolatile,withsomeleadershaving31

memberswhileothersonlyhave1member.Forformulationsinvolvinglimitsongroupsize,however,

thedifferencesinnumberofmembersassignedtoeachleadervarylittlewithchangesintheavailability

matrix.Onenotableexceptionisthemodelusingthe‘LessAvailability’matrix,whichassignsno

memberstoleader19.ItshouldalsobenotedthatFigure5onlycomparesthenumberofmembers

12

assignedtoeachleaderunderdifferentformulationsofthemodelbutdoesnotinformusastowhether

individualmembersareconsistentlyassignedtothesamegroup.Theconsistencyofindividualmember-

groupassignmentsacrossmodelscanbeverifiedbycrosscheckingtheinteractivemapsofFigure1,2

and3.

Althoughnotdiscussedindetailhere,thesameoptimizationswereconductedonwalkingtime.

ThemapsfortheseLPproblemsareinthesameorderintermsofconstraintsasthepreviousproblems

withdrivetimeandcanbeviewedinthefollowinglinks.

https://drive.google.com/open?id=1gLjbDIXJA98N1PH0wtssUmbJVjMExBt-&usp=sharing

https://drive.google.com/open?id=1e4BNlbWVow32TxFuMnnltxZkfn-CjqQm&usp=sharing

https://drive.google.com/open?id=1LviR-TMPC2i0czUoTkBSvsrkUe2tuSFA&usp=sharing

Conclusion

Theanalysisdoneinthispaperlaysthegroundworkforautomatingtheassigningofmembersto

leadersatBridgetownChurch.Whilethedataweregeneratedtomatchatemplateprovidedbythe

churchandthesolutionismerelyaproofofconcept,thepotentialusefulnessofthemodelframeworkis

significant.Ourmodelgeneratesthemostefficientgroupspossiblesubjecttotheavailabilityofevery

memberandleader.

Thoughourprojectissolvingaproblemofeffectivegroupformationforachurch,themodelwe

proposedtofindtheoptimumsolutionthatreducesthetraveltimefortheparticipantsinthegroupcan

easilybereplicabletosolveamyriadofproblems.Forexample,consideraretailbusinessmodel,where

firmsareconstantlytryingtoreachouttoasmanycustomersaspossiblewithoutincurringlargecosts

relatedtotheconstructionoffacilities.Ourmodelwouldminimizethedistancebetweencustomersand

stores,makingthedecisionofwheretobuildverysimple,givenalistofpotentialconstructionsites.

Similarly,whensettingupanewhospitalsorbank,decisionmakersarechieflyconcernedwithhowthey

couldmaketheserviceprovidedmoreaccessibletoallcustomers.Ourmodelagainwouldmakethe

decisionclearastowhattheoptimalallocationwouldbe.Additionalconstraintsorweightscouldbe

added,sothatdifferentareasmightbeassociatedwithahigherpriorityrelativetootherareas.

13

Ouroriginaldatasethasdemographicinformationofallthemembers.Itisnaturaland

compellingthatanextensionofourmodelwouldincludesuchfactorswhencreatinggroups.Thistype

ofimprovementwouldmakethemodelmoreinclusiveandnotonlysolvethedistanceminimization

problembutwouldaddyetanotherlayerontopoftheavailabilityconstraint.Suchamodelwould

undoubtedlyproveofinteresttomanybusinesses,sinceoptimalallocation,mayneedtoincludesome

referenceastowhattypeofpeoplelivearoundthearea.

Otherextensionsofourresearchworkcouldbetestingtheeffectivenessofthecreatedgroups.

ForBridgetownChurchthiscouldbeillustratedbytheturnoverrateineachgroupundertheleadership

ofaparticularleader.Indoingthisonecouldcreateasetofefficiencyindicesthatcouldmeasurethe

performanceofthosegroupsincomparisontoothergroups.Thiscouldpotentiallyuseadata

envelopmentanalysismethodashasbeensuggestedbysomepapersingroupleadershiptheory.

Whiletherearemanymoreextensionsthatcomenaturally,thismodelsolvestheissueof

creatinggroups,whileaccountingfornotonlydistancebutforavailabilityaswell.Thismethodof

clusteringwillprovidevalueaddedtotheBridgetownChurch,asitwillnowhavetheoptionofcreating

groupswithcompatibleschedules,asopposedtotheprevioustechniquewhereitwasunaccountedfor

intheirmethod.Thisvalueisembodiedinthetimesavedinselectinggroupsthatthechurchleadership

goesthrough,aswellasthetimesavedforeachmemberintermsofdrivetimeeachweek.

14

Appendix

Figure1:InitialMinimizationProblem

15

Figure2:GroupAssignmentsforDriveTime‘MoreAvailability’

16

Figure3:GroupAssignmentsforDriveTime‘LessAvailability’

17

Figure4:ObjectiveValueforDifferentConstraint

4.2

4.4

4.6

4.8

5

5.2

5.4

5.6

DriveTimeNoConstraints DriveTimeAllConstraintsMoreAvailability

DriveTimeAllConstraintsFewerAvailability(Soft)

DriveTimeAllConstraintsFewerAvailability(Hard)Infeasible

Minutes

ObjectiveValueforDifferentConstraints

18

1

0

5 5

20

17

4

7

9

3

12

8

10 10

31

11

2

23

8

14

0 0

12 12

18

12

0 0

12

0

12 12 12

14

18

12 12

18

12 12

0 0

13

12

18 18

0 0

12

0

15

12 12

14

18

13

12

18

0

13

1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0

NUM

BEROFMEM

BERS

LEADERID

MEMBERSASSIGNEDBYCONSTRAINTTYPEDriveTimeNoConstraints DriveTimeAllConstraintsFewerAvailability(Soft) DriveTimeAllConstraintsMoreAvailability

19

RCodeKritikaKumari,RabiHassan,LeviHuddlestonandKevinPayne

3/9/2018

#Model

install.packages("ompr.roi")install.packages("ROI.plugin.glpk")install.packages("ROI.plugin.symphony")install.packages("slam")install.packages("devtools")install.packages("data.table")install.packages("tidyr")install.packages("ompr")install.packages("magrittr")install.packages("dplyr")install.packages("dplyr")install_url("https://cran.r-project.org/src/contrib/Archive/slam/slam_0.1-37.tar.gz")

require(slam)require(ompr.roi)require(ROI.plugin.glpk)require(ROI.plugin.symphony)require(devtools)library(data.table)library(tidyr)library(ompr)library(magrittr)library(dplyr)library(stringr)library(readr)setwd("C:/Users/Levi/Documents/PortlandState/OperationsResearch/Project")#save(results_distance,file="distance")#save(availability_leaders_matrix,file="availability_leaders")#save(availability_members_matrix,file="availability_members")#save(availability_leaders_matrix,file="availability_leaders_sparse")#5,25,40,30#save(availability_members_matrix,file="availability_members__sparse")#5,25,40,30

#load(file="distance")#Drivetimeresults_distance<-read_csv("~/PortlandState/OperationsResearch/Project/distance_walk.csv")load(file="availability_leaders")availability_leader=availability_leaders_matrixload(file="availability_members")

20

availability_member=availability_members_matrixdistance<-as.data.table(results_distance[,1:3])rm(results_distance,availability_leaders_matrix,availability_members_matrix)#distance=distance[order(Time.de)]#distance<-transform(distance,id=match(Time.de,unique(Time.de)))a=200b=20k=5#b-k=actualnumberofgroupsuplimit=18lowlimit=12availabilty_soft=2

distance<-spread(distance,Time.de,Time.Time)setnames(distance,"Time.or","MemberLocations")distance=as.matrix(distance)distance=na.omit(distance)distance=distance[1:a,1:(b+1)]availability_leader=availability_leader[1:b,]availability_member=availability_member[1:a,]

availability=matrix(0,nrow=a*b,ncol=4)for(min1:a){for(dayin1:4){for(lin1:b){availability[b*(m-1)+l,day]=availability_leader[l,day]*availability_member[m,day]}}}colnames(availability)=colnames(availability_leader)availability=as.data.table(availability)availability$L=rep(1:b,a)

member_stuff=NULLfor(iin1:a){temp=rep(i,b)dim(temp)=c(b,1)

21

member_stuff=rbind(member_stuff,temp)}availability$M=member_stuffrm(temp,member_stuff,availability_leader,availability_member)

#FORMULATINGTHEMODELmodel<-MIPModel()%>%#1iffmembermgetsassignedtoleaderladd_variable(x[m,l],m=1:a,l=1:b,type="binary")%>%

#1iffleaderlischoosenadd_variable(y[l],l=1:b,type="binary")%>%#1ifonDayDforleaderLthedayisnotchosenasthemeetingadd_variable(r[D,l],D=1:4,l=1:b,type="binary")%>%

#Minimizethedistanceset_objective(sum_expr(as.numeric(distance[m,l+1])*x[m,l],m=1:a,l=1:b),"min")%>%

#everymemberneedstobeassignedtoaleaderadd_constraint(sum_expr(x[m,l],l=1:b)==1,m=1:a)%>%

#ifamemberisassignedtoaleader,#thenthisleadermustbetheactualleaderofthegroup#notjustthepotentialleaderadd_constraint(x[m,l]<=y[l],m=1:a,l=1:b)%>%

#Lessleadersthanthetotaladd_constraint(sum_expr(y[l],l=1:b)<=(b-k))%>%#Numberofmembersineachgroupneedstobebetween12and18add_constraint(sum_expr(x[m,l],m=1:a)<=(uplimit),l=1:b)%>%add_constraint(sum_expr(x[m,l],m=1:a)>=(lowlimit)*y[l],l=1:b)%>%

#Availability,atleastonedayintheweek,theyallcanmeetonthesamedayadd_constraint(sum_expr(x[m,l]*as.numeric(availability[M==m&L==l,1]),m=1:a)>=(sum_expr(x[m,l],m=1:a)-availabilty_soft)-uplimit*(r[1,l]-y[l]+1),l=1:b)%>%

add_constraint(sum_expr(x[m,l]*as.numeric(availability[M==m&L==l,2]),m=1:a)>=(sum_expr(x[m,l],m=1:a)-availabilty_soft)-uplimit*(r[2,l]-y[l]+1),l=1:b)%>%

22

add_constraint(sum_expr(x[m,l]*as.numeric(availability[M==m&L==l,3]),m=1:a)>=(sum_expr(x[m,l],m=1:a)-availabilty_soft)-uplimit*(r[3,l]-y[l]+1),l=1:b)%>%

add_constraint(sum_expr(x[m,l]*as.numeric(availability[M==m&L==l,4]),m=1:a)>=(sum_expr(x[m,l],m=1:a)-availabilty_soft)-uplimit*(r[4,l]-y[l]+1),l=1:b)%>%

add_constraint(sum_expr(r[D,l],D=1:4)<=3,l=1:b)model

result<-solve_model(model,with_ROI(solver="symphony",time_limit=1200,gap_limit=.1))result

#result<-solve_model(model,with_ROI(solver="glpk",verbose=TRUE))#result

matching<-result%>%get_solution(x[i,j])%>%filter(value>.9)%>%select(i,j)#%>%#arrange(i)

matching=as.data.table(matching)setnames(matching,"i","MemberID")setnames(matching,"j","LeaderID")

groups=data.table(NULL)for(pin1:b){if(p%in%unique(matching$`LeaderID`)){groups=rbind(groups,cbind(distance[matching[`LeaderID`==p]$`MemberID`,1],colnames(distance)[p+1]))}}setnames(groups,"V1","MemberLocations")setnames(groups,"V2","LeaderLocation")tabulate(matching$`LeaderID`)

###Levi'sCode

23

List=cbind(matching[1:200,1],groups[1:200,1],matching[1:200,2],groups[1:200,2])write.csv(List,"List.csv")