Coder Social home page Coder Social logo

Comments (9)

matbesancon avatar matbesancon commented on June 19, 2024 2

Isn't this just that SCIP does not support MOI.ScalarNonlinearFunction yet?

Ah my bad I should add this, I wasn't sure if an additional step was needed to make solvers work with the new JuMP nonlinear

from scip.jl.

matbesancon avatar matbesancon commented on June 19, 2024 1

thanks for letting us know! @odow do you know what could be the culprit here? Is a bridge f(x) == b to b <= f(x) <= b potentially missing?

from scip.jl.

LebedevRI avatar LebedevRI commented on June 19, 2024

Notably, this works in Ipopt (modulo the mixed-integer part).

from scip.jl.

odow avatar odow commented on June 19, 2024

Isn't this just that SCIP does not support MOI.ScalarNonlinearFunction yet?

But also, @LebedevRI is using the wrong syntax for indicator constraints. It must be:

model = Model()
@variable(model, e[i=1:b,j=1:a], Bin)
@constraint(model, [i=1:b,j=1:a], e[i,j] --> {j <= c[i]})

from scip.jl.

LebedevRI avatar LebedevRI commented on June 19, 2024

Isn't this just that SCIP does not support MOI.ScalarNonlinearFunction yet?

FWIW i did indeed have another "snippet" where MOI.ScalarNonlinearFunction support
was the culprit as per stacktrace, but did not manage to reproduce that yet so that i could file an issue.

But also, @LebedevRI is using the wrong syntax for indicator constraints. It must be:

I'm using what is said in the docs:
https://jump.dev/JuMP.jl/stable/manual/constraints/#Indicator-constraints
https://jump.dev/JuMP.jl/stable/tutorials/linear/tips_and_tricks/#Indicator-constraints
... nowhere did i see the --> syntax, although i very much agree that it looks better than =>.

from scip.jl.

odow avatar odow commented on June 19, 2024

I'm using what is said in the docs:

Suggestions for how to make it clearer then? It says:

Indicator constraints consist of a binary variable and a linear constraint.
The constraint holds when the binary variable takes | the value 1. The
constraint may or may not hold when the binary variable takes the
value 0.

I guess we need to add "You cannot use an expression for the left-hand side.

nowhere did i see the --> syntax, although i very much agree that it looks better than =>.

--> and => are the same thing. No difference. I thought I updated the documentation, but perhaps I didn't.

from scip.jl.

LebedevRI avatar LebedevRI commented on June 19, 2024

I'm using what is said in the docs:

Suggestions for how to make it clearer then? It says:

Indicator constraints consist of a binary variable and a linear constraint.
The constraint holds when the binary variable takes | the value 1. The
constraint may or may not hold when the binary variable takes the
value 0.

I guess we need to add "You cannot use an expression for the left-hand side.

nowhere did i see the --> syntax, although i very much agree that it looks better than =>.

--> and => are the same thing. No difference. I thought I updated the documentation, but perhaps I didn't.

Right. I was more talking about the syntax side of question, but clarifying that
the LHS really must be a variable and not an expression could be clarified a bit.
Though, would an automatic rewrite (to introduce the variable) be a bad thing there?

Thank you for looking into this! I think MOI.ScalarNonlinearFunction support would be awesome.

from scip.jl.

LebedevRI avatar LebedevRI commented on June 19, 2024

Just to calibrate expectations, is there any kind of an aspirational timeframe
as to when this kind of functionality might be implemented in this solver?

from scip.jl.

LebedevRI avatar LebedevRI commented on June 19, 2024

So i've tried to take a stab at this, but it is not yet apparent to me how this would look like in SCIP.j
(as compared to the Ipopt.jl implementation). If there are any suggestions on how to approach this,
i could try again, but this really could use someone already familiar with the codebase...

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.