Einführung in Verkehr und Logistik [1.15ex] (Bachelor) [1.15ex

Transcription

Einführung in Verkehr und Logistik [1.15ex] (Bachelor) [1.15ex
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
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
I
Simultaneous planning approaches, e.g. simultaneous vehicle and crew
scheduling, provide significant cost reduction potentials.1
Demand effects should be integrated in line planning and timetabling.2
1 See
2 See
[HDD01].
[KH08].
3 / 56
WS 13/14
Einführung in Verkehr und Logistik
5 / 56
Transport Demand
What are discrete choices?
I
I
I
I
I
I
Course of study
Transport mode
Port choice by a shipowner
Beer brand
Shopping facility
...
Discrete choice appear in every day of life!
WS 13/14
Einführung in Verkehr und Logistik
An example
The choice between taking the bus or car might be influenced by
I
I
I
I
I
I
I
I
Cost
Travel-time
Income
Flexibility
Interchanges
Security
Eco friendliness
...
6 / 56
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 general
I revealed preferences (chosen alternative)
I stated preferences (stated alternative)
I A sample is used to
I
I
I
I
I
Specification of utility functions
Demand forecast
Analysis of willingness to pay
Evaluation of infrastructural improvements
Service design
WS 13/14
Einführung in Verkehr und Logistik
Numerical example
Transport mode choice of forwarders in a region:
Would you choose combined cargo if the time for intial leg and final leg
is
I 1 hour?
I 2 hours?
I 3 hours?
8 / 56
WS 13/14
Einführung in Verkehr und Logistik
9 / 56
Contingency table
Combined cargo
yes (i = 1)
no (i = 2)
time for initial and final leg
1h (k = 1) 2h (k = 2) 3h (k = 3)
100
100
50
200
300
250
300
400
300
250
750
1000
p̂(i = 1) = 250=1000 = 0:25
p̂(i = 1; k = 2) = 100=1000 = 0:10
p̂(i = 1) =
3
P
p(i = 1; k) =
100
1000
p̂(k = 3ji = 1) = 50=250 = 0:2
k=1
WS 13/14
+
100
1000
+
50
1000
= 0:25
Einführung in Verkehr und Logistik
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̂(k ji)
p̂(i jk)
= p̂(i ; k)=p(i)
= p̂(i ; k)=p(k)
Assumption: p̂(i jk) is constant over all periods
p̂(k) might change over periods!
10 / 56
WS 13/14
Einführung in Verkehr und Logistik
11 / 56
A behavioural model
p(i = 1jk = 1)
1
p(i = 1jk = 2) = 2
p(i = 1jk = 3) = 3
3 Parameter
p̂(i = 2jk) = 1
y=n)
p̂(i = 1jk)
=
!not an additional parameter (binary case:
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 the
choice probability of combined cargo
WS 13/14
Einführung in Verkehr und Logistik
12 / 56
Standardfehler der Schätzung
I
I
I
I
I
I
I
I
Bernoulli-distributed variable (urn experiment)
Sum of Bernoulli-distributed variable is binomial distributed.
p
Standard error of the mean of a random variable: 2 =N
2 : Variance
N : Sample size
Variance of a Bernoulli-distributed variable: (1 )
: Probability of occurrence
p
ˆk (1 ˆk )=Nk
Estimator for standard errors: ŝk = Approximation for the 95% confidence intervall (c.i.): [ˆ
k
ˆk =ŝk
t-statistic : t-value > 2
!significant different from zero
2 ŝk ]
WS 13/14
Einführung in Verkehr und Logistik
13 / 56
Results for our small example
ˆk
k =1
k =2
k =3
0.333
0.250
0.167
WS 13/14
ŝk
0.027
0.022
0.022
95% c.i.
[0.279,0.388]
[0.207,0,293]
[0.124,0.210]
t-value
12.247
11.547
7.746
Einführung in Verkehr und Logistik
Apply our model
Assume we obtain the following data for a region (potentials for
combined cargo):
time of initial
and final leg
1h
2h
3h
Market share: 22.73%
transport weight in tons per year
total combined cargo (estimates)
1,200,000
400,000
2,400,000
600,000
3,000,000
500,000
6,600,000
1,500,000
14 / 56
WS 13/14
Einführung in Verkehr und Logistik
15 / 56
Construction of additional terminals
time of inital
and final leg
1h
2h
3h
transport weight in tons per year
total combined cargo (estimates)
1,500,000
500,000
2,700,000
675,000
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
Properties of estimators
I Unbiased
I Efficient
I For non-linear models we have only asymptotical properties:
- consistent: N ! 1 estimator = true value
- asymptotically efficient: there is no consistent estimator with a
small standard error
I Discrete choice models are non-linear models!
16 / 56
WS 13/14
Einführung in Verkehr und Logistik
18 / 56
Assumptions
I
I
I
Individuals (n = 1; : : : ; N) choose between only two alternatives (i = 1; 2)
Individual (or observation) n chooses alternative i with largest utility
Assume a linear utility function Uni that consists of
I deterministic (representative) utility Vni and
I stochastic utility ni , such that
I Uni = Vni + ni
I ni is independent and identically extreme value distributed (IID EV) with
WS 13/14
f (ni )
=
e ni e
F (ni )
=
e
e ni
e ni
Einführung in Verkehr und Logistik
19 / 56
Density function and cumulative density function of EV
1
F (!ni ) = e−e
!ni
0,75
0,5
0,25
f (!ni ) = e−!ni e−e
!ni
!
5
4,5
4
3,5
3
2,5
2
1,5
1
0,5
0
-0,5
-1
-1,5
-2
0
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 )
=
F (n )
=
e
n
(1 + e n )2
1
1 + e n
>0
is a scale parameter
WS 13/14
Einführung in Verkehr und Logistik
21 / 56
Choice probabilities I
n chooses i = 1, iff
Un1 > Un2
Since Uni is random (due to ni ) we can only compute the propability of
Un1 > Un2
Pn (i = 1)
= P(Un1 > Un2 )
= P(Vn1 + n1 > Vn2 + n2 )
= P(n1
= P(n2
n2 > Vn2
n1 < Vn1
= P(n < Vn1
Vn2 )
Vn1 )
Vn2 )
WS 13/14
Einführung in Verkehr und Logistik
22 / 56
Choice probabilities II
Pn (i = 1)
= P(n2
n1 < Vn1
= P(n < Vn1
= F (Vn1
=
=
Vn2 )
Vn2 )
Vn2 )
1
1 + e (Vn1 Vn2 )
e Vn1
e Vn1 + e Vn2
Binary Logit Model
e Vn1
Pn (i = 1) = Vn1
e
+ 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
Normalisation
We can not measure the absolute value of utility. A multiplication of
utility of each alternative with a positive constant does not change choice
probabilities (and thus choice process).
!Normalisation of = 1
!Variance of ni : 2 =6
23 / 56
WS 13/14
Einführung in Verkehr und Logistik
24 / 56
Reference alternative
An addition of a constant to the utility of each alternative does not
influence the choice probabilities
!Constrain coefficients of the refernce alternative to a fixed value (e.g.
0)
Un1 = 1 + 3 TC1 + 4 TT1 + 6 INCn + n1
(1)
Un2 = 2 + 3 TC2 + 5 TT2 + 7 INCn + n2
(2)
2 = 7 = 0
WS 13/14
Einführung in Verkehr und Logistik
25 / 56
Choice probability of alternative 1 P(i = 1)
Pn (i = 1)
1
0,75
0,5
Pn (i = 1) =
1
1 + e−Vn1
Vn2 = 0
Vn1
5
4
3
2
1
0
-1
-2
-3
-4
0
-5
0,25
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
WS 13/14
and n
f (ni )
=
e ni e
F (ni )
=
e
e ni
e ni
Einführung in Verkehr und Logistik
MNL choice probabilities3
Pn (i) =
P[ 8j =
6 i : Uni > Unj ]
= P[ 8j =
6 i : Vni + ni > Vnj + nj ]
= P[ 8j =
6 i : nj
Z
=
I ( 8j =
6 i : nj
Vni Vnj ]
ni Vni Vnj )f (n )dn
ni
if ni iid EV
=
e Vni
P V
nj
j e
Comments:
I I () Indicator function
I We may solve the integral even if ni is not iid EV
!
Nested-, Cross-Nested, Mixed Logit
3 See
[Tra03, pp. 38-41]
28 / 56
WS 13/14
Einführung in Verkehr und Logistik
29 / 56
Some comments
I We may write MNL choice probabilities as
Pn (i) = P
e Vni
Vnj
j 2Cn e
Scale parameter
Cn Choice set of individual n
=0
!1
j Cn j= 2
WS 13/14
) even distributed choice probabilities
) deterministic choices
) binary logit
Einführung in Verkehr und Logistik
Independence from irrelevant alternatives (IIA)4
I Stems directly from the ”independent” part of the iid EV assumption
on ni
I Ratio of choice probabilities of two alternatives is independent from
the presence or absence of another alternative (or their attributes)
I Might be inadequat some times. If so, then make other assumption
about distribution of ni
I !Nested-Logit, Mixed Logit etc.
Proof IIA
Pn (i)
Pn (i 0 )
=
e Vni 0
e Vni
P
=
Vnj
Vnj
j e
j e
P
e Vni
e Vni 0
= e Vni
=
4 See
[Tra03, pp. 49-54]
Vni 0
30 / 56
WS 13/14
Einführung in Verkehr und Logistik
31 / 56
Red bus - blue bus paradoxon5
Example
Pn (’Car’) =
1
1
; Pn (’Red Bus’) =
2
2
Now add a blue bus to Cn
Pn (’Car’) =
1
1
1
; Pn (’Red Bus’) = ; Pn (’Blue Bus’) =
3
3
3
We would expect
Pn (’Car’) =
5 See
1
1
1
; Pn (’Red Bus’) = ; Pn (’Blue Bus’) =
2
4
4
[BAL85, pp. 51-55]
WS 13/14
Einführung in Verkehr und Logistik
IIA holds strictly only on individual level
Example: choice of shopping facility
Group
with car
no car
frequency
CBD
20 %
80 %
50 %
Outlet park 1
80 %
20 %
50 %
Add a new alternative Outlet park 2
Group
with car
no car
frequency
CBD
11.11 %
66.66 %
38.88 %
Outlet park 1
44.44 %
16.66 %
30.56 %
Outlet park 2
44.44 %
16.66 %
30.56 %
) The more socio-economic variables we use the less critical is IIA on
”market-share”-level
32 / 56
WS 13/14
Einführung in Verkehr und Logistik
33 / 56
Specification and identification
Un1 = 1 + 4 TC1 + 4 TT1 + 6 INCn + n1
Un2 = 2 + 4 TC2 + 5 TT2 + 7 INCn + n2
Un3 = 3 + 4 TC3 + 6 TT3 + 8 INCn +n3
|
{z
}
Vn3
I 1 , 2 , 3 : alternative-specific constants (ASCs)
I Only jCn j 1 ASCs are identified
I ASCs reflect the expectation value of ni only if a full set of ASCs
(jCn j
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
Specification of utility with categorial variables
(k) Attribute (variable)
Value (l ), reference category
(1) Age
(2) Income
(3) Gender
teen (t), adult (a), old (o)
high (h), low (l )
female (f ), male (m)
Zkl : Dummy variable of attribute k with value l
i0 + it Z1;t + ia Z1;a + ih Z2;h + if Z3;f
Segment of population (old, low income, male): 0
ASC for segment (adult, high income, male): 0 + a + h
34 / 56
WS 13/14
Einführung in Verkehr und Logistik
36 / 56
Estimation of ’s by Maximum Likelihood6
How do we get the ’s?
Definition
yni
=1, if n has chosen i (0, otherwise)
Re-write logit choice probabilities as
J
Y
Pn (i) =
(Pn (i))yni
i =1
Since ni are iid over n as well we can write the likelihood function as
L( ) =
N
J
Y
Y
(Pn (i))yni
n=1 i =1
Note, is the coefficient vector of interest! That is, all ik to be
estimated.
6 See
[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 extreme
points as L( )
!
N
J
N
J
Y
Y
X
X
yni
L( ) = ln L( ) = ln
(Pn (i))
=
yni ln Pn (i)
n=1 i =1
Substitute Pn (i) with Pe
L( )
=
N X
J
X
Vni
V
e nj
j
=
=
n=1 i =1
!
e Vnj
N
J
X
X
yni Vni
n=1 i =1
N
J
X
X
Vni
j
n=1 i =1
N
J
X
X
!
e
P
yni ln
n=1 i =1
yni ln
n=1 i =1
yni
X
k
ik znik
!
X
!
e Vnj
j
N
J
X
X
n=1 i =1
yni ln
X
j
P
e
k
jk znjk
!
WS 13/14
Einführung in Verkehr und Logistik
Maximise
38 / 56
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-fit
Pseudo-R 2 : LR = 1
l (ˆ )=l (0)
Software for estimation
I
I
I
I
BIOGEME
LIMDEP, NLOGIT
SPSS
R
WS 13/14
Einführung in Verkehr und Logistik
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 mymodel
mysample.dat
I We write the model to mymodel.mod
I .mod file may be manipulated by any texteditor (notepad++ is
advised)
I Data for estimation has to be stored in mysample.dat
I Results can be found in output mymodel.rep
7 See
[Bie08].
40 / 56
WS 13/14
Einführung in Verkehr und Logistik
41 / 56
Example
A choice problem
Students (n) with no car available chose on their commute to university either
to walk (i = 1) or go by bike (i = 2) or to take the bus (i = 3). The choice
depends on travel-time in minutes dni and gender sn with female students
indicated by 1. Now we write our deterministic utilities
Vn1
Vn2
V3n
0;1 + 1;1 d1;n + 2;1 sn
= 0;2 + 1;2 d2;n + 2;2 sn
= 0;3 + 1;3 d3;n + 2;3 sn
=
For identification purposes:
0;1 = 1;1 = 2;1 = 0
That is, Vn1 = 0
WS 13/14
Einführung in Verkehr und Logistik
BIOGEME syntax
mymodel.mod
[Choice]
Choice
[Beta]
// Name
b01
b02
b03
b11
b12
b13
b21
b22
b23
Value
0
0
0
0
0
0
0
0
0
LowerBound
-10000
-10000
-10000
-10000
-10000
-10000
-10000
-10000
-10000
UpperBound
10000
10000
10000
10000
10000
10000
10000
10000
10000
status (0=variable, 1=fixed)
1
0
0
1
0
0
1
0
0
[Utilities]
// Id Name Avail linear-in-parameter expression
1
Foot av1 b01 * one + b11 * d1 + b21 * s
2
Bike av2 b02 * one + b12 * d2 + b22 * s
3
Bus av3 b03 * one + b13 * d3 + b23 * s
[Expressions]
one = 1
av1 = 1
av2 = 1
av3 = 1
[Model]
$MNL
42 / 56
WS 13/14
Einführung in Verkehr und Logistik
43 / 56
Data
mysample.dat
ID Choice
1
1
2
1
3
1
4
2
5
1
:
:
95
3
96
1
97
1
98
2
99
1
100
1
WS 13/14
d1
6
8
12
21
6
:
51
18
6
33
19
15
d2
8
9
9
12
7
:
21
11
9
15
11
12
d3
13
13
15
17
12
:
24
14
12
16
13
16
s
0
1
1
0
0
:
0
1
0
1
0
1
Einführung in Verkehr und Logistik
Results: model statistics
mymodel.rep
Model:
Number of estimated parameters:
Number of observations:
Number of individuals:
Null log-likelihood:
Cte log-likelihood:
Init log-likelihood:
Final log-likelihood:
Likelihood ratio test:
Rho-square:
Adjusted rho-square:
Final gradient norm:
Diagnostic:
Iterations:
Run time:
Multinomial Logit
6
100
100
-109.861
-88.991
-109.861
-68.002
83.718
0.381
0.326
+4.082e-07
Convergence reached...
11
00:00
44 / 56
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.00
b03 -10.4 2.17
-4.78 0.00
2.02
-5.13
0.00
b11 0.00
--fixed-b12 0.324 0.0746
4.35
0.00
0.0665
4.87
0.00
b13 0.554 0.123
4.52
0.00
0.115
4.81
0.00
b21 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
=
Vn2
=
V3n
=
WS 13/14
0
5:57 + 0:324 d2;n
10:4 + 0:554 d3;n
0:128 sn
0:317 sn
Einführung in Verkehr und Logistik
Commute-to-school mode choice modelling for students located in
Dresden, Saxony. 8
Choice set
8
1
>
>
<
i=
2
>
3
>
:
4
8 See
foot
bike
transit
car
[MTH08].
*
*
47 / 56
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
0
Car always available
else
I Season=weather condition (k = 3)
1 Winter=bad weather
zni3 =
WS 13/14
0
else
Einführung in Verkehr und Logistik
Estimation results (N = 9300)
Mode
foot
(i = 1)
Variable (Coeff.)
ASC
(10 )
Distance
(11 )
Car-avail
(12 )
Season
(13 )
bike
ASC
(20 )
(i = 2)
Distance
(21 )
Car-avail
(22 )
Season
(23 )
transit
ASC
(30 )
(i = 3)
Distance
(31 )
Car-avail
(32 )
Season
(33 )
Null log-likelihood: -12 892.50
Likelihood ratio test: 16200.80
Estimate
SE
10.774
0.234
-4.376
0.183
-5.279
0.1634
-0.591
0.2385
6.570
0.190
-0.904
0.033
-4.772
0.184
-2.081
0.147
4.477
0.171
-0.052
0.017
-5.553
0.143
-0.489
0.135
Final log-likelihood:
Rho-square: 0.628301
t-statistic
46.042
-37.008
-3.609
-22.129
34.596
-27.365
-22.599
-14.160
26.210
-2.966
-38.870
-3.621
-4792.14
49 / 56
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
I Car-availability ”not always” (zni2 = 0)
I Summer term (zni3 = 0)
51 / 56
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
Vn2
= 6; 570
Vn3
= 4; 477
Vn4
= 0
WS 13/14
4; 376 0; 5
0; 904 0; 5
0; 052 0; 5
5; 2796 1 = 3; 307
4; 772 1 = 1; 346
5; 553 1 =
1; 102
Einführung in Verkehr und Logistik
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
=
Pn2
=
Pn3
=
Pn4
=
e 3;307
e 3;307 + e 1;346 + e
e 1;346
e 3;307 + e 1;346 + e
e 1;102
e 3;307 + e 1;346 + e
e0
e 3;307 + e 1;346 + e
1;102
+ e0
= 0; 841 = 84; 1%
1;102
+ e0
= 0; 118 = 11; 8%
1;102
+ e0
= 0; 010 = 1; 0%
1;102
+ e0
= 0; 031 = 3; 1%
53 / 56
WS 13/14
Einführung in Verkehr und Logistik
54 / 56
Transit choice probabilities
WS 13/14
Einführung in Verkehr und Logistik
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 urban
areas.
Journal of Transport Geography, 16(5):342–357, 2008.
55 / 56
WS 13/14
Einführung in Verkehr und Logistik
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.
56 / 56

Documents pareils