Last active
June 22, 2024 12:56
-
-
Save bdrum/6cfba8452b5b8eee0718312275cda0bf to your computer and use it in GitHub Desktop.
Completely disable presolve for scip solver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
solver = pyo.SolverFactory("scip") | |
options = {"limits/gap": 0.05} | |
disable_presolve_options = { | |
"presolving/milp/maxrounds" : 0, | |
"presolving/trivial/maxrounds" : 0, | |
"presolving/inttobinary/maxrounds" : 0, | |
"presolving/gateextraction/maxrounds" : 0, | |
"presolving/dualcomp/maxrounds" : 0, | |
"presolving/domcol/maxrounds" : 0, | |
"presolving/implics/maxrounds" : 0, | |
"presolving/sparsify/maxrounds" : 0, | |
"presolving/dualsparsify/maxrounds" : 0, | |
"propagating/dualfix/maxprerounds" : 0, | |
"propagating/genvbounds/maxprerounds" : 0, | |
"propagating/obbt/maxprerounds" : 0, | |
"propagating/nlobbt/maxprerounds" : 0, | |
"propagating/probing/maxprerounds" : 0, | |
"propagating/pseudoobj/maxprerounds" : 0, | |
"propagating/redcost/maxprerounds" : 0, | |
"propagating/rootredcost/maxprerounds" : 0, | |
"propagating/symmetry/maxprerounds" : 0, | |
"propagating/vbounds/maxprerounds" : 0, | |
"constraints/cardinality/maxprerounds" : 0, | |
"constraints/SOS1/maxprerounds" : 0, | |
"constraints/SOS2/maxprerounds" : 0, | |
"constraints/varbound/maxprerounds" : 0, | |
"constraints/knapsack/maxprerounds" : 0, | |
"constraints/setppc/maxprerounds" : 0, | |
"constraints/linking/maxprerounds" : 0, | |
"constraints/or/maxprerounds" : 0, | |
"constraints/and/maxprerounds" : 0, | |
"constraints/xor/maxprerounds" : 0, | |
"constraints/conjunction/maxprerounds" : 0, | |
"constraints/disjunction/maxprerounds" : 0, | |
"constraints/linear/maxprerounds" : 0, | |
"constraints/orbisack/maxprerounds" : 0, | |
"constraints/orbitope/maxprerounds" : 0, | |
"constraints/symresack/maxprerounds" : 0, | |
"constraints/logicor/maxprerounds" : 0, | |
"constraints/bounddisjunction/maxprerounds" : 0, | |
"constraints/cumulative/maxprerounds" : 0, | |
"constraints/nonlinear/maxprerounds" : 0, | |
"constraints/pseudoboolean/maxprerounds" : 0, | |
"constraints/superindicator/maxprerounds" : 0, | |
"constraints/indicator/maxprerounds" : 0, | |
"constraints/components/maxprerounds" : 0, | |
"presolving/maxrestarts" : 0, | |
"presolving/maxrounds" : 0, | |
} | |
options.update(disable_presolve_options) | |
self.results = solver.solve( | |
self, | |
tee=True, | |
keepfiles=False, | |
report_timing=False, | |
options=options, | |
symbolic_solver_labels=True, | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment