Hi All
A small silly question, how can I add constraints on continuous attribute.. I would like to fix threshold base on other attributes levels
Design
;alts = alt1*,alt2*,alt3*,alt4*,alt5*,none
;rows = 400
;block= 50
;eff = (mnl,d)
;cond:
if(alt1.booking1=4, alt1.seat1=1),
if(alt3.booking3=4, alt3.seat3=1),
if(alt1.booking1=4, alt1.mobility1=[1,2,3]),
if(alt3.booking3=4, alt3.mobility3=[1,2,3]),
if(alt1.booking1=4, alt1.flex1=1),
if(alt1.booking1=4, alt2.flex2=1),
if(alt3.booking3=4, alt3.flex3=1),
if(alt3.booking3=4, alt4.flex4=1),
if(alt1.flex1=1, alt1.price1 < .8)
;model:
price is defined as continuous attribute....
The unconstrained syntax is running quite fine..
Best
Naji
Constraints on continuous attributes
Moderators: Andrew Collins, Michiel Bliemer, johnr
-
- Posts: 2056
- Joined: Tue Mar 31, 2009 4:13 pm
Re: Constraints on continuous attributes
The ;cond command is imcompatible with attributes with a continuous specification, see page 220 of the Ngene manual.
Solution: use semi-continuous levels, e.g. b*A[1:10:0.1], which creates levels 1.0, 1.1, 1.2, ..., 9.9, 10.0, which can be seen as more or less continuous.
Michiel
Solution: use semi-continuous levels, e.g. b*A[1:10:0.1], which creates levels 1.0, 1.1, 1.2, ..., 9.9, 10.0, which can be seen as more or less continuous.
Michiel