IBM ILOG Solver User's Manual > More on Modeling > Using Constrained Floating-Point Variables: Modeling Equations > Using floating-point variables in expressions |
Using floating-point variables in expressions |
INDEX
![]() |
Concert Technology allows you to define expressions involving floating-point variables. For example, you can formulate constraints on floating-point expressions by using the operators:
You can then use these expression to formulate constraints:
The following example model and solves a simple equation by mixing constrained integer variables and constrained floating-point variables. The floating-point variables are modeled using the class IloNumVar
. The member function IloSolver::getFloatVar
returns the algorithmically constrained floating-point variable corresponding to the variable x
. Here is the example:
The output is:
y = [-12, 4] |
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |