Terminate extensive form with --solver-options="mipgap or TimeLimit"

87 views
Skip to first unread message

Abodh Poudyal

unread,
Apr 13, 2022, 2:00:44 AM4/13/22
to Pyomo Forum
Hello,

I want to terminate the extensive form in PySP after a certain value or gap is reached. I want to get the solution for that particular threshold.

This is what I wrote:

runef -m Reference_Model.py --solver=gurobi --solve --solution-writer=pyomo.pysp.plugins.csvsolutionwriter --solver-options="mipgap=0.0003 TimeLimit=300"

However, I get the following error message:
  File "...\ef_writer_script.py", line 513, in solve

raise RuntimeError(msg)
RuntimeError: EF solve failed solution status check:
Solver Status: aborted
Termination Condition: maxTimeLimit
Solution Status: stoppedByLimit


This works for runph as I can successfully get the CSV file after the simulation terminates. However, I am not able to generate the solution file "ef.csv" using --solver-options due to the error above. 

In my problem, the extensive form is kind of stuck at 0.09% gap for over 9 hours and I want to access the solution at this point.

I would really appreciate any help with this. Thank you.

Regards,
Abodh

Abodh Poudyal

unread,
Apr 13, 2022, 2:09:09 AM4/13/22
to Pyomo Forum
I figured I can just comment out raise RuntimeError(msg) part on the  "ef_writer_script.py" file. Looks like I was not paying attention to the error message. Anyway, I would really appreciate it if anyone has some other ideas here.

Abodh 

David Woodruff

unread,
Apr 13, 2022, 12:44:52 PM4/13/22
to pyomo...@googlegroups.com
I think the only thing you can do is set the mipgap to 0.001 (since 0.09% is 0.0009). I realize that is not really want you want.

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyomo-forum/64891fdd-b841-4adf-bca2-ea567f110911n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages