A calculadora resolverá o problema de otimização fornecido usando o algoritmo simplex. Ela adicionará variáveis de folga, excedentes e artificiais, se necessário. No caso de variáveis artificiais, o método Big M ou o método de duas fases é usado para determinar a solução inicial. As etapas estão disponíveis.
Solução O problema na forma canônica pode ser escrito da seguinte forma:
Z = 3 x 1 + 4 x 2 → m a x Z = 3 x_{1} + 4 x_{2} \to max Z = 3 x 1 + 4 x 2 → ma x { x 1 + 2 x 2 ≤ 8 x 1 + x 2 ≤ 6 x 1 , x 2 ≥ 0 \begin{cases} x_{1} + 2 x_{2} \leq 8 \\ x_{1} + x_{2} \leq 6 \\ x_{1}, x_{2} \geq 0 \end{cases} ⎩ ⎨ ⎧ x 1 + 2 x 2 ≤ 8 x 1 + x 2 ≤ 6 x 1 , x 2 ≥ 0 Adicione variáveis (folga ou excedente) para transformar todas as desigualdades em igualdades:
Z = 3 x 1 + 4 x 2 → m a x Z = 3 x_{1} + 4 x_{2} \to max Z = 3 x 1 + 4 x 2 → ma x { x 1 + 2 x 2 + S 1 = 8 x 1 + x 2 + S 2 = 6 x 1 , x 2 , S 1 , S 2 ≥ 0 \begin{cases} x_{1} + 2 x_{2} + S_{1} = 8 \\ x_{1} + x_{2} + S_{2} = 6 \\ x_{1}, x_{2}, S_{1}, S_{2} \geq 0 \end{cases} ⎩ ⎨ ⎧ x 1 + 2 x 2 + S 1 = 8 x 1 + x 2 + S 2 = 6 x 1 , x 2 , S 1 , S 2 ≥ 0 Escreva a tabela simplex:
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solução Z Z Z − 3 -3 − 3 − 4 -4 − 4 0 0 0 0 0 0 0 0 0 S 1 S_{1} S 1 1 1 1 2 2 2 1 1 1 0 0 0 8 8 8 S 2 S_{2} S 2 1 1 1 1 1 1 0 0 0 1 1 1 6 6 6
A variável de entrada é x 2 x_{2} x 2 , porque ela tem o coeficiente mais negativo − 4 -4 − 4 na linha Z.
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solução Ratio Z Z Z − 3 -3 − 3 − 4 -4 − 4 0 0 0 0 0 0 0 0 0 S 1 S_{1} S 1 1 1 1 2 2 2 1 1 1 0 0 0 8 8 8 8 2 = 4 \frac{8}{2} = 4 2 8 = 4 S 2 S_{2} S 2 1 1 1 1 1 1 0 0 0 1 1 1 6 6 6 6 1 = 6 \frac{6}{1} = 6 1 6 = 6
A variável de saída é S 1 S_{1} S 1 , porque ela tem a menor proporção.
Divida a linha 1 1 1 por 2 2 2 : R 1 = R 1 2 R_{1} = \frac{R_{1}}{2} R 1 = 2 R 1 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solução Z Z Z − 3 -3 − 3 − 4 -4 − 4 0 0 0 0 0 0 0 0 0 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 S 2 S_{2} S 2 1 1 1 1 1 1 0 0 0 1 1 1 6 6 6
Adicione a linha 2 2 2 multiplicada por 4 4 4 à linha 1 1 1 : R 1 = R 1 + 4 R 2 R_{1} = R_{1} + 4 R_{2} R 1 = R 1 + 4 R 2 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solução Z Z Z − 1 -1 − 1 0 0 0 2 2 2 0 0 0 16 16 16 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 S 2 S_{2} S 2 1 1 1 1 1 1 0 0 0 1 1 1 6 6 6
Subtraia a linha 2 2 2 da linha 3 3 3 : R 3 = R 3 − R 2 R_{3} = R_{3} - R_{2} R 3 = R 3 − R 2 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solução Z Z Z − 1 -1 − 1 0 0 0 2 2 2 0 0 0 16 16 16 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 S 2 S_{2} S 2 1 2 \frac{1}{2} 2 1 0 0 0 − 1 2 - \frac{1}{2} − 2 1 1 1 1 2 2 2
A variável de entrada é x 1 x_{1} x 1 , porque ela tem o coeficiente mais negativo − 1 -1 − 1 na linha Z.
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solução Ratio Z Z Z − 1 -1 − 1 0 0 0 2 2 2 0 0 0 16 16 16 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 4 1 2 = 8 \frac{4}{\frac{1}{2}} = 8 2 1 4 = 8 S 2 S_{2} S 2 1 2 \frac{1}{2} 2 1 0 0 0 − 1 2 - \frac{1}{2} − 2 1 1 1 1 2 2 2 2 1 2 = 4 \frac{2}{\frac{1}{2}} = 4 2 1 2 = 4
A variável de saída é S 2 S_{2} S 2 , porque ela tem a menor proporção.
Multiplique a linha 2 2 2 por 2 2 2 : R 2 = 2 R 2 R_{2} = 2 R_{2} R 2 = 2 R 2 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solução Z Z Z − 1 -1 − 1 0 0 0 2 2 2 0 0 0 16 16 16 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 x 1 x_{1} x 1 1 1 1 0 0 0 − 1 -1 − 1 2 2 2 4 4 4
Adicione a linha 3 3 3 à linha 1 1 1 : R 1 = R 1 + R 3 R_{1} = R_{1} + R_{3} R 1 = R 1 + R 3 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solução Z Z Z 0 0 0 0 0 0 1 1 1 2 2 2 20 20 20 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 x 1 x_{1} x 1 1 1 1 0 0 0 − 1 -1 − 1 2 2 2 4 4 4
Subtraia a linha 3 3 3 multiplicada por 1 2 \frac{1}{2} 2 1 da linha 2 2 2 : R 2 = R 2 − R 3 2 R_{2} = R_{2} - \frac{R_{3}}{2} R 2 = R 2 − 2 R 3 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solução Z Z Z 0 0 0 0 0 0 1 1 1 2 2 2 20 20 20 x 2 x_{2} x 2 0 0 0 1 1 1 1 1 1 − 1 -1 − 1 2 2 2 x 1 x_{1} x 1 1 1 1 0 0 0 − 1 -1 − 1 2 2 2 4 4 4
Nenhum dos coeficientes da linha Z é negativo.
O ideal é alcançado.
A seguinte solução é obtida: ( x 1 , x 2 , S 1 , S 2 ) = ( 4 , 2 , 0 , 0 ) \left(x_{1}, x_{2}, S_{1}, S_{2}\right) = \left(4, 2, 0, 0\right) ( x 1 , x 2 , S 1 , S 2 ) = ( 4 , 2 , 0 , 0 ) .
Resposta Z = 20 Z = 20 Z = 20 A é obtido em ( x 1 , x 2 ) = ( 4 , 2 ) \left(x_{1}, x_{2}\right) = \left(4, 2\right) ( x 1 , x 2 ) = ( 4 , 2 ) A .