GithubHelp home page GithubHelp logo

Comments (3)

ambros-gleixner avatar ambros-gleixner commented on August 21, 2024

I am not sure about your error above, but one specialities of SCIP is that its models are based on general, potentially nonlinear constraints. So a SCIP model cannot be generated column/matrix-wise.

(Of course, one could create or use a wrapper that provides such functionality and translates columns to SCIP constraints, but JSCIPOpt does not have that functionality.)

from jscipopt.

kkofler avatar kkofler commented on August 21, 2024

For linear problems, you need to rearrange them into standard form, so that you have one coefficient vector for the objective, one coefficient matrix for the constraints, and one right-hand-side vector for the constraints.

Using a for loop is a reasonable approach, but your variable name syntax is wrong. The variable name is a string, so if you write [j] into it, it will just be passed to SCIP as is. And then SCIP complains about the invalid characters, but even without those, the variables would all have the same name. Try something line "realcar_" + j or "realcar" + j instead of "realcar[j]".

JSCIP cannot magically change the semantics of the Java language.

from jscipopt.

kkofler avatar kkofler commented on August 21, 2024

Oh, and of course Variable realcar[j] = … is also invalid Java, you need to allocate a Variable[] before the loop and then just use realcar[j] = …. That, too, is basic Java and not a JSCIP issue.

from jscipopt.

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.