Export Pre-solved Gurobi Model
AnsweredHow do you export the pre-solved Gurobi model in AMPL?
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
When Gurobi 10.0 for AMPL is released (very soon now) there will be an option writepresolvedprob that works the same as the current option writeprob except that it writes -- to the specified file -- the problem as it appears after Gurobi's presolve routines have been applied. For example, adding writepresolvedprob=pre.mps to your gurobi_options string would write Gurobi's presolved problem as an MPS format file, and adding writepresolvedprob=pre.lp would write Gurobi's presolved problem as an LP format file. (AMPL also does some presolving even before the problem is sent to Gurobi, though you can turn that off with option presolve 0.)
The main use I can see for this feature is to compare the problem before and after Gurobi's presolve, to get an idea of how presolve is changing the problem. Gurobi's naming of the variables is the same in both versions. Currently it is not possible to request that the AMPL variable names be used instead in the MPS or LP file, but that is a feature that we are looking to add.
1
Post is closed for comments.
Comments
2 comments