Skip to main content

Dependent variables

Answered

Comments

2 comments

  • Maliheh Aramon
    • Gurobi Staff

    Hi Sander, 

    • You need to define both \(X\) and \(S\) as decision variables using the Model.addVars() method.
    • You can then enforce the relationship between \(X\) and \(S\) variables by adding the constraints \(S_{t+1} = S_t - X_t\) using the Model.addConstrs() method.

    Best regards,

    Maliheh

    0
  • Sander Mertens
    • Gurobi-versary
    • Curious
    • Conversationalist

    Thank you!

    0

Please sign in to leave a comment.