e04mwf writes data for
Linear Programming (LP)
or
Quadratic Programming (QP)
problems (or their mixed integer variants) from an optimization problem to a MPS output file, see
Section 3.1 in
e04mxf for the format description. The problem is expected in the form
Where
is the number of variables,
is the number of general linear constraints,
is the linear constraint matrix with dimension
, the vectors
and
are the lower and upper bounds, respectively.
is the Hessian matrix with dimension
, however, only leading
ncolh columns might contain nonzero elements and the rest is assumed to be zero.
Note that the linear term of the objective function
might be supplied either as
c or via
iobj. If
c is supplied then
idxc contains the indices of the nonzero elements of sparse vector
, whereas if
iobj is supplied (
), row
iobj of matrix
is a free row storing the nonzero elements of
.
Note: that this routine uses fixed MPS format, see
IBM (1971).
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
-
On entry, , and , if the bounds must be infinite.
Constraints: , .
On entry, , and , the integer variable requires at least one bound finite.
Constraint: at least one of the following conditions must be met for integer variable j: , .
On entry, , and are incorrect.
Constraint: .
On entry, and , is incorrect.
Constraint: .
On entry, and , is incorrect.
Constraint: .
Not applicable.
None.
This example shows how to store an optimization problem to a file in MPS format after it has been solved by
e04nqf. The problem is a minimization of the quadratic function
, where
subject to the bounds
and to the linear constraints
The initial point, which is infeasible, is
The optimal solution (to five figures) is
The generated file is called e04mwfe.mps.