Skip to main content

Multiplication Decision Variables

Answered

Comments

3 comments

  • Ronald van der Velden
    Gurobi Staff Gurobi Staff

    Hi Carlos,

    What if you would introduce a variable to represent the magnitude of the reset \(r_t\) ; then you constraint becomes \(p_t=p_{t-1} + w_t * C - r_t\).

    You could then add indicator constraints enforcing

    • \(r_t=0\) when \(x_t=0\)
    • \(p_t=0\) when \(x_t=1\)

    Kind regards,
    Ronald

    0
  • Ronald van der Velden
    Gurobi Staff Gurobi Staff

    In fact, you can simplify further and not introduce \(r_t\) at all. Just use two indicator constraints to ensure

    • \(p_t=p_{t-1}+w_t \cdot C\) when \(x_t=0\)
    • \(p_t=0\) when \(x_t=1\)
    1
  • Carlos Davalos
    First Comment
    First Question

    Thanks Ronald! Worked for me :)

    0

Please sign in to leave a comment.