Hello! What I want to do is to subtract an IloNumExpr from a number. I want to put to an expression the following thing:
n is an integer and y is a decision variable
Cplex does not let me subtract a number in the addTerm method of the expression.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
3 replies Latest Post - 2013-02-21T14:42:06Z by SystemAdmin
Pinned topic sutracting number from IloNumExpr java cplex
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-02-21T14:42:06Z at 2013-02-21T14:42:06Z by SystemAdmin
Re: sutracting number from IloNumExpr java cplex2013-02-21T14:42:06Z in response to SystemAdminI suggest you take a good look at the IloCplexModeler class reference documentation. That is the superclass of IloCplex that provides the modeling API.
There you can find for example member function
IloNumExpr sum(double v, IloNumExpr e1);
that produces the sum of a constant and an expression.Updated on 2014-03-24T22:39:33Z at 2014-03-24T22:39:33Z by iron-man