-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkioskdata.m
24 lines (19 loc) · 918 Bytes
/
kioskdata.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
close all
clear
clc
% Set which bicyle sharing system to import data from
System = 'Denver'; % options: 'Minneapolis', 'Denver'
if strcmp(System,'Denver')
october2016kioskinfo = unique(importdenverkiosk('october2016_kioskinfo.csv', 2, 90));
dist = createdistancematrix(october2016kioskinfo.Latitude,october2016kioskinfo.Longitude);
capacity = october2016kioskinfo.TotalDocks;
elseif strcmp(System,'Minneapolis')
NiceRide2016StationLocations = unique(importminnkiosk('Nice_Ride_2016_Station_Locations.csv', 2, 203));
dist = createdistancematrix(NiceRide2016StationLocations.Latitude,NiceRide2016StationLocations.Longitude);
capacity = NiceRide2016StationLocations.NbDocks;
end
% construct incentive matrix
lambda = 0.5; % cooperativeness parameter
incentive = (1-exp(-lambda*dist))/lambda;
% Save start and end station demand matrices
save([System '_docks.mat'],'incentive','capacity');