einführung in verkehr und logistik - fakultät für ... · pdf...
TRANSCRIPT
WS 13/14 Einführung in Verkehr und Logistik 1 / 56
Einführung in Verkehr und Logistik
(Bachelor)
Transport Demand
Univ.-Prof. Dr. Knut Haase
Institut für Verkehrswirtschaft
Wintersemester 2013/2014, Dienstag 10:15-11:45 Uhr, Phil E
WS 13/14 Einführung in Verkehr und Logistik 3 / 56
Service Production Process in Public Transport
1. Demand Model
2. Infrastructure (e.g. tracks and stations)
3. Tariff zone planning
4. Line planning (routes and frequencies)
5. Timetabling
6. Vehicle scheduling
7. Crew scheduling
8. Rostering
9. Dispatching (vehicles and staff)
I Simultaneous planning approaches, e.g. simultaneous vehicle and crewscheduling, provide significant cost reduction potentials.1
I Demand effects should be integrated in line planning and timetabling.2
1See [HDD01].2See [KH08].
WS 13/14 Einführung in Verkehr und Logistik 5 / 56
Transport Demand
What are discrete choices?
I Course of studyI Transport modeI Port choice by a shipownerI Beer brandI Shopping facilityI ...
Discrete choice appear in every day of life!
WS 13/14 Einführung in Verkehr und Logistik 6 / 56
An example
The choice between taking the bus or car might be influenced byI CostI Travel-timeI IncomeI FlexibilityI InterchangesI SecurityI Eco friendlinessI ...
WS 13/14 Einführung in Verkehr und Logistik 7 / 56
How to get the data and what to do with it?
Empirical analysis
I Sample; we distinguish in generalI revealed preferences (chosen alternative)I stated preferences (stated alternative)
I A sample is used toI Specification of utility functionsI Demand forecastI Analysis of willingness to payI Evaluation of infrastructural improvementsI Service design
WS 13/14 Einführung in Verkehr und Logistik 8 / 56
Numerical exampleTransport mode choice of forwarders in a region:
Would you choose combined cargo if the time for intial leg and final legisI 1 hour?I 2 hours?I 3 hours?
WS 13/14 Einführung in Verkehr und Logistik 9 / 56
Contingency table
time for initial and final legCombined cargo 1h (k = 1) 2h (k = 2) 3h (k = 3)
yes (i = 1) 100 100 50 250no (i = 2) 200 300 250 750
300 400 300 1000
p(i = 1) = 250=1000 = 0:25
p(i = 1; k = 2) = 100=1000 = 0:10
p(i = 1) =3P
k=1p(i = 1; k) = 100
1000 + 1001000 + 50
1000 = 0:25
p(k = 3ji = 1) = 50=250 = 0:2
WS 13/14 Einführung in Verkehr und Logistik 10 / 56
p(i = 1; k = 2) = p(i = 1)p(k = 2ji = 1) = 0:25 � 0:40 = 0:10
= p(k = 2)p(i = 1jk = 2) = 0:40 � 0:25 = 0:10
Let p(i) > 0 and p(k) > 0:
p(kji) = p(i ; k)=p(i)
p(i jk) = p(i ; k)=p(k)
Assumption: p(i jk) is constant over all periodsp(k) might change over periods!
WS 13/14 Einführung in Verkehr und Logistik 11 / 56
A behavioural model
3 Parameter p(i = 1jk = 1) = �1
p(i = 1jk = 2) = �2
p(i = 1jk = 3) = �3
p(i = 2jk) = 1� p(i = 1jk) !not an additional parameter (binary case:y=n)
Estimate a simple model
�1 = 100=300 = 0:333
�2 = 100=400 = 0:250
�3 = 50=300 = 0:167
Hypothesis: The smaller the time for initial leg and final leg the larger thechoice probability of combined cargo
WS 13/14 Einführung in Verkehr und Logistik 12 / 56
Standardfehler der Schätzung
I Bernoulli-distributed variable (urn experiment)
I Sum of Bernoulli-distributed variable is binomial distributed.
I Standard error of the mean of a random variable:p
�2=N�2 : Variance N : Sample size
I Variance of a Bernoulli-distributed variable: �(1� �)
� : Probability of occurrence
I Estimator for standard errors: sk =p
�k(1� �k)=Nk
I Approximation for the 95% confidence intervall (c.i.): [�k � 2 � sk ]
I t-statistic : �k=skI t-value > 2 !significant different from zero
WS 13/14 Einführung in Verkehr und Logistik 13 / 56
Results for our small example
�k sk 95% c.i. t-valuek = 1 0.333 0.027 [0.279,0.388] 12.247k = 2 0.250 0.022 [0.207,0,293] 11.547k = 3 0.167 0.022 [0.124,0.210] 7.746
WS 13/14 Einführung in Verkehr und Logistik 14 / 56
Apply our model
Assume we obtain the following data for a region (potentials forcombined cargo):
time of initial transport weight in tons per yearand final leg total combined cargo (estimates)1 h 1,200,000 400,0002 h 2,400,000 600,0003 h 3,000,000 500,000
6,600,000 1,500,000
Market share: 22.73%
WS 13/14 Einführung in Verkehr und Logistik 15 / 56
Construction of additional terminals
time of inital transport weight in tons per yearand final leg total combined cargo (estimates)1 h 1,500,000 500,0002 h 2,700,000 675,0003 h 2,400,000 400,000
6,600,000 1,775,000
!Market share increases up to 29%
WS 13/14 Einführung in Verkehr und Logistik 16 / 56
Properties of estimators
I UnbiasedI EfficientI For non-linear models we have only asymptotical properties:
- consistent: N !1 estimator = true value- asymptotically efficient: there is no consistent estimator with asmall standard error
I Discrete choice models are non-linear models!
WS 13/14 Einführung in Verkehr und Logistik 18 / 56
Assumptions
I Individuals (n = 1; : : : ;N) choose between only two alternatives (i = 1; 2)
I Individual (or observation) n chooses alternative i with largest utility
I Assume a linear utility function Uni that consists of
I deterministic (representative) utility Vni andI stochastic utility �ni , such that
I Uni = Vni + �ni
I �ni is independent and identically extreme value distributed (IID EV) with
f (�ni ) = e��ni e�e��ni
F (�ni ) = e�e��ni
WS 13/14 Einführung in Verkehr und Logistik 19 / 56
Density function and cumulative density function of EV
-2
-1,5 -1
-0,5 0
0,5 1
1,5 2
2,5 3
3,5 4
4,5 5
0
0,25
0,5
0,75
1
f(!ni) = e!!nie!e!ni
F (!ni) = e!e!ni
!
WS 13/14 Einführung in Verkehr und Logistik 20 / 56
Central assumption
The difference of two independently extreme value distributed variables�n = �ni 0 � �ni , is logistically distributed:
f (�n) =�e��n
(1+ e���n )2� > 0
F (�n) =1
1+ e���n
� is a scale parameter
WS 13/14 Einführung in Verkehr und Logistik 21 / 56
Choice probabilities I
n chooses i = 1, iffUn1 > Un2
Since Uni is random (due to �ni ) we can only compute the propability ofUn1 > Un2
Pn(i = 1) = P(Un1 > Un2)
= P(Vn1 + �n1 > Vn2 + �n2)
= P(�n1 � �n2 > Vn2 � Vn1)
= P(�n2 � �n1 < Vn1 � Vn2)
= P(�n < Vn1 � Vn2)
WS 13/14 Einführung in Verkehr und Logistik 22 / 56
Choice probabilities II
Pn(i = 1) = P(�n2 � �n1 < Vn1 � Vn2)
= P(�n < Vn1 � Vn2)
= F (Vn1 � Vn2)
=1
1+ e��(Vn1�Vn2)
=e�Vn1
e�Vn1 + e�Vn2
Binary Logit Model
Pn(i = 1) =e�Vn1
e�Vn1 + e�Vn2
� is not identified and has to be fixed to an arbitrary value (1 e.g.)
WS 13/14 Einführung in Verkehr und Logistik 23 / 56
NormalisationWe can not measure the absolute value of utility. A multiplication ofutility of each alternative with a positive constant does not change choiceprobabilities (and thus choice process).!Normalisation of � = 1!Variance of �ni : �2=6
WS 13/14 Einführung in Verkehr und Logistik 24 / 56
Reference alternativeAn addition of a constant to the utility of each alternative does notinfluence the choice probabilities!Constrain coefficients of the refernce alternative to a fixed value (e.g.0)
Un1 = �1 + �3TC1 + �4TT1 + �6INCn + �n1 (1)
Un2 = �2 + �3TC2 + �5TT2 + �7INCn + �n2 (2)
�2 = �7 = 0
WS 13/14 Einführung in Verkehr und Logistik 25 / 56
Choice probability of alternative 1 P(i = 1)
-5 -4 -3 -2 -1 0 1 2 3 4 50
0,25
0,5
0,75
1
Pn(i = 1) =1
1 + e!Vn1
Vn2 = 0
Pn(i = 1)
Vn1
WS 13/14 Einführung in Verkehr und Logistik 27 / 56
Multinomial Logit Model (MNL)
Assumptions
I sames as binary logit
I �ni is iid EV over all i and n
f (�ni ) = e��ni e�e��ni
F (�ni ) = e�e��ni
WS 13/14 Einführung in Verkehr und Logistik 28 / 56
MNL choice probabilities3
Pn(i) = P[ 8j 6= i : Uni > Unj ]
= P[ 8j 6= i : Vni + �ni > Vnj + �nj ]
= P[ 8j 6= i : �nj � �ni � Vni � Vnj ]
=
ZI ( 8j 6= i : �nj � �ni � Vni � Vnj )f (�n)d�n
if �ni iid EV
=eVniPj eVnj
Comments:I I (�) Indicator functionI We may solve the integral even if �ni is not iid EV
! Nested-, Cross-Nested, Mixed Logit
3See [Tra03, pp. 38-41]
WS 13/14 Einführung in Verkehr und Logistik 29 / 56
Some commentsI We may write MNL choice probabilities as
Pn(i) =e�VniP
j2Cne�Vnj
� Scale parameter
Cn Choice set of individual n
� = 0 ) even distributed choice probabilities
�!1 ) deterministic choices
j Cn j= 2 ) binary logit
WS 13/14 Einführung in Verkehr und Logistik 30 / 56
Independence from irrelevant alternatives (IIA)4
I Stems directly from the ”independent” part of the iid EV assumptionon �ni
I Ratio of choice probabilities of two alternatives is independent fromthe presence or absence of another alternative (or their attributes)
I Might be inadequat some times. If so, then make other assumptionabout distribution of �ni
I !Nested-Logit, Mixed Logit etc.
Proof IIAPn(i)Pn(i 0)
=eVniPj eVnj
=eVni 0Pj eVnj
=eVni
eVni 0
= eVni�Vni 0
4See [Tra03, pp. 49-54]
WS 13/14 Einführung in Verkehr und Logistik 31 / 56
Red bus - blue bus paradoxon5
Example
Pn(’Car’) =12; Pn(’Red Bus’) =
12
Now add a blue bus to Cn
Pn(’Car’) =13; Pn(’Red Bus’) =
13; Pn(’Blue Bus’) =
13
We would expect
Pn(’Car’) =12; Pn(’Red Bus’) =
14; Pn(’Blue Bus’) =
14
5See [BAL85, pp. 51-55]
WS 13/14 Einführung in Verkehr und Logistik 32 / 56
IIA holds strictly only on individual level
Example: choice of shopping facility
Group CBD Outlet park 1with car 20 % 80 %no car 80 % 20 %frequency 50 % 50 %
Add a new alternative Outlet park 2
Group CBD Outlet park 1 Outlet park 2with car 11.11 % 44.44 % 44.44 %no car 66.66 % 16.66 % 16.66 %frequency 38.88 % 30.56 % 30.56 %
) The more socio-economic variables we use the less critical is IIA on”market-share”-level
WS 13/14 Einführung in Verkehr und Logistik 33 / 56
Specification and identification
Un1 = �1 + �4TC1 + �4TT1 + �6INCn + �n1
Un2 = �2 + �4TC2 + �5TT2 + �7INCn + �n2
Un3 = �3 + �4TC3 + �6TT3 + �8INCn| {z }Vn3
+�n3
I �1, �2, �3: alternative-specific constants (ASCs)I Only jCnj � 1 ASCs are identifiedI ASCs reflect the expectation value of �ni only if a full set of ASCs
(jCnj � 1) is employed.I Alternative-specific specifications of socio-economic variables
(depend on n only!) - like income - need normalisation, too.
WS 13/14 Einführung in Verkehr und Logistik 34 / 56
Specification of utility with categorial variables
(k) Attribute (variable) Value (l), reference category
(1) Age teen (t), adult (a), old (o)(2) Income high (h), low (l)(3) Gender female (f ), male (m)
Zkl : Dummy variable of attribute k with value l
�i0 + �itZ1;t + �iaZ1;a + �ihZ2;h + �if Z3;f
Segment of population (old, low income, male): �0
ASC for segment (adult, high income, male): �0 + �a + �h
WS 13/14 Einführung in Verkehr und Logistik 36 / 56
Estimation of �’s by Maximum Likelihood6
How do we get the �’s?
Definitionyni =1, if n has chosen i (0, otherwise)
Re-write logit choice probabilities as
Pn(i) =JY
i=1
(Pn(i))yni
Since �ni are iid over n as well we can write the likelihood function as
L(�) =NY
n=1
JYi=1
(Pn(i))yni
Note, � is the coefficient vector of interest! That is, all �ik to beestimated.
6See [Tra03, pp. 64-67]
WS 13/14 Einführung in Verkehr und Logistik 37 / 56
The log-Likelihood makes estimation easier and obtains the same extremepoints as L(�)
L(�) = ln L(�) = ln
NY
n=1
JYi=1
(Pn(i))yni
!=
NXn=1
JXi=1
yni lnPn(i)
Substitute Pn(i) with eVniPjeVnj
!
L(�) =
NXn=1
JXi=1
yni ln
eVniPj eVnj
!
=
NXn=1
JXi=1
yniVni �
NXn=1
JXi=1
yni ln
Xj
eVnj
!
=
NXn=1
JXi=1
yni
Xk
�ik � znik
!�
NXn=1
JXi=1
yni ln
Xj
e�P
k�jk �znjk
�!
WS 13/14 Einführung in Verkehr und Logistik 38 / 56
Maximise L(�)
Start � = 0 : L(�) = 0� N � ln J(if Cn is the same for all n)
�� Vector of estimated coefficients that maximises L(�)
Goodness-of-fitPseudo-R2: LR = 1� l(��)=l(0)
Software for estimation
I BIOGEMEI LIMDEP, NLOGITI SPSSI R
WS 13/14 Einführung in Verkehr und Logistik 40 / 56
BIerlaire Optimization toolbox for GEv Model Estimation7
MNL is a special case of a Generalised Extreme Value (GEV) Model(nowadays: Multivariate Extreme Value (MEV))
http://biogeme.epfl.ch
public domain, cross plattform
Invoke via console (f.e. DOS prompt: cmd.exe): biogeme mymodelmysample.dat
I We write the model to mymodel.modI .mod file may be manipulated by any texteditor (notepad++ is
advised)I Data for estimation has to be stored in mysample.datI Results can be found in output mymodel.rep
7See [Bie08].
WS 13/14 Einführung in Verkehr und Logistik 41 / 56
Example
A choice problemStudents (n) with no car available chose on their commute to university eitherto walk (i = 1) or go by bike (i = 2) or to take the bus (i = 3). The choicedepends on travel-time in minutes dni and gender sn with female studentsindicated by 1. Now we write our deterministic utilities
Vn1 = �0;1 + �1;1d1;n + �2;1snVn2 = �0;2 + �1;2d2;n + �2;2snV3n = �0;3 + �1;3d3;n + �2;3sn
For identification purposes:
�0;1 = �1;1 = �2;1 = 0
That is, Vn1 = 0
WS 13/14 Einführung in Verkehr und Logistik 42 / 56
BIOGEME syntax
mymodel.mod
[Choice]Choice
[Beta]// Name Value LowerBound UpperBound status (0=variable, 1=fixed)b01 0 -10000 10000 1b02 0 -10000 10000 0b03 0 -10000 10000 0b11 0 -10000 10000 1b12 0 -10000 10000 0b13 0 -10000 10000 0b21 0 -10000 10000 1b22 0 -10000 10000 0b23 0 -10000 10000 0
[Utilities]// Id Name Avail linear-in-parameter expression1 Foot av1 b01 * one + b11 * d1 + b21 * s2 Bike av2 b02 * one + b12 * d2 + b22 * s3 Bus av3 b03 * one + b13 * d3 + b23 * s
[Expressions]one = 1av1 = 1av2 = 1av3 = 1
[Model]$MNL
WS 13/14 Einführung in Verkehr und Logistik 43 / 56
Data
mysample.dat
ID Choice d1 d2 d3 s1 1 6 8 13 02 1 8 9 13 13 1 12 9 15 14 2 21 12 17 05 1 6 7 12 0: : : : : :
95 3 51 21 24 096 1 18 11 14 197 1 6 9 12 098 2 33 15 16 199 1 19 11 13 0
100 1 15 12 16 1
WS 13/14 Einführung in Verkehr und Logistik 44 / 56
Results: model statistics
mymodel.rep
Model: Multinomial LogitNumber of estimated parameters: 6
Number of observations: 100Number of individuals: 100
Null log-likelihood: -109.861Cte log-likelihood: -88.991
Init log-likelihood: -109.861Final log-likelihood: -68.002
Likelihood ratio test: 83.718Rho-square: 0.381
Adjusted rho-square: 0.326Final gradient norm: +4.082e-07
Diagnostic: Convergence reached...Iterations: 11
Run time: 00:00
WS 13/14 Einführung in Verkehr und Logistik 45 / 56
Results: coefficient estimates
Utility parameters******************Name Value Std err t-test p-val Rob. std err Rob. t-test Rob. p-val---- ----- ------- ------ ----- ------------ ----------- ----------b01 0.00 --fixed--b02 -5.57 1.15 -4.84 0.00 1.01 -5.50 0.00b03 -10.4 2.17 -4.78 0.00 2.02 -5.13 0.00b11 0.00 --fixed--b12 0.324 0.0746 4.35 0.00 0.0665 4.87 0.00b13 0.554 0.123 4.52 0.00 0.115 4.81 0.00b21 0.00 --fixed--b22 -0.128 0.617 -0.21 0.84 * 0.580 -0.22 0.83 *b23 -0.317 0.678 -0.47 0.64 * 0.666 -0.48 0.63 *
Vn1 = 0
Vn2 = �5:57+ 0:324 � d2;n � 0:128 � snV3n = �10:4+ 0:554 � d3;n � 0:317 � sn
WS 13/14 Einführung in Verkehr und Logistik 47 / 56
Commute-to-school mode choice modelling for students located inDresden, Saxony. 8
Choice set
i =
8>><>>:
1 foot2 bike3 transit4 car
8See [MTH08].
WS 13/14 Einführung in Verkehr und Logistik 48 / 56
Exogenous Variables
I Alternative-specific constant (k = 0)I Distance between school and student’s location in [km] (k = 1)I Car availability (k = 2)
zni2 =
�1 Car always available0 else
I Season=weather condition (k = 3)
zni3 =
�1 Winter=bad weather0 else
WS 13/14 Einführung in Verkehr und Logistik 49 / 56
Estimation results (N = 9300)Mode Variable (Coeff.) Estimate SE t-statisticfoot ASC (�10) 10.774 0.234 46.042(i = 1) Distance (�11) -4.376 0.183 -37.008
Car-avail (�12) -5.279 0.1634 -3.609Season (�13) -0.591 0.2385 -22.129
bike ASC (�20) 6.570 0.190 34.596(i = 2) Distance (�21) -0.904 0.033 -27.365
Car-avail (�22) -4.772 0.184 -22.599Season (�23) -2.081 0.147 -14.160
transit ASC (�30) 4.477 0.171 26.210(i = 3) Distance (�31) -0.052 0.017 -2.966
Car-avail (�32) -5.553 0.143 -38.870Season (�33) -0.489 0.135 -3.621
Null log-likelihood: -12 892.50 Final log-likelihood: -4792.14Likelihood ratio test: 16200.80 Rho-square: 0.628301
WS 13/14 Einführung in Verkehr und Logistik 50 / 56
Utility Functions
I Car-availability ”always” (zni2 = 1)I Summer term (zni3 = 0)
WS 13/14 Einführung in Verkehr und Logistik 51 / 56
I Car-availability ”not always” (zni2 = 0)I Summer term (zni3 = 0)
WS 13/14 Einführung in Verkehr und Logistik 52 / 56
How to compute utility values?
I Distance to school 0.5 km (zni1 = 0:5)I Car is always available (zni2 = 1)I Summer term (zni3 = 0)
Vn1 = 10; 774� 4; 376 � 0; 5� 5; 2796 � 1 = 3; 307
Vn2 = 6; 570� 0; 904 � 0; 5� 4; 772 � 1 = 1; 346
Vn3 = 4; 477� 0; 052 � 0; 5� 5; 553 � 1 = �1; 102
Vn4 = 0
WS 13/14 Einführung in Verkehr und Logistik 53 / 56
Corresponding choice probabilities
I Distance to school 0.5 km (zni1 = 0:5)I Car is always available (zni2 = 1)I Summer term (zni3 = 0)
Pn1 =e3;307
e3;307 + e1;346 + e�1;102 + e0 = 0; 841 = 84; 1%
Pn2 =e1;346
e3;307 + e1;346 + e�1;102 + e0 = 0; 118 = 11; 8%
Pn3 =e�1;102
e3;307 + e1;346 + e�1;102 + e0 = 0; 010 = 1; 0%
Pn4 =e0
e3;307 + e1;346 + e�1;102 + e0 = 0; 031 = 3; 1%
WS 13/14 Einführung in Verkehr und Logistik 54 / 56
Transit choice probabilities
WS 13/14 Einführung in Verkehr und Logistik 55 / 56
Literature I
M. Ben-Akiva and S.R. Lerman.Discrete choice analysis, theory and applications to travel demand.MIT Press, Cambridge, MA, 1985.
M. Bierlaire.An introduction to BIOGEME (Version 1.8), 2008.
K. Haase, G. Desaulniers, and J. Desrosiers.Simultaneous vehicle and crew scheduling in urban mass transit systems.Transportation Science, 35(3):286, 2001.
M. Klier and K. Haase.Line optimization in public transport systems.In J. Kalcsics and S. Nickel, editors, Operations Research Proceedings 2007,pages 473–478. Springer, 2008.
S. Müller, S. Tscharaktschiew, and K. Haase.Travel-to-school mode choice modelling and patterns of school choice in urbanareas.Journal of Transport Geography, 16(5):342–357, 2008.
WS 13/14 Einführung in Verkehr und Logistik 56 / 56
Literature II
A. Schöbel.
Line planning in public transportation: models and methods.
OR Spectrum, 34:491–510, 2012.
E. Train, Kenneth.
Discrete choice methods with simulation.
Cambridge University Press, 2003.