Hi everybody. Look at this simple optmodel statement as an example: proc optmodel printlevel=0 FD=CENTRAL; var j; max s = j; con c: (if 1<j<=3 then 3 else 5) <=4; solve; create data output from j; quit; If you execute it, SAS doesn't find a maximum for j (it reaches 1.0001E19 with a default number of iterations), while to me it might be j=3, since the constraint is true only if 1<j<=3. I see that j disappears from the constraint, in the end, so there is no inequality in j, but in any case I don't understand why I cannot write this. Why? It looks to me like SAS translates the problem into something with the following 2 constraints: con c1: i <= 4; con c2: i = if 1<j<=3 then 3 else 5; Now, for every j, this is a system made of an equality (i=3 or i=5) and an inequality (i<=4). Since there is no special priority checking the constraints, SAS will hardly find a valid solution: the only two valid solutions are j=3 and j=5. Is this problem equivalent to the first in SAS? Why? How can I solve it? Thank you.
... View more