Skip to main content

"Variable not in model" for Bilinear.java example

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Alexander Hoffman
    • Gurobi-versary
    • First Comment
    • First Question

    I am now getting a very similar error in the Diet.java example on the line

    model.addConstr(ntot, GRB.EQUAL, nutrition[i], Categories[i]);
    0
  • Alexander Hoffman
    • Gurobi-versary
    • First Comment
    • First Question

    I have realized that in some old code from a colleague in the same repository there is a Gurobi 5.6 jar that is being included instead of my 9.5 jar. This is most likely the root of the problem and I will close this post if the problem is gone once I resolve the build configs.

    0
  • Alexander Hoffman
    • Gurobi-versary
    • First Comment
    • First Question

    Resolved

    0

Post is closed for comments.