Originally posted by: SystemAdmin
[namsu said:]
Dear,
I need to run LP with different objective function coefficients.
That is, constraints are the same.
For example,
at first try,
max: x1+x2+x3
second try
max: 2x1+x3
third try
max: 5x1+x2
..
the constraints parts are still the same.
I tried to implement as follows:
while( 1 ) {
IloExpr masterObj(env);
for (int ct=0; ct<sizeC; ct++) {<br />
//detail parts are omitted
masterObj += ( ( (rand()%1000)+1-200 ) * c[i][j][d] );
}//end of master obj
masterM.add(IloMaximize(env, masterObj));
cplexM.solve();
masterM.remove(IloMaximize(env, masterObj));
masterObj.end();
}
Compile, and link were ok.
however, when I run the program, I got the below error message.
Error: MultipleObjException: IloCplex can not handle multiple objectives
Any one knows how to cover this error?
Your help will be very appreciated.
thanks for reading.
#CPLEXOptimizers#DecisionOptimization