Skip to main content

C++: Error code 10003 of getVar(int) to call variable

Answered

Comments

3 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 why not try our AI Gurobot?.
  • Jaromił Najman
    • Gurobi Staff

    Hi,

    This behavior is caused by Gurobi's lazy updates. You have to call the update function before trying to access any of the optimization objects. The optimize function automatically performs an update. You can find more information in the documentation of the UpdateMode.

    Best regards,
    Jaromił

    1
  • CHA HWAN SONG
    • Gurobi-versary
    • First Question
    • First Comment

    Thanks a lot for your prompt answer!! 

    Sincerely,

    Mason

    0

Post is closed for comments.