constraints in Modified Federov Algorithm
Posted: Thu Nov 24, 2022 8:16 pm
Dear Ngene Team,
Below is a labeled design code that my student is developed for his study.
1. He would like to have constraints for the time (10,15,20,25) and cost (0,1000,2000,3000) of bike-sharing. This means whenever the time is 10, the cost should be 0, time = 15 and cost = 1000, time = 20 and cost = 2000, time = 25 and cost = 3000. The purpose is to see the willingness to use free-of-charge or paid services. However, the result is "undefined". If we delete one constraint (mentioned by ? in the code), then the Ngene is able to find a solution. In this case, we have a choice task including time = 10 and cost = 1000 which is not desired. Can we simply make cost = 0 in the result table for these choice tasks? or how we can solve this problem?
2. He also would like to add weather conditions as a scenario variable. The weather variable is only added to one utility function i.e. U(bike-sharing) as an interaction effect with travel time. Do we need to add it also to bike, U(bike)? If so, how?
Design
;alts = bikeshare, bike, car, taxi, bus, none
;rows=12
;alg = mfederov
;rdraws = Halton(1000)
;eff = (mnl,d)
;con
;reject:
bikeshare.cost_bikeshare= 0 and bikeShare.time_bikeshare= 15,
bikeshare.cost_bikeshare= 0 and bikeShare.time_bikeshare= 20,
bikeshare.cost_bikeshare= 0 and bikeShare.time_bikeshare= 25,
bikeshare.cost_bikeshare= 1000 and bikeShare.time_bikeshare= 10, ? for example we remove this line, Ngene is able to find a design.
bikeshare.cost_bikeshare= 1000 and bikeShare.time_bikeshare= 20,
bikeshare.cost_bikeshare= 1000 and bikeShare.time_bikeshare= 25,
bikeshare.cost_bikeshare= 2000 and bikeShare.time_bikeshare= 10,
bikeshare.cost_bikeshare= 2000 and bikeShare.time_bikeshare= 15,
bikeshare.cost_bikeshare= 2000 and bikeShare.time_bikeshare= 25,
bikeshare.cost_bikeshare= 3000 and bikeShare.time_bikeshare= 10,
bikeshare.cost_bikeshare= 3000 and bikeShare.time_bikeshare= 15,
bikeshare.cost_bikeshare= 3000 and bikeShare.time_bikeshare= 20,
bike.time_bike = 10 and bikeShare.time_bikeshare= 20,
bike.time_bike = 10 and bikeShare.time_bikeshare= 25,
bike.time_bike = 15 and bikeShare.time_bikeshare= 10,
bike.time_bike = 15 and bikeShare.time_bikeshare= 25,
bike.time_bike = 20 and bikeShare.time_bikeshare= 10,
bike.time_bike = 20 and bikeShare.time_bikeshare= 10
;model:
U(none) = ASC_none[n,0,0.5]
/
U(bikeshare)= ASC_bikeshare[n,0,0.5]
+ b_bikesharec[n,-0.00001,0.5]* cost_bikeshare[0,1000,2000,3000](1-10,3-10,3-10,2-10)
+ b_bikesharet[n,-0.00001,0.5]* time_bikeshare[10,15,20,25](1-10,3-10,3-10,2-10)
+ b_acc[n,-0.00001,0.5] * access[3,6,9](3-10,3-10,3-10)
+ b_weather[n,0,0.5] * time_bikeshare*weather[1,2,3,4](2-10,2-10,2-10,2-10)
/
U(bike) = ASC_bike[n,0,0.5]
+ b_biket[n,-0.00001,0.5] * time_bike[10,15,20](3-10,3-10,3-10)
/
U(car) = b_carc[n,-0.00001,0.5] * cost_car[8000,10000,12000](3-10,3-10,3-10)
+ b_ct[n,-0.00001,0.5] * time_car[12,14,16](3-10,3-10,3-10)
/
U(taxi) = ASC_taxi[n,0,0.5]
+ b_cost[n,-0.00001,0.5] * cost_taxi[3000,4000,5000,6000](2-10,2-10,2-10,2-10)
+ b_tt[n,-0.00001,0.5] * time_taxi[12,16,20](3-10,3-10,3-10)
+ b_acc * access
/
U(bus) = ASC_bus[n,0,0.5]
+ b_cost * cost_bus[1200,2000,2400](3-10,3-10,3-10)
+ b_bt[n,-0.00001,0.5] * time_bus[20,25,30](3-10,3-10,3-10)
+ b_acc * access
;formatTitle = 'Game <scenarionumber>'
;formatTableHeader = 'Imagine there is also bike-sharing system in the city, which option would you use to go to work&/study&?'
;formatTableFooter = '- Bike Sharing Cost&: The first 10 minutes of hiring a bike is free-of-charge, then you have to pay 1000&/extra 5 minutes. For example&: 15 minutes bike hire = 1000, 20 minutes = 2000 and 25 minutes = 3000.'
$
Below is a labeled design code that my student is developed for his study.
1. He would like to have constraints for the time (10,15,20,25) and cost (0,1000,2000,3000) of bike-sharing. This means whenever the time is 10, the cost should be 0, time = 15 and cost = 1000, time = 20 and cost = 2000, time = 25 and cost = 3000. The purpose is to see the willingness to use free-of-charge or paid services. However, the result is "undefined". If we delete one constraint (mentioned by ? in the code), then the Ngene is able to find a solution. In this case, we have a choice task including time = 10 and cost = 1000 which is not desired. Can we simply make cost = 0 in the result table for these choice tasks? or how we can solve this problem?
2. He also would like to add weather conditions as a scenario variable. The weather variable is only added to one utility function i.e. U(bike-sharing) as an interaction effect with travel time. Do we need to add it also to bike, U(bike)? If so, how?
Design
;alts = bikeshare, bike, car, taxi, bus, none
;rows=12
;alg = mfederov
;rdraws = Halton(1000)
;eff = (mnl,d)
;con
;reject:
bikeshare.cost_bikeshare= 0 and bikeShare.time_bikeshare= 15,
bikeshare.cost_bikeshare= 0 and bikeShare.time_bikeshare= 20,
bikeshare.cost_bikeshare= 0 and bikeShare.time_bikeshare= 25,
bikeshare.cost_bikeshare= 1000 and bikeShare.time_bikeshare= 10, ? for example we remove this line, Ngene is able to find a design.
bikeshare.cost_bikeshare= 1000 and bikeShare.time_bikeshare= 20,
bikeshare.cost_bikeshare= 1000 and bikeShare.time_bikeshare= 25,
bikeshare.cost_bikeshare= 2000 and bikeShare.time_bikeshare= 10,
bikeshare.cost_bikeshare= 2000 and bikeShare.time_bikeshare= 15,
bikeshare.cost_bikeshare= 2000 and bikeShare.time_bikeshare= 25,
bikeshare.cost_bikeshare= 3000 and bikeShare.time_bikeshare= 10,
bikeshare.cost_bikeshare= 3000 and bikeShare.time_bikeshare= 15,
bikeshare.cost_bikeshare= 3000 and bikeShare.time_bikeshare= 20,
bike.time_bike = 10 and bikeShare.time_bikeshare= 20,
bike.time_bike = 10 and bikeShare.time_bikeshare= 25,
bike.time_bike = 15 and bikeShare.time_bikeshare= 10,
bike.time_bike = 15 and bikeShare.time_bikeshare= 25,
bike.time_bike = 20 and bikeShare.time_bikeshare= 10,
bike.time_bike = 20 and bikeShare.time_bikeshare= 10
;model:
U(none) = ASC_none[n,0,0.5]
/
U(bikeshare)= ASC_bikeshare[n,0,0.5]
+ b_bikesharec[n,-0.00001,0.5]* cost_bikeshare[0,1000,2000,3000](1-10,3-10,3-10,2-10)
+ b_bikesharet[n,-0.00001,0.5]* time_bikeshare[10,15,20,25](1-10,3-10,3-10,2-10)
+ b_acc[n,-0.00001,0.5] * access[3,6,9](3-10,3-10,3-10)
+ b_weather[n,0,0.5] * time_bikeshare*weather[1,2,3,4](2-10,2-10,2-10,2-10)
/
U(bike) = ASC_bike[n,0,0.5]
+ b_biket[n,-0.00001,0.5] * time_bike[10,15,20](3-10,3-10,3-10)
/
U(car) = b_carc[n,-0.00001,0.5] * cost_car[8000,10000,12000](3-10,3-10,3-10)
+ b_ct[n,-0.00001,0.5] * time_car[12,14,16](3-10,3-10,3-10)
/
U(taxi) = ASC_taxi[n,0,0.5]
+ b_cost[n,-0.00001,0.5] * cost_taxi[3000,4000,5000,6000](2-10,2-10,2-10,2-10)
+ b_tt[n,-0.00001,0.5] * time_taxi[12,16,20](3-10,3-10,3-10)
+ b_acc * access
/
U(bus) = ASC_bus[n,0,0.5]
+ b_cost * cost_bus[1200,2000,2400](3-10,3-10,3-10)
+ b_bt[n,-0.00001,0.5] * time_bus[20,25,30](3-10,3-10,3-10)
+ b_acc * access
;formatTitle = 'Game <scenarionumber>'
;formatTableHeader = 'Imagine there is also bike-sharing system in the city, which option would you use to go to work&/study&?'
;formatTableFooter = '- Bike Sharing Cost&: The first 10 minutes of hiring a bike is free-of-charge, then you have to pay 1000&/extra 5 minutes. For example&: 15 minutes bike hire = 1000, 20 minutes = 2000 and 25 minutes = 3000.'
$