how to control the number of variables
-
- User
- Posts: 118
- Joined: 7 years ago
- Location: Rosario - Argentina
Re: how to control the number of variables
Hi, the final number of variables depends on the constraints.
-
- User
- Posts: 108
- Joined: 7 years ago
Re: how to control the number of variables
For more detail: You don't need to declare the domain of the variable (as in variable P(A,B)). You can just write variable p;
Then, if the variable appears in the constraints, it will be part of the model. Check out this example:
Then, if the variable appears in the constraints, it will be part of the model. Check out this example:
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