Closed 4er4er4er closed 1 year ago
Task 2: added option writesol
for solution/basis/IIS etc. Note that writeprob
existed as synonym for tech:exportfile
(which is now tech:writemodel
.) All file writing options in Gurobi are now:
tech:writegraph (writegraph, exportgraph)
File to export conversion graph. Format: JSON Lines.
tech:writemodel (writeprob, writemodel)
Specifies the name of a file where to export the model before solving
it. This file name can have extension ".lp[.7zip]", ".mps", etc. Default
= "" (don't export the model).
tech:writemodelonly (justwriteprob, justwritemodel)
Specifies the name of a file where to export the model, do not solve it.
This file name can have extension ".dlp", ".mps", etc. Default = ""
(don't export the model).
tech:writepresolved (writepresolved, writepresolvedmodel, exportpresolvedfile)
Specifies the name of a file where to export the presolved model before
solving it. This file name can have extension ".lp", ".mps", etc.
Default = "" (don't export the model).
tech:writesolution (writesol, writesolution)
Specifies the name of a file where to export the solution or other
result file. This file name can have extension ".sol[.tar.gz]", ".json",
".bas", ".ilp", etc. Default = "" (don't export results).
Task 3 was solved in #209.
For compatibility with ASL, allow ".sol", ".mst", ".bas" etc with the writeprob
option. Their writing is delayed to after solving. However this is not documented.
Moreover now allowing repeated use of writeprob
and writesol
; tech:exportfile
restored as synonym. Current docu:
tech:writemodel (writeprob, writemodel, tech:exportfile)
Specifies files where to export the model before solving (repeat the
option for several files.) File name extensions can be ".lp[.7z]",
".mps", etc.
tech:writemodelonly (justwriteprob, justwritemodel)
Specifies files where to export the model, no solving (option can be
repeated.) File extensions can be ".dlp", ".mps", etc.
tech:writepresolved (writepresolved, writepresolvedmodel, exportpresolvedfile)
Specifies the name of a file where to export the presolved model before
solving it. This file name can have extension ".lp", ".mps", etc.
Default = "" (don't export the model).
tech:writesolution (writesol, writesolution)
Specifies the names of files where to export the solution and/or other
result files in solver's native formats. Option can be repeated. File
name extensions can be ".sol[.tar.gz]", ".json", ".bas", ".ilp", etc.
To be released next week, unless any remarks.
Released, also works in Highs and Xpress.
Several cases of the Gurobi
writeprob
option are handled incorrectly by the MP interface. The following examples also show the ASL results, which are as intended.ampl: option solver gurobiasl; ampl: solve; Gurobi 10.0.1: writeprob="..\multmip3.lp" Gurobi 10.0.1: optimal solution; objective 235625 282 simplex iterations 32 branch-and-cut nodes plus 34 simplex iterations for intbasis
ampl: option solver gurobi; ampl: solve; Gurobi 10.0.1: tech:exportfile=..\multmip3.lp" Unknown file type for file '..\multmip3.lp"' ampl:
ampl: option gurobi_options 'writeprob=..\multmip3.sol';
ampl: option solver gurobiasl; ampl: solve; Gurobi 10.0.1: writeprob=..\multmip3.sol Gurobi 10.0.1: optimal solution; objective 235625 282 simplex iterations 32 branch-and-cut nodes plus 34 simplex iterations for intbasis
ampl: option solver gurobi; ampl: solve; Gurobi 10.0.1: tech:exportfile=..\multmip3.sol Unable to retrieve attribute 'X' ampl:
ampl: option gurobi_options 'writeprob=..\multmip3.lp';
ampl: option solver gurobiasl; ampl: option gurobiasl_auxfiles rc; ampl: solve; Gurobi 10.0.1: writeprob=..\multmip3asl.lp Gurobi 10.0.1: optimal solution; objective 235625 282 simplex iterations 32 branch-and-cut nodes plus 34 simplex iterations for intbasis
ampl: option solver gurobi; ampl: option gurobi_auxfiles rc; ampl: solve; Gurobi 10.0.1: tech:exportfile=..\multmip3.lp Gurobi 10.0.1: optimal solution; objective 235625 108 simplex iterations 1 branching nodes ampl:
Supply['PITT','plate']: Trans['PITT','FRA','plate']
R0: Use['GARY','FRA'] + Use['GARY','DET'] + Use['GARY','LAN']