Skip to main content

Forming a model inside a function

Answered

Comments

3 comments

  • Riley Clement
    • Gurobi Staff

    Hi Iason,

    I think we'll need to see some code... both the function where you create the model, and where you call it.

    - Riley

    0
  • Iason Liagkas
    • Gurobi-versary
    • Detective
    • Thought Leader

    Hi Riley I found out my bug. Instead of writing SPmodel.optimize() I should write a subproblem.optimize() since the SPmodel is lying inside the function, while the subproblem is the variable that the function passes the model. Sorry for the confusion.

    Kind regards 
    Iason

    0
  • Riley Clement
    • Gurobi Staff

    No problem, well done on spotting it.

    - Riley

    0

Please sign in to leave a comment.