In the next section, we provide a brief tutorial on matrix initialization.

Or, for small matrices you can enter the values as follows.

Now, we show the necessary steps for creation of linear equations and inequalities.

The LinearEquation constructor

LinearEquation(const Matrix& A, const ColumnVector& rhs);

The corresponding constructor is

LinearInequality(const Matrix& A, const ColumnVector& rhs);

To define upper bounds on the constraints, such as

use the following constructor:

LinearInequality(const Matrix& A, const ColumnVector& rhs, const bool rowFlag);

To create lower and upper bounds on the constraints, use

LinearInequality(const Matrix& A, const ColumnVector& lower, const ColumnVector& upper);

OPT++ does not support sparse constraints. Therefore, a bound must be given for each constraint even if only a subset of the constraint have finite bounds. An infinite lower bound is specified by

Similarly, an infinite upper bound is specified by

Next Section: Constructing nonlinear constraints | Back to Main Page

Last revised * July 13, 2006*