Originally posted by: Torben-Ger-1988
Hey Guys,
My Funktion looks like this: sum of Y_i_j and sum of X_i_j
The Problem is, Y_i_j is a double and no iloNumVar.
It's part of the function anyway. As soon as i want to add the Term its not possible, because its a double and no IloNumVar
How can i solve this problem??
The code looks like this and the problem is written below
IloLinearNumExpr Funktion = cplex.linearNumExpr();
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 3; j++) {
Funktion.addTerm(Y[i][j], 1.0);
Funktion.addTerm(X[i][j], 1.0);
//Funktion.addTerm(cplex.sum(Y[i][j],X[i][j]));
}
}
The method addTerm(double, IloNumVar) in the type IloLinearNumExpr is not applicable for the arguments (double, double)
The other question i have is, there is a constraint that expectes all Y-doubles to be bigger than 0
But the Term: cplex.addGe(Y[0][0], 0.0);
is not available for double.
The method addGe(double, IloNumExpr) in the type IloCplexModeler is not applicable for the arguments (double, double)
Thanks for any help. Getting desperated.
Cheerfully regards Torben
#DecisionOptimization#OPLusingCPLEXOptimizer