Giter Club home page Giter Club logo

Comments (4)

michaelbynum avatar michaelbynum commented on June 10, 2024

Thanks for testing this out!

from pyomo.

jsiirola avatar jsiirola commented on June 10, 2024

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?

  1. leave the variables removed from the model alone (and they will be marked stale)
  2. 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.

bknueven avatar bknueven commented on June 10, 2024

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.

blnicho avatar blnicho commented on June 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.