Closed mlangiu closed 3 years ago
I'll have to think about how to fix this for both runph and runef. The fundamental issue is that the "solver" object that gets created claims it is going to use the LP-file interface to Cplex, but the neos "solver_manager" tells the solver to use a different interface.
In the meantime, to get around the "warmstart" error for runef, add the option --disable-warmstart. Unfortunately, I can't give you a short term workaround for runph
Thanks for the quick reply!
Disabling warmstart was already helpful, as the runef
command actually solves the extensive form of the stochastic problem instead of the problem for average-case random variables (as I understood at first), so at least for me this is sufficient for the moment.
i think this bug was fixed for the runef case in the new pysp release, as this issue does not occur in my case, when using runef.
However, the problem still persists for the runph command, and the option --disable-warmstart does not help there. I have also tried to use different solvers such as cbc, cplex and gurobi. It seems like this problem only rises when dealing with MILP solvers, as i manage to get runph running on ipopt, but of course that returns a result which is not satisfactory, since integer variables are relaxed.
Has anyone come up with a solution for runph?
I am stuck, cause my problem takes ages to be solved through runef, also by increasing the mipgap.
Thank you
UPDATE: the script rising the exception is : https://github.com/Pyomo/pyomo/blob/master/pyomo/core/kernel/component_map.py on line 98, if this is of any help
Hello, @mlangiu. PySP has recently moved into its own repository in the Pyomo organization. If this is still a concern, please make an issue in the PySP repository for further support. For other help or use questions with Pyomo, we refer you to review our documentation for ways to get help.
I am trying to solve some test cases with the pysp module but encountered difficulties with the
runef
andrunph
commands: When attempting to solve the expected value problem of the farmer example, appending the option--solver-manager=neos
to the commandas as indicated in theREADME.txt
, i.e.:has the desired effect: The problem is dispatched to the NEOS server and reports an optimal value of -118600 upon completion.
Solving the stochastic problem on the other hand, i.e. issuing:
fails with the exception
From what is said on page 177 of the second edition of "Pyomo - Optimization Modeling in Python" (2017) I understand that the
runef
command:should have the same effect as the
pyomo
command above (at least in pyomo version 5.1 for which the book was written, I am using version 5.3), however I also get an exception, this time:From the fact that the
runef
command does not appear in theREADME.txt
I am guessing that its direct usage has been deprecated in favor of thepyomo
command. If that is the case, is there a similar syntax for therunph
command that allows usage of NEOS?