Dear Michiel,
This was the original code:
Code: Select all
design ? mode choice of shippers without reference alternative
;alts(withref)=ref, truck, train, etrain
;alts(withoutref)=truck, train, etrain
;rows=24
;block=2
;eff= withoutref(mnl,d)
;con
;model(withref): ?auxiliary model with reference alternative
U(ref)= brefcost[-0.000000001] * cost.ref[150]
+ breftime[-0.000000001] * time.ref[10]
+ brefttr[-0.000000001] * ttrzero.ref[0.8]
/
U(truck)= b1[-0.000000001] * cost.piv[-10%, -5%,0%,5%,10%]
+ b2[-0.000000001] * time.piv[-2,-1,0,1,2]
+ b3[-0.000000001] * ttr1[0.8,1.47,1.71,1.96,2.4]
+ b4.dummy[-0.000000001] * risk[1,0]
U(train)= con_train
+ b5[-0.000000001] * cost.piv[ -15%,-10%,-5%]
+ b6[-0.000000001] * time.piv[1,2,3,4]
+ b3 * ttr1
+ b11[0.000000001] * frequency2[5,6,7]
/
U(etrain)= con_etrain
+ b7[-0.000000001] * cost.piv[5%,10%,15%]
+ b8[-0.000000001] * time.piv[-2,-1.5,-1]
+ b9[-0.000000001] * ttr2[0.8,1.47]
+ b10[0.000000001] * frequency[2,3,5]
;model(withoutref): ?model without reference alternative
U(truck)= b1 * cost.piv[-10%, -5%,0%,5%,10%]
+ b2 * time.piv[-2,-1,0,1,2]
+ b3 * ttr1[0.8,1.47,1.71,1.96,2.4]
+ b4.dummy * risk[1,0]
/
U(train)= con_train
+ b5 * cost.piv[-15%,-10%,-5%]
+ b6 * time.piv[1,2,3,4]
+ b3 * ttr1
+ b11 * frequency2[5,6,7]
/
U(etrain)= con_etrain
+ b7 * cost.piv[5%,10%,15%]
+ b8 * time.piv[-2,-1.5,-1]
+ b9 * ttr2[0.8,1.47]
+ b10 * frequency[2,3,5]
$
I tried to add another model using a different reference alternative with an aim to generate a heterogeneous pivot design.
Code: Select all
design ? mode choice of shippers without reference alternative
?First model
;alts(withref1)=ref1, truck, train, etrain
;alts(withoutref1)=truck, train, etrain
?Second model
;alts(withref2)=ref2, truck, train, etrain
;alts(withoutref2)=truck, train, etrain
;rows=8
;block=1
;eff= alldistances(mnl,d)
;fisher(alldistances)=des1(withoutref1[0.5])+ des2(withoutref2[0.5])
;con
? Model when cost=$150 and time=10 hours
;model(withref1): ?auxiliary model with reference alternative1
U(ref1)= brefcost[-0.000000001] * cost.ref1[150]
+ breftime[-0.000000001] * time.ref1[10]
+ brefttr[-0.000000001] * ttrzero.ref[0.8]
/
U(truck)= b1[-0.000000001] * cost.piv[-10%, -5%,0%,5%,10%]
+ b2[-0.000000001] * time.piv[-2,-1,0,1,2]
+ b3[-0.000000001] * ttr1[0.8,1.47,1.71,1.96,2.4]
+ b4.dummy[-0.000000001] * risk[1,0]
/
U(train)= con_train
+ b5[-0.000000001] * cost.piv[ -15%,-10%,-5%]
+ b6[-0.000000001] * time.piv[1,2,3,4]
+ b3 * ttr1
+ b11[0.000000001] * frequency2[5,6,7]
/
U(etrain)= con_etrain
+ b7[-0.000000001] * cost.piv[5%,10%,15%]
+ b8[-0.000000001] * time.piv[-2,-1.5,-1]
+ b9[-0.000000001] * ttr2[0.8,1.47]
+ b10[0.000000001] * frequency[2,3,5]
;model(withoutref1): ?model without reference alternative1
U(truck)= b1 * cost.piv[-10%, -5%,0%,5%,10%]
+ b2 * time.piv[-2,-1,0,1,2]
+ b3 * ttr1[0.8,1.47,1.71,1.96,2.4]
+ b4.dummy * risk[1,0]
/
U(train)= con_train
+ b5 * cost.piv[-15%,-10%,-5%]
+ b6 * time.piv[1,2,3,4]
+ b3 * ttr1
+ b11 * frequency2[5,6,7]
/
U(etrain)= con_etrain
+ b7 * cost.piv[5%,10%,15%]
+ b8 * time.piv[-2,-1.5,-1]
+ b9 * ttr2[0.8,1.47]
+ b10 * frequency[2,3,5]
? Model when cost=$200 and time=10 hours
;model(withref2): ?auxiliary model with reference alternative2
U(ref2)= brefcost[-0.000000001] * cost.ref2[180]
+ breftime[-0.000000001] * time.ref2[10]
+ brefttr[-0.000000001] * ttrzero.ref[0.8]
/
U(truck)= b1[-0.000000001] * cost.piv[-10%, -5%,0%,5%,10%]
+ b2[-0.000000001] * time.piv[-2,-1,0,1,2]
+ b3[-0.000000001] * ttr1[0.8,1.47,1.71,1.96,2.4]
+ b4.dummy[-0.000000001] * risk[1,0]
/
U(train)= con_train
+ b5[-0.000000001] * cost.piv[ -15%,-10%,-5%]
+ b6[-0.000000001] * time.piv[1,2,3,4]
+ b3 * ttr1
+ b11[0.000000001] * frequency2[5,6,7]
/
U(etrain)= con_etrain
+ b7[-0.000000001] * cost.piv[5%,10%,15%]
+ b8[-0.000000001] * time.piv[-2,-1.5,-1]
+ b9[-0.000000001] * ttr2[0.8,1.47]
+ b10[0.000000001] * frequency[2,3,5]
;model(withoutref2): ?model without reference alternative2
U(truck)= b1 * cost.piv[-10%, -5%,0%,5%,10%]
+ b2 * time.piv[-2,-1,0,1,2]
+ b3 * ttr1[0.8,1.47,1.71,1.96,2.4]
+ b4.dummy * risk[1,0]
/
U(train)= con_train
+ b5 * cost.piv[-15%,-10%,-5%]
+ b6 * time.piv[1,2,3,4]
+ b3 * ttr1
+ b11 * frequency2[5,6,7]
/
U(etrain)= con_etrain
+ b7 * cost.piv[5%,10%,15%]
+ b8 * time.piv[-2,-1.5,-1]
+ b9 * ttr2[0.8,1.47]
+ b10 * frequency[2,3,5]
$
But this does not work.