design with scenario, pivot, and nested utility function

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

design with scenario, pivot, and nested utility function

Postby denissa-purba » Thu Apr 25, 2024 9:46 pm

Hello,

I am trying to design a survey about the route choices of electric vehicles in two cases, i.e., short- and long-distance trip. For each case, we explore another scenario where driver start with different battery state of charge.

For the short-distance trip, we plan to design 2-level nested logit model: charge/not charge and route alternatives. The choice task will have 1 reference and 5 route alternatives (1 reference without charging, 2 alt routes without charging, and 3 alt routes with charging). For the long-distance trip, the choice task will have will 1 reference and 2 alt route alternatives with charging.

Currently, my idea is to create two different experiment design models for each short- and long-distance trip. For each model, I will have 3 scenarios based on battery SOC with their corresponding reference.

My inquiries:
1. I follow the scenario (Section 8.5) and homogenous pivot (Section 8.3.2). Can you explain more the differences of homogenous and heterogenous pivot designs? Could I say that my model is homogenous pivot design?
2. For long-distance trip, I want to have 3 blocks with 6 questions for each block. I implemented 3 scenario model and homogenous pivot. To get 6 questions, I generate 2 questions for each scenario model, then combine it to my survey. Would it be ok?
3. How should I pair up the blocks in my homogenous pivot design? Should I combine all block 1 questions together, and so on, or can I randomize the block assignment?
4. In the short-distance trip scenario, each route is unlabeled, but the utility functions for charging and non-charging are different. How can I efficiently model this?
Currently, I set the reference value for all charging-related attributes to 0. I got error:
“Error: Attribute 'ch_time' is specified with level '0%' more than once. Each level can only be specified once within an attribute.”
Then, I set small number like 0.0001. It works, but D-eff is very large.

Please find my script here. Thank you in advanced!

Long-Dist Experiment Design
Code: Select all
design

;alts(SOC30) = route1, route2*, route3*
;alts(SOC50) = route1, route2*, route3*
;alts(SOC80) = route1, route2*, route3*

;rows = 6
;block = 3

? using constrained efficient design
?;fisher(fish) = design1(SOC30[0.33], SOC50[0.33], SOC80[0.34])

;eff = fish(mnl,d)
;fisher(fish) = design1(SOC30[0.33], SOC50[0.33] , SOC80[0.34])



;model(SOC30):
U(route1)= b1 * tr_time.ref[180]   ? travel time
         + b2 * ch_time.ref[60]    ? charging time
         + b3 * qu_time.ref[20]    ? queueing time
         + b4 * ch_act.ref[3]      ? total charging activities in the trip
         + b5 * SOC_des.ref[25]    ? SOC at destination
         /

U(route2)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route3)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1]
         + b5 * SOC_des.piv[-25%,0%,25%]

;model(SOC50):
U(route1)= b1 * tr_time.ref[100]
         + b2 * ch_time.ref[30]
         + b3 * qu_time.ref[15]
         + b4 * ch_act.ref[2]
         + b5 * SOC_des.ref[5]
         /

U(route2)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route3)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1]
         + b5 * SOC_des.piv[-25%,0%,25%]

;model(SOC80):
U(route1)= b1 * tr_time.ref[60]
         + b2 * ch_time.ref[10]
         + b3 * qu_time.ref[4]
         + b4 * ch_act.ref[2]
         + b5 * SOC_des.ref[5]
         /

U(route2)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route3)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1]
         + b5 * SOC_des.piv[-25%,0%,25%]

$


Short-Dist Experiment Design
Code: Select all
design

;alts(SOC30) = route1, route2*, route3*, route4*, route5*, route6*
;alts(SOC50) = route1, route2*, route3*, route4*, route5*, route6*
;alts(SOC80) = route1, route2*, route3*, route4*, route5*, route6*

;rows = 6
;block = 3

