### Handling "="-constraints and unconstrained variables (with simple Mathematical tricks)

• Handling "="-constrains

• Sample "="-constraint:

 ``` 3×x1 - 4×x2 + 5×x3 + 8×x3 = 56 ```

• Problem with an equality constraint:

• It is not straighforward to find a basic feasible solution

• I.e.:

 When we use row operations to transform some columns into canonical unit column vectors, we cannot guarantee that the resulting Simplex Tableau contains a feasible solution.

• Handling "="-constraints:

• An equality constraint can be converted into 2 inequality constraints as follows:

 ``` 3×x1 - 4×x2 + 5×x3 + 8×x3 ≤ 56 3×x1 - 4×x2 + 5×x3 + 8×x3 ≥ 56 ```

• This will result in the following linear equations:

 ``` 3×x1 - 4×x2 + 5×x3 + 8×x3 + s1 = 56 3×x1 - 4×x2 + 5×x3 + 8×x3 - s2 = 56 ```

• And we will need to add an artificial variable for −s2:

 ``` 3×x1 - 4×x2 + 5×x3 + 8×x3 + s1 = 56 3×x1 - 4×x2 + 5×x3 + 8×x3 - s2 + a1 = 56 ```

• We have to do these steps to obtain a basis

The variables s1 and a1 will be part of the basis of the initial Simplex Tableau (for Phase 1)

Since we added artificial variables, we need to use the 2-phase Simplex method to drive the artificial variables to ZERO (0) to obtain a feasible basic solution before starting with the actual Simplex method (phase 2)

• Handling unconstrained variables

• The Simplex method assumes that every variable xi has the following constraint:

 xi   ≥   0

• Unconstrained variables:

 An Unconstrained variables xi can assume any value (including negative values)

• Handling unconstrained variables in Simplex:

• Replace every unconstrained variable xi by 2 constrained ones as follows:

 ``` xi is unconstrained Replace with: xi = xi1 - xi2 where xi1, xi2 ≥ 0 ```

• Handling "xi ≥ constant" constraints

• The Simplex method assumes that every variable xi satisfies the following constraint:

 xi   ≥   0

• We can encounter constraints with non-zero constant of this form:

 ``` xi ≥ ci ( ci ≠ 0 ) ```

• This is handle easily by a substitution:

 ``` xi ≥ ci ( ci ≠ 0 ) Substitute: xi' = xi - ci ==> xi ≥ ci <==> xi - ci ≥ 0 <==> xi' ≥ 0 ```

• So we simply replace xi in every equation in the constrained optimalization problem by xi'   first, before we apply the Simplex Method