Skip to main content

An IF-ELSE statement but involving variable changes

Answered

Comments

2 comments

  • Official comment
    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.
  • Jaromił Najman
    • Gurobi Staff

    I think that the statement

    But considering an interjection,  when \(\delta_{ijm}=1\) and an expression is satisfied, I need to let \(\delta_{ijm}=0, \delta_{ikm}=1, \delta_{kjm}=1\), representing the interjection of k into the queue between i and j

    is incorrect. You are saying that if \(\delta_{ijm}=1\) and some expression, let's say \(ax \leq 0\) is satisfied then it should actually be \(\delta_{ijm}=0\), which is a contradiction to itself because then \(\delta_{ijm}\) should be \(0\) from the beginning.

    If you want to model an actual variable change, then you will have to work with auxiliary variables. You could call them variable duplicates \(\delta, \delta'\) where it holds that \(\delta = \delta'\) unless \(\delta = 1\) and \(ax \leq 0\) holds where it would be \(\delta'=0\).

     

    0

Post is closed for comments.