Hi,
I would like to progressively build up certain constraints in Java API. I aim to add certain values into IloNumExpr per each origin-destination pair.
HashMap<OriginDestionation,IloNumExpr> tracker = new HashMap<OriginDestionation,IloNumExpr>();Suppose I create
IloNumExpr expr= ...;
OriginDestionation instance= ...;
and add to my map as follows
tracker.put(instance, expr);
Now, I would like to add another IloNumExpr term by using the "instance" key in another part of my code. I have tried to do the following but received an error.
IloNumExpr tempExpr = tracker.get(instance);tempExpr.addTerm(x, y); //x and y are double and IloIntVar, respectively. tracker.put(instance, tempExpr);Error message is
"The method addTerm(double, IloIntVar) is undefined for the type IloNumExpr"------------------------------
Ser Giovio
------------------------------
#DecisionOptimization