This is the interface for scalar product expressions for
numerical variables of any type.
Namespace: ILOG.Concert
Assembly: oplall (in oplall.dll)
Syntax
Remarks
Objects of type ILinearNumExpr represent linear expressions of the form
sum_{i=1..n} a_i * x_i + c
where x_i are variables of type INumVar and c and a_i are double values.
ILinearNumExpr objects are created with methods:
- IModeler.LinearNumExpr()
- IModeler.ScalProd()
Once created, integer linear expressions can be fully edited:
- new terms a_i * x_i can be added;
- coefficients of existing terms can be modified;
- existing terms can be removed;
- the constant can be reset.
All the information stored in a ILinearNumExpr object can be queried as well. The constant term is accessed via method getConstant(). The values and variables of the terms a_i * x_i are accessed using enumerator objects of type ILinearNumExpr.Enumerator that can be created using method GetLinearEnumerator().