Comments (4)
Thanks for testing this out!
from pyomo.
OK - this is an interesting edge case: you have a model with a non-square subsystem that can be completely presolved out of the model. That is, there is a set of n constraints that act on m (with m>n) variables, and those variables do not appear in any other constraints / objectives. In the original writer (or the new writer with presolve off), those variables and constraints are sent to the solver and the solver will pick (random) values for the m-n degrees of freedom. After presolve, the n constraints are removed from the model - so when the writer collects / categorizes the model variables, none of the m variables are found. This is generally fine - but causes issues when we attempt to find values for the eliminated variables (as the m-n degrees of freedom are not in the var_map
).
What do you think the expected behavior should be?
- leave the variables removed from the model alone (and they will be marked stale)
- arbitrarily pick a value for the DOF and propagate the values through; but which value to pick?
a. pick a value as close to 0 as allowed by the bounds
b. pick the lower (or upper) bound
c. pick the midpoint between the bounds
I think I would start with proposing 2.a.
from pyomo.
I tried out a few different LP solvers, and their own preprocessing techniques tend to pick a bound -- and this is what an active set method without presolve does too. But if you use an interior point method without presolve you get something closer to 2.c. If the free variable(s) don't have any bounds you seem to get 0.
So I agree that 2.a is the best of the options available. It conforms to existing practice while not being onerous to implement and maintain.
from pyomo.
2.a was the consensus when this was discussed at the Pyomo dev call but we also think this case should log a warning about a modeling issue.
from pyomo.
Related Issues (20)
- Pyomo Versions > 6.4.4 result in crashes for several ASL-based MINLP solvers (believed to be related to NL Writer) HOT 8
- REMINDER: Unpin `mpi4py` once fix is released HOT 2
- LP writer dies given a Var with an empty domain
- Sometimes constraints are not satisfied with NL Writer V2 with export_defined_variables=True
- Defer processing ConfigDict's handling of default values until they are needed
- Pyomo can't solve cubic or higher order polynomials with Gurobi 11
- Clean up Experiment List Parmest Code
- Pure Python wheel of Pyomo HOT 1
- Units not consistent when differentiate returns zero HOT 8
- NameError in pyomo when import pertpy HOT 6
- Pyomo.DAE Simulator support for PDAEs HOT 7
- Pyomo hangs when running MAiNGO solver HOT 6
- NL writer linear presolver not detecting infeasibility HOT 1
- Unscaling model after solving using propagate_solution(scaled_model, original_model) throws error HOT 4
- Tests fail: RecursionError: maximum recursion depth exceeded in comparison HOT 1
- Fix "Licensing" link in pyomo.org footer HOT 1
- PyInstaller fails when upgrading from Pyomo 6.7.1->6.7.3
- IndexedSet objects can no longer be used with the within argument in pyomo 6.7.3
- Gurobi interactive shell scripts are deprecated
- SolverFactory failing with 'highs' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyomo.