Code: Select all
set A
A1(A)
A2(A)
B
B1(B)
B2(B)
B3(B)
variable
P(A,B)
there are a lot of fixed zero variables for P(A1,B2), P(A2,B1).
How may I define a variable with only non-zero values?
Code: Select all
set A
A1(A)
A2(A)
B
B1(B)
B2(B)
B3(B)
variable
P(A,B)
Code: Select all
sets A /1*5/
A1(A) /2,3/
variable d,t;
equation Q,dummy;
Q(A1).. d(a1) =E= 0;
dummy.. t=l=2;
model p /all/;
solve p using lp maximizing t