|
Integer variables |
Top Previous Next |
|
These can take on integer values between specified lower and upper bounds where note the default upper bound is 100. Integer variables are declared as follows,
Integer Variable s1(i), t1(k,j), w1(i,k,j) ; Example: POSITIVE VARIABLE X1 INTEGER VARIABLE X2 BINARY VARIABLE X3 VARIABLE OBJ EQUATIONS OBJF X1X2 X1X3; OBJF.. 7*X1-3*X2-10*X3 =E= OBJ; X1X2.. X1-2*X2 =L=0; X1X3.. X1-20*X3 =L=0; x2.up=125; option optcr=0.01; MODEL IPTEST /ALL/; SOLVE IPTEST USING MIP MAXIMIZING OBJ; Notes:
|