Conditionals in an unlabeled choice experiment

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Conditionals in an unlabeled choice experiment

Postby sahar.babri » Tue Apr 27, 2021 10:48 pm

Hi

We are designing a stated preference survey among Electrical Vehicle drivers. The alternatives are unlabelled and refer to different charging stations with different attribute levels. We have some scenario-specific attributes such as battery level (SoC), distance to destination (D) and some alternative-specific attributes such as charging speed (ChType), queuing time(WT), charging fee (ChFee), facilities (Facilities) and range after charging (Ra).
Some of the attributes are dependent on other attributes, for example the range after charging (Ra) is dependent on the battery level (SoC), distance to destination (D) and charging speed (ChType). These dependencies, we have coded as conditionals ( ;cond ).
We have coded our model as follows:
design
;alts = charge1*, charge2*, None

;rows = 36
;block = 6
;eff = (mnl,d)
; alg = swap(stop=total(600 secs))

;cond:

if(charge1.D=1,charge1.SOC=[1,2]),
if(charge1.D=2,charge1.SOC=[2,3]),

if(charge1.D=1 and charge1.SOC=1 and charge1.ChType=1, charge1.RA=1),
if(charge1.D=1 and charge1.SOC=1 and charge1.ChType=[2,3], charge1.RA=2),
if(charge1.D=1 and charge1.SOC=2 and charge1.ChType=1, charge1.RA=3),
if(charge1.D=1 and charge1.SOC=2 and charge1.ChType=[2,3], charge1.RA=4),
if(charge1.D=2 and charge1.ChType=1, charge1.RA=5),
if(charge1.D=2 and charge1.ChType=[2,3], charge1.RA=6),

if(charge2.D=1 and charge2.SOC=1 and charge2.ChType=1, charge2.RA=1),
if(charge2.D=1 and charge2.SOC=1 and charge2.ChType=[2,3], charge2.RA=2),
if(charge2.D=1 and charge2.SOC=2 and charge2.ChType=1, charge2.RA=3),
if(charge2.D=1 and charge2.SOC=2 and charge2.ChType=[2,3], charge2.RA=4),
if(charge2.D=2 and charge2.ChType=1, charge2.RA=5),
if(charge2.D=2 and charge2.ChType=[2,3], charge2.RA=6)

;model :

U(charge1) = b1[0.1] * D[1,2] + b2[-0.1] * SOC[1,2,3] + b3.dummy[0|0] * ChType[1,2,3] + b4[-0.1] * ChFee[1,2,3] + b5[-0.1] * WTime[1,2,3,4,5,6] + b6.dummy[0|0] * facilities[1,2,3] + b9[0.1] * RA[1,2,3,4,5,6] /

U(charge2) = b1 * D[D] + b2 * SOC[SOC] + b3.dummy * ChType[1,2,3] + b4 * ChFee[1,2,3] + b5 * WTime[1,2,3,4,5,6] + b6.dummy * facilities[1,2,3] + b9* RA[1,2,3,4,5,6]/

U(None) = b0

$
However, Ngene fails to find a feasible solution with the code written above, as the scenario-specific attributes are not fixed in the generated scenarios.
Is there any overlooked problem in the code we have written or the dependencies of the conditions cannot be defined with ;cond?

Thank you in advance!
sahar.babri
 
Posts: 2
Joined: Fri Apr 23, 2021 10:47 pm

Re: Conditionals in an unlabeled choice experiment

Postby Michiel Bliemer » Wed Apr 28, 2021 11:22 am

The warning message is as follows: " In this time, of the 74099 attempts made, there were 0 row repetitions, 169 alternative repetitions, and 73930 cases of dominance". In other words, it is the dominance checks that make it very difficult to find a design with 36 rows without any cases of dominance. The default row-based algorithm (with conditional constraints) is not suitable for such highly constrained designs, so you will need to switch to the modified Federov algorithm and use ;require and ;reject constraints.

So you need to replace ;alg = swap with ;alg = mfederov and replace your ;cond constraints with ;reject constraints. For example, the first three conditional constraints can be replaced with the following reject constraints:

;reject:
charge1.D=1 and charge1.SOC=3,
charge1.D=2 and charge1.SOC=1,

charge1.D=1 and charge1.SOC=1 and charge1.ChType=1 and charge1.RA=2,
charge1.D=1 and charge1.SOC=1 and charge1.ChType=1 and charge1.RA=3,
charge1.D=1 and charge1.SOC=1 and charge1.ChType=1 and charge1.RA=4,
charge1.D=1 and charge1.SOC=1 and charge1.ChType=1 and charge1.RA=5,
charge1.D=1 and charge1.SOC=1 and charge1.ChType=1 and charge1.RA=6

Note that the modified Federov algorithm does not try to achieve attribute level balance, so for the non-dummy coded variables you may want to impose some attribute level constraints to make sure that all levels appear a minimum number of times.

Please let me know if you need further help with your syntax.

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

Re: Conditionals in an unlabeled choice experiment

Postby sahar.babri » Fri Apr 30, 2021 11:14 pm

Thanks for the answer!

We tried the suggestions and now it works properly.

Regards
sahar.babri
 
Posts: 2
Joined: Fri Apr 23, 2021 10:47 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 27 guests

cron