Skip to main content
added 33 characters in body
Source Link

You want to enforce $h_i > 0 \implies h_{i-1} = 8$. You can do so by introducing binary variables $x_i$ and the following constraints: \begin{align} h_i > 0 &\implies x_i = 1 \\ x_i = 1 &\implies h_{i-1} = 8 \end{align} which you can linearize as: \begin{align} h_i &\le 8 x_i \\ 8 - h_{i-1} &\le 8(1-x_i) \end{align} More compactly: $$8 x_{i+1} \le h_i \le 8 x_i$$

TotalThe exact total workload should be distributed in different days : $\sum_i h_i =20$

$$\sum_i h_i =20$$

You want to enforce $h_i > 0 \implies h_{i-1} = 8$. You can do so by introducing binary variables $x_i$ and the following constraints: \begin{align} h_i > 0 &\implies x_i = 1 \\ x_i = 1 &\implies h_{i-1} = 8 \end{align} which you can linearize as: \begin{align} h_i &\le 8 x_i \\ 8 - h_{i-1} &\le 8(1-x_i) \end{align} More compactly: $$8 x_{i+1} \le h_i \le 8 x_i$$

Total workload should be distributed : $\sum_i h_i =20$

You want to enforce $h_i > 0 \implies h_{i-1} = 8$. You can do so by introducing binary variables $x_i$ and the following constraints: \begin{align} h_i > 0 &\implies x_i = 1 \\ x_i = 1 &\implies h_{i-1} = 8 \end{align} which you can linearize as: \begin{align} h_i &\le 8 x_i \\ 8 - h_{i-1} &\le 8(1-x_i) \end{align} More compactly: $$8 x_{i+1} \le h_i \le 8 x_i$$

The exact total workload should be distributed in different days :

$$\sum_i h_i =20$$

added 21 characters in body
Source Link

You want to enforce $h_i > 0 \implies h_{i-1} = 8$. You can do so by introducing binary variables $x_i$ and the following constraints: \begin{align} h_i > 0 &\implies x_i = 1 \\ x_i = 1 &\implies h_{i-1} = 8 \end{align} which you can linearize as: \begin{align} h_i &\le 8 x_i \\ 8 - h_{i-1} &\le 8(1-x_i) \end{align} More compactly: $$8 x_{i+1} \le h_i \le 8 x_i$$

Total workload should be distributed : $\sum_i h_i =20$

You want to enforce $h_i > 0 \implies h_{i-1} = 8$. You can do so by introducing binary variables $x_i$ and the following constraints: \begin{align} h_i > 0 &\implies x_i = 1 \\ x_i = 1 &\implies h_{i-1} = 8 \end{align} which you can linearize as: \begin{align} h_i &\le 8 x_i \\ 8 - h_{i-1} &\le 8(1-x_i) \end{align} More compactly: $$8 x_{i+1} \le h_i \le 8 x_i$$

You want to enforce $h_i > 0 \implies h_{i-1} = 8$. You can do so by introducing binary variables $x_i$ and the following constraints: \begin{align} h_i > 0 &\implies x_i = 1 \\ x_i = 1 &\implies h_{i-1} = 8 \end{align} which you can linearize as: \begin{align} h_i &\le 8 x_i \\ 8 - h_{i-1} &\le 8(1-x_i) \end{align} More compactly: $$8 x_{i+1} \le h_i \le 8 x_i$$

Total workload should be distributed : $\sum_i h_i =20$

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

You want to enforce $h_i > 0 \implies h_{i-1} = 8$. You can do so by introducing binary variables $x_i$ and the following constraints: \begin{align} h_i > 0 &\implies x_i = 1 \\ x_i = 1 &\implies h_{i-1} = 8 \end{align} which you can linearize as: \begin{align} h_i &\le 8 x_i \\ 8 - h_{i-1} &\le 8(1-x_i) \end{align} More compactly: $$8 x_{i+1} \le h_i \le 8 x_i$$

You want to enforce $h_i > 0 \implies h_{i-1} = 8$. You can do so by introducing binary variables $x_i$ and the following constraints: \begin{align} h_i > 0 &\implies x_i = 1 \\ x_i = 1 &\implies h_{i-1} = 8 \end{align} which you can linearize as: \begin{align} h_i &\le 8 x_i \\ 8 - h_{i-1} &\le 8(1-x_i) \end{align}

You want to enforce $h_i > 0 \implies h_{i-1} = 8$. You can do so by introducing binary variables $x_i$ and the following constraints: \begin{align} h_i > 0 &\implies x_i = 1 \\ x_i = 1 &\implies h_{i-1} = 8 \end{align} which you can linearize as: \begin{align} h_i &\le 8 x_i \\ 8 - h_{i-1} &\le 8(1-x_i) \end{align} More compactly: $$8 x_{i+1} \le h_i \le 8 x_i$$

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