;eff = fish(mnl,d)
;fisher(fish) = design1(SOC30[0.33], SOC50[0.33] , SOC80[0.34])


;model(SOC30):
U(route1)= b1 * tr_time.ref[80]   ? travel time
         + b2 * ch_time.ref[0.0001]    ? charging time
         + b3 * qu_time.ref[0.0001]    ? queueing time
         + b4 * ch_act.ref[0]      ? total charging activities in the trip
         + b5 * SOC_des.ref[15]    ? SOC at destination
         /

U(route2)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[0%]
         + b3 * qu_time.piv[0%]
         + b4 * ch_act.piv[0]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route3)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[0%]
         + b3 * qu_time.piv[0%]
         + b4 * ch_act.piv[0]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route4)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1,2]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route5)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1,2]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route6)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1,2]
         + b5 * SOC_des.piv[-25%,0%,25%]
         



;model(SOC50):
U(route1)= b1 * tr_time.ref[50]
         + b2 * ch_time.ref[0.0001]    ? charging time
         + b3 * qu_time.ref[0.0001]    ? queueing time
         + b4 * ch_act.ref[0]
         + b5 * SOC_des.ref[30]
         /

U(route2)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[0]
         + b3 * qu_time.piv[0]
         + b4 * ch_act.piv[0]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route3)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[0]
         + b3 * qu_time.piv[0]
         + b4 * ch_act.piv[0]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /


U(route4)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1,2]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route5)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1,2]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route6)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1,2]
         + b5 * SOC_des.piv[-25%,0%,25%]
         

;model(SOC80):
U(route1)= b1 * tr_time.ref[30]
         + b2 * ch_time.ref[0.0001]    ? charging time
         + b3 * qu_time.ref[0.0001]    ? queueing time
         + b4 * ch_act.ref[0]
         + b5 * SOC_des.ref[55]
         /

U(route2)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[0%]
         + b3 * qu_time.piv[0%]
         + b4 * ch_act.piv[0]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route3)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[0%]
         + b3 * qu_time.piv[0%]
         + b4 * ch_act.piv[0]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route4)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1,2]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route5)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1,2]
         + b5 * SOC_des.piv[-25%,0%,25%]
         /

U(route6)= b1 * tr_time.piv[-25%,0%,25%]
         + b2 * ch_time.piv[-25%,0%,25%]
         + b3 * qu_time.piv[-25%,0%,25%]
         + b4 * ch_act.piv[0,1,2]
         + b5 * SOC_des.piv[-25%,0%,25%]
         
$

denissa-purba
 
Posts: 1
Joined: Wed Apr 10, 2024 1:31 am

Re: design with scenario, pivot, and nested utility function

Postby Michiel Bliemer » Fri Apr 26, 2024 8:55 am

1. With a homogeneous design a single design is generated and applied for all models/segments specified. A heterogeneous design means that a different design is generated for each model/segment.

2. You currently have specified 3 blocks with 2 choice tasks each, if you want each block to be 6 choice tasks then you need to use ;rows = 18 ;block = 3. I am not sure what a "scenario model" is. If you have scenario variables, you would typically include them in the experimental design. But you could ask the same choice task 3 times but only vary the scenario I suppose. You will need to think how you will analyse the data with the scenario variables, unless you intend to estimate separate models for each scenario.

3. A block is a set of questions given to a single respondent, so you would indeed combine all choice tasks with the same block number. Instead of using blocks you could also randomly assign choice tasks to respondents, this is the default in most survey platforms.

4. I do not get this error, as you using the latest version of Ngene (version 1.4)? What I can see is that it yields an extremely high D-error. This is because you are setting the reference levels to 0.0001, essentially 0, and -25% and +25% is therefore still essentially zero and b2 and b3 cannot be estimated. When I set the reference levels to 20 and 30 then it seems to work.

Michiel
Michiel Bliemer
 
Posts: 1885
Joined: Tue Mar 31, 2009 4:13 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 15 guests

cron