Skip to main content
added 72 characters in body
Source Link
RobPratt
  • 34.3k
  • 2
  • 47
  • 90

Introduce binary decision variables $y_{ij}$ to indicate that job $i$ immediately precedes job $j$, and impose indicator constraints $$y_{ij} = 1 \implies S_j = S_i + p_i,$$ which you can alternatively linearize via big-M constraints $$-M(1-y_{ij}) \le S_j - (S_i + p_i) \le M(1-y_{ij}).$$ To avoid the solver returning $y \equiv 0$, introduce a dummy ending job $N+1$, and impose $$\sum_{j=1}^{N+1} y_{ij} = 1$$ for $i<N+1$ (that is, for all $i$ except the dummy). You don't need variables $y_{N+1,j}$ because no job follows the dummy.

Introduce binary decision variables $y_{ij}$ to indicate that job $i$ immediately precedes job $j$, and impose indicator constraints $$y_{ij} = 1 \implies S_j = S_i + p_i,$$ which you can alternatively linearize via big-M constraints $$-M(1-y_{ij}) \le S_j - (S_i + p_i) \le M(1-y_{ij}).$$ To avoid the solver returning $y \equiv 0$, introduce a dummy ending job $N+1$, and impose $$\sum_{j=1}^{N+1} y_{ij} = 1$$ for $i<N+1$ (that is, for all $i$ except the dummy).

Introduce binary decision variables $y_{ij}$ to indicate that job $i$ immediately precedes job $j$, and impose indicator constraints $$y_{ij} = 1 \implies S_j = S_i + p_i,$$ which you can alternatively linearize via big-M constraints $$-M(1-y_{ij}) \le S_j - (S_i + p_i) \le M(1-y_{ij}).$$ To avoid the solver returning $y \equiv 0$, introduce a dummy ending job $N+1$, and impose $$\sum_{j=1}^{N+1} y_{ij} = 1$$ for $i<N+1$ (that is, for all $i$ except the dummy). You don't need variables $y_{N+1,j}$ because no job follows the dummy.

added 40 characters in body
Source Link
RobPratt
  • 34.3k
  • 2
  • 47
  • 90

Introduce binary decision variables $y_{ij}$ to indicate that job $i$ immediately precedes job $j$, and impose indicator constraints $$y_{ij} = 1 \implies S_j = S_i + p_i,$$ which you can alternatively linearize via big-M constraints $$-M(1-y_{ij}) \le S_j - (S_i + p_i) \le M(1-y_{ij}).$$ To avoid the solver returning $y \equiv 0$, introduce a dummy ending job $N+1$, and impose $$\sum_j y_{ij} = 1$$$$\sum_{j=1}^{N+1} y_{ij} = 1$$ for $i<N+1$ (that is, for all $i$ except the dummy).

Introduce binary decision variables $y_{ij}$ to indicate that job $i$ immediately precedes job $j$, and impose indicator constraints $$y_{ij} = 1 \implies S_j = S_i + p_i,$$ which you can alternatively linearize via big-M constraints $$-M(1-y_{ij}) \le S_j - (S_i + p_i) \le M(1-y_{ij}).$$ To avoid the solver returning $y \equiv 0$, introduce a dummy ending job and impose $$\sum_j y_{ij} = 1$$ for all $i$ except the dummy.

Introduce binary decision variables $y_{ij}$ to indicate that job $i$ immediately precedes job $j$, and impose indicator constraints $$y_{ij} = 1 \implies S_j = S_i + p_i,$$ which you can alternatively linearize via big-M constraints $$-M(1-y_{ij}) \le S_j - (S_i + p_i) \le M(1-y_{ij}).$$ To avoid the solver returning $y \equiv 0$, introduce a dummy ending job $N+1$, and impose $$\sum_{j=1}^{N+1} y_{ij} = 1$$ for $i<N+1$ (that is, for all $i$ except the dummy).

added 139 characters in body
Source Link
RobPratt
  • 34.3k
  • 2
  • 47
  • 90

Introduce binary decision variables $y_{ij}$ to indicate that job $i$ immediately precedes job $j$, and impose indicator constraints $$y_{ij} = 1 \implies S_j = S_i + p_i,$$ which you can alternatively linearize via big-M constraints $$-M(1-y_{ij}) \le S_j - (S_i + p_i) \le M(1-y_{ij}).$$ To avoid the solver returning $y \equiv 0$, introduce a dummy ending job and impose $$\sum_j y_{ij} = 1$$ for all $i$ except the dummy.

Introduce binary decision variables $y_{ij}$ to indicate that job $i$ immediately precedes job $j$, and impose indicator constraints $$y_{ij} = 1 \implies S_j = S_i + p_i,$$ which you can alternatively linearize via big-M constraints $$-M(1-y_{ij}) \le S_j - (S_i + p_i) \le M(1-y_{ij}).$$

Introduce binary decision variables $y_{ij}$ to indicate that job $i$ immediately precedes job $j$, and impose indicator constraints $$y_{ij} = 1 \implies S_j = S_i + p_i,$$ which you can alternatively linearize via big-M constraints $$-M(1-y_{ij}) \le S_j - (S_i + p_i) \le M(1-y_{ij}).$$ To avoid the solver returning $y \equiv 0$, introduce a dummy ending job and impose $$\sum_j y_{ij} = 1$$ for all $i$ except the dummy.

Source Link
RobPratt
  • 34.3k
  • 2
  • 47
  • 90
Loading