This is the interface for scalar product expressions for integer variables.

Namespace: ILOG.Concert
Assembly: oplall (in oplall.dll)

Syntax

C#
public interface ILinearIntExpr : IIntExpr, 
	INumExpr, ICopyable

Remarks

Objects of type ILinearIntExpr represent integer linear expressions of the form

sum_{i=1..n} a_i * x_i + c

where x_i are variables of type IIntVar and c and a_i are integer values. Note that the variable types must be known at compile time for use with ILinearIntExpr. The java type of the variables must be IIntVar and cannot be INumVar with variable type NumVarType.Int.

ILinearIntExpr objects are created with the methods:

  • IModeler.LinearIntExpr()
  • 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 an ILinearIntExpr object can be queried. The constant term is accessed through the method getConstant(). The values and variables of the terms a_i * x_i are accessed using enumerator objects of type ILinearIntExpr.Enumerator that can be created using the method GetLinearEnumerator().

See Also