Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting 'fixed_variable_treatment' IPOPT option not working with SolverFactory #206

Closed
qtothec opened this issue Aug 23, 2017 · 3 comments
Closed

Comments

@qtothec
Copy link
Contributor

qtothec commented Aug 23, 2017

This is from StackOverflow: https://stackoverflow.com/questions/45807745/setting-ipopt-options-through-pyomo/45840729#45840729

I reproduced the issue running IPOPT 3.12.8 and a branch up to date with master.

This does not work:

from pyomo.environ import *
m = ConcreteModel()
m.x = Var()
m.c = Constraint(expr=m.x >= 2)
m.o = Objective(expr=m.x)
s = SolverFactory('ipopt')
s.options['fixed_variable_treatment'] = 'make_parameter'
s.solve(m, tee=True)

Error is:

ERROR: "[base]\site-packages\pyomo\opt\base\solvers.py", 599, solve
        Solver (asl) returned non-zero return code (1)
ERROR: "[base]\site-packages\pyomo\opt\base\solvers.py", 604, solve
        Solver log:
        Unknown keyword "fixed_variable_treatment"

It does not appear to be directly due to IPOPT, because using the ipopt.opt file strategy from https://www.coin-or.org/Ipopt/documentation/node35.html works.

@ghackebeil
Copy link
Member

ghackebeil commented Aug 23, 2017 via email

@ghackebeil
Copy link
Member

@qtothec: Can this ticket be closed? I believe using the "OF_" prefix with your option provides the functionality that you need.

@qtothec
Copy link
Contributor Author

qtothec commented Mar 1, 2018

Yeah, I think it was mainly driven by someone else's StackOverflow question, so if they still have trouble with it, they can open a new ticket.

@qtothec qtothec closed this as completed Mar 1, 2018
pyomo.solvers Priorities automation moved this from To do to Done Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

3 participants