Coder Social home page Coder Social logo

Comments (4)

matbesancon avatar matbesancon commented on May 23, 2024 1

Indeed this is maybe a pointless layer. I was thinking about it because the managed tests still required low-level manipulations as:

        # indicator constraint: z = 1 ==> 𝟙^T [x, y] <= 1.
        z = SCIP.add_variable(mscip)
        SCIP.@SC SCIP.SCIPchgVarType(mscip, SCIP.var(mscip, z), SCIP.SCIP_VARTYPE_BINARY, Ref{SCIP.SCIP_Bool}())
        SCIP.@SC SCIP.SCIPchgVarLb(mscip, SCIP.var(mscip, z), 0.0)
        SCIP.@SC SCIP.SCIPchgVarUb(mscip, SCIP.var(mscip, z), 1.0)

from scip.jl.

rschwarz avatar rschwarz commented on May 23, 2024

I kind of agree, in terms of consistency, but there are two special properties for these "variable" constraints (bounds and integral types):

  • they are not considered constraints by SCIP (with their own SCIP_CONS), so they do not need reference counting for memory management (in the scope of ManagedSCIP).
  • there is some not-so-nice setting of implicit bounds of [0, 1] for binary variables, together with storing and resetting older bounds. Would we have to handle this logic twice, at the ManagedSCIP and also at the MOI level?

from scip.jl.

matbesancon avatar matbesancon commented on May 23, 2024

Yes the idea was moving all parts requiring the Clang-generated API to managed, so that the dependency on the generated part is only in there (keeping it consistent with the other constraints).

Yes I saw the bounds, I think this could be handled once at the ManagedSCIP level, and only passed and not stored at MOI level

from scip.jl.

rschwarz avatar rschwarz commented on May 23, 2024

OK, I'm open to that kind of change in this case.

But I wonder whether it makes sense to require a layer between all calls from the MOI interface implementation to the Clang wrapper, in general. For example, a lot of result queries (in #115) are just one-liners.

I also expect power users to make some direct calls to (currently) unwrapped calls. It is already relatively convenient to do so, as SCIP.Optimizer and ManagedSCIP are automatically cconverted to Ptr{SCIP_}.

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.