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
|
LP format, minimization
(default)
|
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 .mat 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 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.
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.