Originally posted by: JoeBen
Hi, after your last message I tried to classify my optimization problem and I fixed some problems, but still I have issue, i found cplex with java very hard with little documetation and example.
About this equation :
1/2*Price(i) = 1/3(Cost(i)*0.68)
I do like that :
IloCplex cplex = new IloCplex();
for (i=0;i<n;i++){
cplrx.addeq(cplex.prod(0.5,price[i]),cplex.prod(0.22),cost[i]);
}
.....
but I get this error :
The method addEq(double, IloNumVar) in the type ... is not applicable for the arguments
(double)
So how I can do the equation above with price is the type double not IloNumVar, Price in that case is a data?
The problem is I can't get data from a file without type(I mean in my case double), but I the same time I should use this input data as iloNumVar to make it work with Cplex...
#CPLEXOptimizers#DecisionOptimization