Coder Social home page Coder Social logo

Comments (6)

rschwarz avatar rschwarz commented on June 4, 2024

Yes, I think it is overly conservative (or just simplified), although I also remember using more detailed assert_stage in other places.

Ideally, we could even extract the accepted stages from the C documentation in the comments, but I guess doing it manually is good enough for the dozen methods that are currently called.

Also, your example points to a nice test case that we could add!

In addition to checking the stage, it might also be wise to check whether a solution was found at all. I guess that C_NULL would be returned in that case, but the MOI.get should error, rather than return -1e20 or similar.

from scip.jl.

bhalonen avatar bhalonen commented on June 4, 2024

any progress/plans on this?

from scip.jl.

rschwarz avatar rschwarz commented on June 4, 2024

Yes, I actually relaxed the assertion already on two commits that are part of #109 which I hope to merge soon.

But both of these changes were done by the explicit need to call specific functions in specific stages, so there is no claim and full generality.

An alternative approach would be not check the stage at the SCIP.jl level, and instead try to handle SCIP's error better, as alluded in #78. Actually, this would be great, because it would always be up-to-date, automatically, without any code duplication.

from scip.jl.

bhalonen avatar bhalonen commented on June 4, 2024

This issue closed? Or can further guidance be given?

from scip.jl.

rschwarz avatar rschwarz commented on June 4, 2024

Well, the original use case (getting a solution when SCIP was interrupted by a user limit) is now handled by assert_solved, so yes.

But there are more stages where this could be valid, which are not covered. I'm not aware of all potential possibilities, though, so I would add either handle them when the need arises, or in some automatic fashion.

@bhalonen, do you have a use case example where an error is thrown because of overly strict assertions?

from scip.jl.

rschwarz avatar rschwarz commented on June 4, 2024

I will close this, until we find another case that is not handled by the current list of accpeted stages.

from scip.jl.

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.