Originally posted by: SystemAdmin
Hi,
I made the experience that you might loose performace, if you
set the lower und upper bound of several thousands of variables,
as Alex described.
An alternative way to tackle the problem is to set up a subset
of variables for which you set up constraints that fix the
variable.
I.e. you will have sometrhing like (code is not tested)
range numVars = 1..5000;
dvar int x[numVars] in 0..5;
{int} fixedVars = ... add some code to determine the fixed vars ...
maximize sum(i in numVars ) x[i];
subject to
{
// ... some other constraints ...
// fix variables
for(i in fixedVars )
x[i] == 4;
}
You might try both. Both should yield the same solution.
Regards
Norbert
#DecisionOptimization#OPLusingCPLEXOptimizer