Upload
temple
View
26
Download
0
Embed Size (px)
DESCRIPTION
Bay Area Destination and Sight-Seeing Tool. LCDR Bryan “Donny” Rex LCDR Nick Ulmer. Goal of the B.A.D.A.S.S. Tool. Develop a versatile Monterey day-trip planning tool that provides a better solution than simply running Google Maps. Make the tool customizable with user preferences. - PowerPoint PPT Presentation
Citation preview
1
Bay Area Destination and Sight-Seeing Tool
LCDR Bryan “Donny” RexLCDR Nick Ulmer
2
Goal of the B.A.D.A.S.S. Tool
• Develop a versatile Monterey day-trip planning tool that provides a better solution than simply running Google Maps.
• Make the tool customizable with user preferences.
• Achieve a robust architecture that is adaptable to rush hour, construction, and other delays.
i.e. Google Maps on Steroids!
3
Using Google Maps
4
Using the B.A.D.A.S.S. Tool
5
Destination Nodes:Muir Woods NMSan FranciscoHalf Moon BayNapaSonomaSanta Cruz
12 3
45 6
78
910
1112 13 14
15 16 1718 19
2021 22 2324
2526 27
28 2930 31
32
33 3435 36
37 3839
6
How It Works• Set up a network model with intersections as nodes
and roads as arcs.• Convert undirected cyclic graph to DAG.• Destination nodes plug into the network through
multiple dummy arcs with negative values.• Run MIP shortest path.
Sounds easy, right?
Dest
7
How the Network gets BIGIt’s called
Time Layering
Implemented with Python code to create layers moving forward through time at a 2 minute interval, calculating every possible arc.
50,000 Nodes +/- thousands150,000+ Arcs
T0800-Monterey
T0902-Coyote
T0848-SantaCruz
T=0
T=2
T=4
T=48
T=End
.
.
.
.
.
.
.
8
• Basic Shortest Path MIP– An interface was designed in Python to create a network with user prioritized
destinations through the use of negative costs.– Each programmable destination node can be visited multiple times with
diminishing returns.– Each 1-hour destination visit can be accomplished only once.
– Road arcs assume small penalties in order to discourage wandering. There are no constraints involving the number of times a road arc can be utilized
• Output Generation Control– All input and output is in standard units of time and distance.– Like Google Maps, the suggested optimal route is displayed in standard form (i.e.
N101, NGoldenGateBridge, etc) through the use of Acronyms.
The MIP and GAMSA Quick Glimpse
9
AssumptionsFor Our Examples:• Visits are in one hour increments• Time on the road is not desirable {Penalty=(Distance/Speed)*.1}• Rush hours are set to 0700-0930 and 1500-1800
– The delay is based off of Caltrans and manual data collection• Destinations have limited hours
– Ex: Muir Woods is only available during daylight and Napa/Sonoma do not open until 11 am
• Posted Speed Limits are observed/maintained
All assumptions can be modified through adjustments to input data files and/or python script.
10
Glimpse of TripArcs.csv
11
Glimpse of TripArcs.csv
Costs: Small penalty assigned for driving.
(Positive for shortest path)
12
Glimpse of TripArcs.csv
Costs: User defined enjoyment preferencesdecrement by 1 per hour spent at destination
(negative for shortest path)
13
Glimpse of TripArcs.csv
Delays: Currently set at 1 hour per destination visit. Manually assignable delays are available
to represent construction, accidents, etc.
14
Glimpse of TripArcs.csv
Arc Names: 137 Distinct Arcs. These represent each road (NSWE) and an additional arc for each
destination visit.
Arc IDs: 247 Different IDs. These represent each road (NSWE) plus the ID corresponding to each
distinct 1 hour destination visit
15
Network Generation in Python
TripArcs.csvNodeData.csv
nodes.csvarcs.csv
arcData.csvArcAcronyms.csv*LunchArcs.csv*
16
from Depart take ExitGarage to T830-40 Distance= 0from T830-40 take N101 to T930-38 Distance= 60from T930-38 take N101 to T936-36 Distance= 8from T936-36 take N101 to T938-34 Distance= 3from T938-34 take N880 to T958-31 Distance= 23from T958-31 take N880 to T1000-25 Distance= 4from T1000-25 take N880 to T1006-23 Distance= 6from T1006-23 take N880 to T1016-19 Distance= 10from T1016-19 take N580 to T1022-16 Distance= 7from T1022-16 take WSanRafelBrdg to T1034-8 Distance= 13from T1034-8 take S101 to T1038-13 Distance= 5from T1038-13 take N1 to T1058-12 Distance= 10from T1058-12 take MuirWoodsVisit to T1158-0MuirW3 Distance= 0from T1158-0MuirW3 take MuirWoodsVisit to T1158-12 Distance= 0from T1158-12 take MuirWoodsVisit to T1258-0MuirW7 Distance= 0from T1258-0MuirW7 take MuirWoodsVisit to T1258-12 Distance= 0from T1258-12 take MuirWoodsVisit to T1358-0MuirW4 Distance= 0from T1358-0MuirW4 take MuirWoodsVisit to T1358-12 Distance= 0from T1358-12 take MuirWoodsVisit to T1458-0MuirW1 Distance= 0from T1458-0MuirW1 take MuirWoodsVisit to T1458-12 Distance= 0from T1458-12 take MuirWoodsVisit to T1558-0MuirW9 Distance= 0from T1558-0MuirW9 take MuirWoodsVisit to T1558-12 Distance= 0from T1558-12 take MuirWoodsVisit to T1658-0MuirW8 Distance= 0from T1658-0MuirW8 take MuirWoodsVisit to T1658-12 Distance= 0from T1658-12 take MuirWoodsVisit to T1758-0MuirW5 Distance= 0from T1758-0MuirW5 take MuirWoodsVisit to T1758-12 Distance= 0from T1758-12 take MuirWoodsVisit to T1858-0MuirW2 Distance= 0from T1858-0MuirW2 take MuirWoodsVisit to T1858-12 Distance= 0from T1858-12 take MuirWoodsVisit to T1958-0MuirW6 Distance= 0from T1958-0MuirW6 take MuirWoodsVisit to T1958-12 Distance= 0from T1958-12 take S1 to T2018-13 Distance= 10from T2018-13 take S101 to T2022-15 Distance= 5from T2022-15 take SGoldenGate to T2038-18 Distance= 10from T2038-18 take SFVisit to T2138-0SanFran1 Distance= 0from T2138-0SanFran1 take SFVisit to T2138-18 Distance= 0from T2138-18 take SFVisit to T2238-0SanFran2 Distance= 0from T2238-0SanFran2 take SFVisit to T2238-18 Distance= 0from T2238-18 take S101 to T2246-22 Distance= 8from T2246-22 take S101 to T2300-30 Distance= 16from T2300-30 take S101 to T2314-32 Distance= 16from T2314-32 take S101 to T2322-34 Distance= 10from T2322-34 take S101 to T2324-36 Distance= 3from T2324-36 take S101 to T2330-38 Distance= 8from T2330-38 take S101 to T2424-40 Distance= 60from T2424-40 take EnterGarage to End Distance= 0Total Fun= 70.5 295
17
from T1006-23 take N880 to T1016-19 Distance= 10from T1016-19 take N580 to T1022-16 Distance= 7from T1022-16 take WSanRafelBrdg to T1034-8 Distance= 13from T1034-8 take S101 to T1038-13 Distance= 5from T1038-13 take N1 to T1058-12 Distance= 10from T1058-12 take MuirWoodsVisit to T1158-0MuirW3 Distance= 0from T1158-0MuirW3 take MuirWoodsVisit to T1158-12 Distance= 0from T1158-12 take MuirWoodsVisit to T1258-0MuirW7 Distance= 0
from Depart take ExitGarage to T830-40 Distance= 0from T830-40 take N101 to T930-38 Distance= 60from T930-38 take N101 to T936-36 Distance= 8from T936-36 take N101 to T938-34 Distance= 3from T938-34 take N880 to T958-31 Distance= 23from T958-31 take N880 to T1000-25 Distance= 4from T1000-25 take N880 to T1006-23 Distance= 6from T1006-23 take N880 to T1016-19 Distance= 10from T1016-19 take N580 to T1022-16 Distance= 7from T1022-16 take WSanRafelBrdg to T1034-8 Distance= 13from T1034-8 take S101 to T1038-13 Distance= 5from T1038-13 take N1 to T1058-12 Distance= 10from T1058-12 take MuirWoodsVisit to T1158-0MuirW3 Distance= 0from T1158-0MuirW3 take MuirWoodsVisit to T1158-12 Distance= 0from T1158-12 take MuirWoodsVisit to T1258-0MuirW7 Distance= 0from T1258-0MuirW7 take MuirWoodsVisit to T1258-12 Distance= 0from T1258-12 take MuirWoodsVisit to T1358-0MuirW4 Distance= 0from T1358-0MuirW4 take MuirWoodsVisit to T1358-12 Distance= 0from T1358-12 take MuirWoodsVisit to T1458-0MuirW1 Distance= 0from T1458-0MuirW1 take MuirWoodsVisit to T1458-12 Distance= 0from T1458-12 take MuirWoodsVisit to T1558-0MuirW9 Distance= 0from T1558-0MuirW9 take MuirWoodsVisit to T1558-12 Distance= 0from T1558-12 take MuirWoodsVisit to T1658-0MuirW8 Distance= 0from T1658-0MuirW8 take MuirWoodsVisit to T1658-12 Distance= 0from T1658-12 take MuirWoodsVisit to T1758-0MuirW5 Distance= 0from T1758-0MuirW5 take MuirWoodsVisit to T1758-12 Distance= 0from T1758-12 take MuirWoodsVisit to T1858-0MuirW2 Distance= 0from T1858-0MuirW2 take MuirWoodsVisit to T1858-12 Distance= 0from T1858-12 take MuirWoodsVisit to T1958-0MuirW6 Distance= 0from T1958-0MuirW6 take MuirWoodsVisit to T1958-12 Distance= 0from T1958-12 take S1 to T2018-13 Distance= 10from T2018-13 take S101 to T2022-15 Distance= 5from T2022-15 take SGoldenGate to T2038-18 Distance= 10from T2038-18 take SFVisit to T2138-0SanFran1 Distance= 0from T2138-0SanFran1 take SFVisit to T2138-18 Distance= 0from T2138-18 take SFVisit to T2238-0SanFran2 Distance= 0from T2238-0SanFran2 take SFVisit to T2238-18 Distance= 0from T2238-18 take S101 to T2246-22 Distance= 8from T2246-22 take S101 to T2300-30 Distance= 16from T2300-30 take S101 to T2314-32 Distance= 16from T2314-32 take S101 to T2322-34 Distance= 10from T2322-34 take S101 to T2324-36 Distance= 3from T2324-36 take S101 to T2330-38 Distance= 8from T2330-38 take S101 to T2424-40 Distance= 60from T2424-40 take EnterGarage to End Distance= 0Total Fun= 70.5 295
18
Trip 1 OverviewUser Input:1. Muir Woods (10)2. San Francisco (9)3. Napa (7)4. Sonoma (6)5. Half Moon Bay (3)6. Santa Cruz (1)Depart: 0830Return: 0030Road delays: Rush Hour (AM/PM)
B.A.D.A.S.S. Recommendation:Stop 1 - Muir Woods (9 hours)Stop 2 – San Francisco (2 hours)Total Fun Factor: 70.5Total Distance 295 mi
19
Trip 1 w/DelayUser Input:1. Muir Woods (10)2. San Francisco (9)3. Napa (7)4. Sonoma (6)5. Half Moon Bay (3)6. Santa Cruz (1)Depart: 0830Return: 0030Road delays: Rush Hour (AM/PM) 101 South (SFO) > 15 min
B.A.D.A.S.S. Recommendation:Stop 1 - Muir Woods (9 hours)Stop 2 – San Francisco (2 hours)Total Fun Factor: 70.5Total Distance 292 mi
20
Recall the preferences:
Let’s Change the starting time and analyze….
21
2030405060708090
700 730 800 830 900 930 1000 1300 1330 1400 1430 1500 1530 1600
Fun
Valu
e
Departure Time
Less Time = Less Fun
Obvious results. Less Friday classes means getting to leave earlier and that equals more fun.
22
2030405060708090
700 730 800 830 900 930 1000 1300 1330 1400 1430 1500 1530 1600
Fun
Valu
e
Departure Time
Less Time = Less Fun
Obvious results. Less Friday classes means getting to leave earlier and that equals more fun.
Interesting that 0800 to 1000, there is little loss in fun value. While the drop between 1000 and 1300 is much more significant.
23
0
2
4
6
8
10
12
Tota
l Des
tinati
on H
ours
Departure Time
SF
MW
How Many Hours And Where?
Useful to see how Departure time effects the locations visited.
24
0
2
4
6
8
10
12
Tota
l Des
tinati
on H
ours
Departure Time
SF
MW
How Many Hours And Where?
Useful to see how Departure time effects the locations visited.
The effects of Rush HourPoint where going to Muir Woods is no longer the best plan.
25
Trip 3 - Vino Trip!User Input:1. Muir Woods (0)2. San Francisco (5)3. Napa (10)4. Sonoma (10)5. Half Moon Bay (0)6. Santa Cruz (0)Depart: 0700Return: 2000Road delays: Rush Hour (AM/PM)
B.A.D.A.S.S. Recommendation:Stop 1 – Santa Cruz (1 hour)Stop 2 – San Francisco (1 hour)Stop 3 – Napa (4 hours)Stop 4 – Sonoma (1 hour)Total Fun Factor: 48.4Total Distance 336 mi
Trip 4 – No PreferenceUser Input:1. Muir Woods (5)2. San Francisco (5)3. Napa (5)4. Sonoma (5)5. Half Moon Bay (5)6. Santa Cruz (5)Depart: 0700Return: 2359Road delays: Rush Hour (AM/PM)
B.A.D.A.S.S. Recommendation:Stop 1 – 0740-0840 Santa Cruz (1 hr) Stop 2 – 0956-1156 San Francisco (2 hr)Stop 3 – 1244-1444 Napa (2 hr)Stop 4 – 1500-1700 Sonoma Visit (2 hr)Stop 5 – 1912-2212 Santa Cruz (3 hr)Total Fun Factor: 40.4Total Distance 340 mi
27
• Parallel Applications– Politician’s Campaign Trail, Itineraries for
Distinguished Visitors, City Planners, etc• Hypothetical Scenario:– Restaurant franchise is considering opening a new
location.– Possible locations:
Flipping Everything On Its Head
• San Mateo • Sausalito• San Jose • Pacifica• Novato • Vallejo
28
Possible new locations
User Destination
Lunch Hour Must be observed within
1100 and 1300.
Scenario
29
Our New ModelIn Math Speak…
, , , ,( , ) ( , ) ( , ) ( , )
, ,
,( , ) ( , )
, ,
+
Netflow Constraints ( ), ( , )
. . 1
{0,1}, {0,1}
i j i j i j i ji j Arcs i j i j LunchArcs i j
i j i j
i ji j LunchArcs i j
i j i j
Fun Y Fun X
YY X i j LunchArcs
s t X
Y X
30
What did we change?In Math Speak…
, , , ,( , ) ( , ) ( , ) ( , )
, ,
,( , ) ( , )
, ,
+
Netflow Constraints ( ), ( , )
. . 1
{0,1}, {0,1}
i j i j i j i ji j Arcs i j i j LunchArcs i j
i j i j
i ji j LunchArcs i j
i j i j
Fun Y Fun X
YY X i j LunchArcs
s t X
Y X
Include the ‘fun’ of having lunch to the objective function
31
What did we change?In Math Speak…
, , , ,( , ) ( , ) ( , ) ( , )
, ,
,( , ) ( , )
, ,
+
Netflow Constraints ( ), ( , )
. . 1
{0,1}, {0,1}
i j i j i j i ji j Arcs i j i j LunchArcs i j
i j i j
i ji j LunchArcs i j
i j i j
Fun Y Fun X
YY X i j LunchArcs
s t X
Y X
Ensure we do not use a lunch arc unless we are stopping for lunch.
32
What did we change?In Math Speak…
, , , ,( , ) ( , ) ( , ) ( , )
, ,
,( , ) ( , )
, ,
+
Netflow Constraints ( ), ( , )
. . 1
{0,1}, {0,1}
i j i j i j i ji j Arcs i j i j LunchArcs i j
i j i j
i ji j LunchArcs i j
i j i j
Fun Y Fun X
YY X i j LunchArcs
s t X
Y X
Only stop for one lunch during the trip.
33
What did we change?In Math Speak…
, , , ,( , ) ( , ) ( , ) ( , )
, ,
,( , ) ( , )
, ,
+
Netflow Constraints ( ), ( , )
. . 1
{0,1}, {0,1}
i j i j i j i ji j Arcs i j i j LunchArcs i j
i j i j
i ji j LunchArcs i j
i j i j
Fun Y Fun X
YY X i j LunchArcs
s t X
Y X
Can only have two values, either have lunch or not.
34
5560657075808590
0700Sausalito
0730Sausalito
0800Sausalito
0830Sausalito
0900Novato
0930Novato
1000SanJose
Fun
Valu
e
Departure Times and Corresponding Model Determined Locations
W/O Lunch
W/ Lunch
The Results
35
5560657075808590
0700Sausalito
0730Sausalito
0800Sausalito
0830Sausalito
0900Novato
0930Novato
1000SanJose
Fun
Valu
e
Departure Times and Corresponding Model Determined Locations
W/O Lunch
W/ Lunch
The Results
A late departure forces the user to San Jose for lunch.
Average Gap = 6.1714
Sausalito chosen 4 times.
36
Interpreting the Results
• A restaurant opening in these locations must represent a ‘fun’ value greater than 6 for an individual with this set of preferences to deviate and patronize the restaurant.
• A wider scope of preferences run using this tool can offer insight onto areas for focusing marketing/advertising.
• An even larger study can be used with location costs to determine best return on investment.
37
If We Had More Time…B.A.D.A.S.S. Tool Version 3.0
• More Robust Interface– More Preference Options– One Button “Go”– Graphical input and output
• Improved Output Report• Multi-Day (Weekend) Mode• Multi-Trip Mode (automated analysis)• More Destinations
38