switch-model / switch

A Modern Platform for Planning High-Renewable Power Systems
http://switch-model.org/
Other
130 stars 85 forks source link

Solve.py MIPgap definition #140

Open emtrivino opened 2 years ago

emtrivino commented 2 years ago

Solve.py defines solver_options_string to add the maximum number of iterations, MIPgap and others (screenshot of the lines). What is the format in which I have to write for example: solver_options_string mipgap=0.001? I have tried many ways but it doesn't work for me.

Thank you very much.

mfripp commented 2 years ago

Hi Eduards,

The solver_options_string is tricky because it often needs spaces between the flags to send to the solver. So you would usually put quotes around all the solver arguments to pass them as a single argument to Switch, like this:

--solver-options-string="mipgap=0.01 mipemphasis=0 mipbasis=1 nodefile=3 display=1 mipdisplay=2 threads=1 iisfind=1"

Not sure how my email will break that up, but --solver-options-string and the quoted string should all be on the same line, either in options.txt or on the command line.

Matthias

On Jul 3, 2022, at 12:48 PM, emtrivino @.***> wrote:  Solve.py defines solver_options_string to add the maximum number of iterations, MIPgap and others (screenshot of the lines). What is the format in which I have to write for example: solver_options_string mipgap=0.001? I have tried many ways but it doesn't work for me.

Thank you very much.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.