<div> </div>
<div>Hi,</div>
<div> </div>
<div>I have written a little piece of my program below, the constraint CostITDevCon2 is causing a problem, I can compile my program without any errors/warnings, but when I run it, the program hangs and I don't get any message to know what went wrong. When I remove this constraint from the overall program everything works just fine. I think something is seriously wrong with this constraints, don't know what. Any help on this much appreciated.
</div>
<div> </div>
<div> </div>
<div>#define bigM 10000<br clear="all"></div>
<div>MP_set A(3), I(4), L(3);</div>
<div> </div>
<div>MP_data curLev(A,I), itDevCost(A,I,L)</div>
<div>
<p>MP_constraint CostITDevCon2(A,I)</p>
<p>MP_index li, lj; //alias for set L</p>
<p>MP_variable U(A,I,L), DC(A,I);</p>
<p>DC.lowerLimit(A, I) = 0;</p>
<p>U.binary();</p>
<p>CostITDevCon2(A,I).such_that(curLev(A,I)>=1) = </p>
<p>DC(A,I) >= sum(L(li).such_that(li>curLev(A,I)-1), (1-sum(L(lj).such_that((lj>curLev(A,I)-1) &&<br></p>
<p>(lj<=li)), U(A,I,lj)))*itDevCost(A,I,li)) + bigM*(sum(L.such_that(L>curLev(A,I)-1), U(A,I,L))-1);</p>
<p>The other strange thing is this when I write the above constraint like below, I can't even compile my program:</p>
<p>CostITDevCon2(A,I).such_that(curLev(A,I)>=1) = </p>
<p>DC(A,I) >= sum(L(li).such_that(li>curLev(A,I)), (1-sum(L(lj).such_that((lj>curLev(A,I)) &&<br></p>
<p>(lj<=li)), U(A,I,lj)))*itDevCost(A,I,li)) + bigM*(sum(L.such_that(L>curLev(A,I)), U(A,I,L))-1);</p>
<p>Here I just remove "-1" from all such_that blocks; everything else is just the same.</p>
<p>For some verification purpose, I rewrote the entire program in GAMS/CPLEX combo and it works just fine over there.</p></div>
<div>curLev(A,I) is the data that contains either 1, 2, or 3.</div>
<div> </div>
<div>best regards,<br>--vishy<br><br>_______________________<br>Youngest Music Meastro<br>Mayank Sahu<br><a href="http://www.mayanksahu.net">http://www.mayanksahu.net</a> </div>