Gurobi: Save Model After Presolve For Reuse
I'm looking for a way to save a presolved model in gurobi, so that I can save the time necessary for presolving the next time I'm running the model. I have tried to write the model
Solution 1:
It is very uncommon to save the presolved model. The key exceptions are:
- When you want to understand the presolve transformations
- For benchmarking when you don't want to repeat presolve
Gurobi lets you access the presolved model, but only from the Python API. Here is some sample code:
from gurobipy import *
m = read("mymodel.mps")
mp = m.presolve()
mp.write("mypresolved.lp")
Post a Comment for "Gurobi: Save Model After Presolve For Reuse"