メインコンテンツへスキップ

Multiplication Decision Variables

回答済み

コメント

4件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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.
  • Ronald van der Velden
    • 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

    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
    • Gurobi-versary
    • First Comment
    • First Question

    Thanks Ronald! Worked for me :)

    0

投稿コメントは受け付けていません。