Overview | Group | Tree | Graph | Index | Concepts |
Normalizing is sometimes known as reducing the terms of a linear expression.
Linear expressions consist of terms made up of constants and variables related by arithmetic operations; for example, x + 3y is a linear expression of two terms consisting of two variables. In some expressions, a given variable may appear in more than one term, for example, x + 3y +2x. Concert Technology has more than one way of dealing with linear expressions in this respect, and you control which way Concert Technology treats expressions from your application.
In one mode, Concert Technology analyzes linear expressions that your application
passes it and attempts to reduce them so that a given variable appears in only one term
in the linear expression. This is the default mode. You set this mode with the member
function IloEnv::setNormalizer(IloTrue)
.
In the other mode, Concert Technology assumes that no variable appears in more than
one term in any of the linear expressions that your application passes to Concert
Technology. We call this mode assume normalized linear expressions. You set this mode
with the member function IloEnv::setNormalizer(IloFalse)
.
In classes such as IloExpr
or
IloRange
, there are member functions that check the
setting of the member function IloEnv::setNormalizer
in the environment and
behave accordingly. The documentation of those member functions indicates how they behave
with respect to normalization.
When you set IloEnv::setNormalizer(IloFalse)
,
those member functions assume that no variable appears in more than one term in a linear
expression. This mode may save time during computation, but it entails the risk that a
linear expression may contain one or more variables, each of which appears in one or more
terms. Such a case may cause certain assertions in member functions of a class to fail if
you do not compile with the flag -DNDEBUG
.
By default, those member functions attempt to reduce expressions. This mode may require more time during preliminary computation, but it avoids of the possibility of a failed assertion in case of duplicates.
For more information, refer to the documentation of IloEnv
,IloExpr
, and IloRange
.