Purpose
Export a
problem to a file.
Synopsis
procedure exportprob(options:integer, filename:string, obj:linctr)
procedure exportprob(options:integer, filename:string)
procedure exportprob(filename:string, obj:linctr)
procedure exportprob(filename:string)
procedure exportprob
Arguments
options
|
File format options:
EP_MIN
|
|
EP_MAX
|
|
EP_MPS
|
|
EP_STRIP
|
|
Several options may be combined using
+.
|
filename
|
Name of the output file. If the empty string
"" is given, output is printed to the standard output (the screen)
|
obj
|
Objective function constraint
|
Example
The following prints the current problem to the screen using the default format and with
MinCost as objective function. The second statement exports the problem in LP-format and with scrambled names to the file
prob1.lp maximizing the constraint
Profit:
declarations
MinCost, Profit:linctr
end-declarations
exportprob(0, "", MinCost)
exportprob(EP_MAX+EP_STRIP, "prob1", Profit)
Further information
1. If the given filename uses the default IO driver (no driver specified) and has no extension, Mosel appends
.lp to it for LP format files and
.mps for MPS format.
2. Normally, local symbols (
i.e. defined in a procedure or function) are replaced by generated names in the exported matrix. However, if the model has been compiled with option
-G, names defined locally to the routine calling
exportprob are used in the exported matrix. Moreover, if a local symbol hides a global one, this symbol is prefixed by '∼'.
3. If the model is compiled with
-G and the control parameter
recloc is set to
true (see
setparam), missing constraint names are replaced by the source location of the constraint definition (
i.e. a combination of the row number, source file name and line number in the file).
4. If no option is provided, the default format is LP for a minimization; if no constraint is given, the current objective (if available) is exported. The matrix is printed to the standard output when this function is used without parameter.
5. This function exports only the LP/MIP problem directly handled by the Mosel core libraries. It cannot report problem extensions managed by external modules. For instance, quadratic constraints or indicator constraints provided by the Xpress Optimizer are not shown by this routine: for this type of problems, the module-specific
writeprob routine has to be used instead of
exportprob.
Related topics
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the
property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not
convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except
solely for internal evaluation purposes to determine whether to purchase a license to the software
described in this documentation, or as otherwise set forth in a written software license agreement
between you and FICO (or a FICO affiliate). Use of this documentation and the software described in
it must conform strictly to the foregoing permitted uses, and no other use is permitted.