Skip to main content

An IF-ELSE statement but involving variable changes

Answered

Comments

1 comment

  • 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

Please sign in to leave a comment.