You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was running a model with the new solver writers ("ipopt_v2") and found a case where the model would solve without the linear presolve but raised an exception about too few degrees of freedom if the presolve was turned on.
Ipopt 3.13.2:******************************************************************************This program contains Ipopt, a library for large-scale nonlinear optimization. Ipopt is released as open source code under the Eclipse Public License (EPL). For more information visit http://projects.coin-or.org/IpoptThis version of Ipopt was compiled from source code available at https://github.com/IDAES/Ipopt as part of the Institute for the Design of Advanced Energy Systems Process Systems Engineering Framework (IDAES PSE Framework) Copyright (c) 2018-2019. See https://github.com/IDAES/idaes-pse.This version of Ipopt was compiled using HSL, a collection of Fortran codes for large-scale scientific computation. All technical papers, sales and publicity material resulting from use of the HSL codes within IPOPT must contain the following acknowledgement: HSL, a collection of Fortran codes for large-scale scientific computation. See http://www.hsl.rl.ac.uk.******************************************************************************This is Ipopt version 3.13.2, running with linear solver ma27.Number of nonzeros in equality constraint Jacobian...: 31Number of nonzeros in inequality constraint Jacobian.: 0Number of nonzeros in Lagrangian Hessian.............: 18Error in an AMPL evaluation. Run with "halt_on_ampl_error yes" to see details.Error evaluating Jacobian of equality constraints at user provided starting point. No scaling factors for equality constraints computed!Exception of type: TOO_FEW_DOF in file "IpIpoptApplication.cpp" at line 926: Exception message: status != TOO_FEW_DEGREES_OF_FREEDOM evaluated false: Too few degrees of freedom (rethrown)!EXIT: Problem has too few degrees of freedom.Traceback (most recent call last): File "C:\next_gen_platform\precipitation_test.py", line 107, in <module> solver.solve(m, tee=True) ~~~~~~~~~~~~^^^^^^^^^^^^^ File "C:\Users\andrew.lee\AppData\Local\miniforge3\envs\workflow_manager\Lib\site-packages\pyomo\contrib\solver\base.py", line 598, in solve results: Results = super().solve(model) ~~~~~~~~~~~~~^^^^^^^ File "C:\Users\andrew.lee\AppData\Local\miniforge3\envs\workflow_manager\Lib\site-packages\pyomo\contrib\solver\ipopt.py", line 447, in solve raise RuntimeError( ...<2 lines>... )RuntimeError: A feasible solution was not found, so no solution can be loaded.Please set opt.config.load_solutions=False to bypass this error.
Information on your system
Pyomo version: Pyomo 6.8.2
Python version: 3.13.1
Operating system: Windows 11
How Pyomo was installed: clone from source
Solver (if applicable): IDAES distribution of IPOPT
The text was updated successfully, but these errors were encountered:
feed_flow["Cl"] is fixed to 0, so this constraint reduces to concentration[Cl] == -solid_flows[KCl]. The presolver does a bit of
bounds tightening here and realizes that since the concentration has a lower bound of 0, this implies an upper bound of 0 for solid_flows[KCl], which allows it to infer that the variable is actually fixed to zero.
Where we get weged is in the complimentariy constraint:
The problem is the NL writer does not perform the simplification and recognize that after presolve that the constraint is constant. It is also confounded by the complementarity constraint using Expressions. So what is getting written out is
This looks like a legitimate constraint over a legitimate defined variable ... until you realize that the defined variable is in fact constant, which makes the constraint trivial - and the constraint should be checked for feasibility and then deactivated and removes from the NL model.
All this is to say, I think I know what is going on -- but not how to fix it (without a whole lot of work re-processing the computed NL expressions, which we may have to do).
Summary
I was running a model with the new solver writers ("ipopt_v2") and found a case where the model would solve without the linear presolve but raised an exception about too few degrees of freedom if the presolve was turned on.
Steps to reproduce the issue
Error Message
Information on your system
Pyomo version: Pyomo 6.8.2
Python version: 3.13.1
Operating system: Windows 11
How Pyomo was installed: clone from source
Solver (if applicable): IDAES distribution of IPOPT
The text was updated successfully, but these errors were encountered: