Export Pre-solved Gurobi Model
回答済みHow do you export the pre-solved Gurobi model in AMPL?
-
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
サインインしてコメントを残してください。
コメント
1件のコメント