Initializing help system before first use

Logical OR

d = max {d1, d2} for two binary variables d1, d2, or
d = d1 OR d2 as a logical expression

  • IP formulation

    d ≥ d1 [1.1]
    d ≥ d2 [1.2]
    d ≤ d1 + d2 [2]
    d ≤ 1 [3]

  • Generalization to d = max {d1, d2 , ..., dn}

    d ≥ di [1.i]
    d ≤ ∑i di [2.i]
    d ≤ 1 [3]

    Note: equivalent to d = d1 OR d2 ... OR dn
  • See Section Boolean variables for an alternative formulation via Boolean variables