I am trying to add two constraints in my design. I would like that cost in alternative 1 is larger than cost in alternative 2 when the value of attribute survival multiplying attribute tree in alternative 1 is larger than the value in alternative 2. I use the codes below to set up constraints, but I get an error message that alt1. survival* is not found. How should I fix this issue? Thanks.
- Code: Select all
;cond:
if(alt1.survival * alt1.tree > alt2.survival * alt2.tree, alt1.cost > alt2.cost),
if(alt1.survival * alt1.tree = alt2.survival * alt2.tree, alt1.cost = alt2.cost)