Originally posted by: SystemAdmin
Hello :)
I have a complex objective function where the final expression is created by aggregating snippet expressions in the model. That is, lets assume following simplified objective function:
F = e1 + e2 +...en where
IloLinearNumExpr e1,e2,e3
e1.addTerm(5, X[0]);
e1.addTerm(3, X[1]);
e1.addTerm(7, X[2]);
e1.setConstant(10);
e2.addTerm(10, X[6]);
....
e2.addTerm(n, X[9]);
IloNumExpr e3 = model.min(e1,e2);
...
...
en
What is really needed to build up the final expression is casting IloNumExpr expressions (e.g., e3) to IloLinearNumExpr in the course of iteration to be able to create the final expression in a loop. However, the casting is not plausible. So I'm wondering how we can deal with
Some parts of the objective function expression include min/max. I'm wondering if anybody can shed some lights for expression aggregation since there is no way for casting
I'm grateful for some help on this topic.
#CPLEXOptimizers#DecisionOptimization