0% found this document useful (0 votes)
28 views6 pages

Excel Simplex Method Template

This Excel template utilizes the simplex tableau method to solve linear programming problems in standard form, specifically for maximizing an objective function subject to constraints. Users can input up to 6 variables and 6 constraints, and the template automatically performs up to 10 iterations to find the optimal solution. The document also includes guidelines for inputting data and notes on handling specific types of constraints.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views6 pages

Excel Simplex Method Template

This Excel template utilizes the simplex tableau method to solve linear programming problems in standard form, specifically for maximizing an objective function subject to constraints. Users can input up to 6 variables and 6 constraints, and the template automatically performs up to 10 iterations to find the optimal solution. The document also includes guidelines for inputting data and notes on handling specific types of constraints.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Simplex Method (Tableau) – Excel Template

What this file does


This workbook solves linear programs in standard form using the (primal) simplex tableau method.
Supported form:
Maximize cᵀx
Subject to Ax ≤ b, x ≥ 0, b ≥ 0

Enter A, b, and c on the Inputs sheet (up to 6 variables and 6 constraints). The Tableau sheet will run up to 10
simplex iterations automatically using formulas.

How to use
1) Go to Inputs.
2) Set #Vars (n) and #Constraints (m).
3) Fill objective coefficients (c) and constraint matrix (A) + RHS (b).
4) Go to Solution for the final status and variable values.

Notes:
• If any b is negative, you must rewrite the constraint (multiply by -1) before using this template.
• If you need ≥ or = constraints or minimization, convert the model to the supported form first (e.g., add
surplus/artificial variables – not included here).

Example: Max Z = 3x1 + 4x2; constraints: 2x1+x2≤40,2x1+5x2≤180. optimal is x1=2.5 x2=35, Z=147.5

.
Inputs (Maximize cᵀx subject to Ax ≤ b, x ≥ 0)

# Decision vars (n) 2


# Constraints (m) 2

Objective coefficients c (Max Z = Σ cⱼ xⱼ)


Var c
x1 3
x2 4

Constraint matrix A and RHS b (Ax ≤ b)


Constraint RHS (b) x1 x2 s1 s2
C1 40 2 1 1 0
C2 180 2 5 0 1

Checks
All RHS (b) must
OK
be ≥ 0:
Iteration 0
Row Basis x1 x2 s1 s2 RHS Ratio Notes
C1 s1 2 1 1 0 40 40.000
C2 s2 2 5 0 1 180 36.000
Z -3 -4 0 0 0 Objective row
If status is Optimal, stop.
Pivot Entering x2 Leaving Continue Pivot Col If Unbounded, model has

Iteration 1
Row Basis x1 x2 s1 s2 RHS Ratio Notes
C1 s1 1.6 0 1 -0.2 4 2.500
C2 x2 0.4 1 0 0.2 36 90.000
Z -1.4 0 0 0.8 144 Objective row
If status is Optimal, stop.
Pivot Entering x1 Leaving Continue Pivot Col If Unbounded, model has

Iteration 2
Row Basis x1 x2 s1 s2 RHS Ratio Notes
C1 x1 1 0 0.625 -0.125 2.5 2.500
C2 x2 -5.6E-17 1 -0.25 0.25 35 ########
Z -2.2E-16 0 0.875 0.625 147.5 Objective row
If status is Optimal, stop.
Pivot Entering x1 Leaving Continue Pivot Col If Unbounded, model has

Iteration 3
Row Basis x1 x2 s1 s2 RHS Ratio Notes
C1 x1 1 0 0.625 -0.125 2.5
C2 x2 0 1 -0.25 0.25 35
Z 0 0 0.875 0.625 147.5 Objective row
If status is Optimal, stop.
Pivot Entering Leaving Optimal Pivot Col If Unbounded, model has

Iteration 4
Row Basis x1 x2 s1 s2 RHS Ratio Notes
C1 x1 1 0 0.625 -0.125 2.5
C2 x2 0 1 -0.25 0.25 35
Z 0 0 0.875 0.625 147.5 Objective row
If status is Optimal, stop.
Pivot Entering Leaving Optimal Pivot Col If Unbounded, model has

Iteration 5
Row Basis x1 x2 s1 s2 RHS Ratio Notes
C1 x1 1 0 0.625 -0.125 2.5
C2 x2 0 1 -0.25 0.25 35
Z 0 0 0.875 0.625 147.5 Objective row
If status is Optimal, stop.
Pivot Entering Leaving Optimal Pivot Col If Unbounded, model has

Iteration 6
Row Basis x1 x2 s1 s2 RHS Ratio Notes
C1 x1 1 0 0.625 -0.125 2.5
C2 x2 0 1 -0.25 0.25 35
Z 0 0 0.875 0.625 147.5 Objective row
If status is Optimal, stop.
Pivot Entering Leaving Optimal Pivot Col If Unbounded, model has

Iteration 7
Row Basis x1 x2 s1 s2 RHS Ratio Notes
C1 x1 1 0 0.625 -0.125 2.5
C2 x2 0 1 -0.25 0.25 35
Z 0 0 0.875 0.625 147.5 Objective row
If status is Optimal, stop.
Pivot Entering Leaving Optimal Pivot Col If Unbounded, model has

Iteration 8
Row Basis x1 x2 s1 s2 RHS Ratio Notes
C1 x1 1 0 0.625 -0.125 2.5
C2 x2 0 1 -0.25 0.25 35
Z 0 0 0.875 0.625 147.5 Objective row
If status is Optimal, stop.
Pivot Entering Leaving Optimal Pivot Col If Unbounded, model has

Iteration 9
Row Basis x1 x2 s1 s2 RHS Ratio Notes
C1 x1 1 0 0.625 -0.125 2.5
C2 x2 0 1 -0.25 0.25 35
Z 0 0 0.875 0.625 147.5 Objective row
If status is Optimal, stop.
Pivot Entering Leaving Optimal Pivot Col If Unbounded, model has
Solution (from first Optimal iteration within 10 iterations)

Chosen
Iteration Status Objective (Z) Final status
iteration
0 Continue 0.000 4 Optimal
1 Continue 144.000
If status never becomes 'Optimal' within 10
iterations, increase iterations by extending the
4 Optimal 147.500
5 Optimal 147.500
6 Optimal 147.500
7 Optimal 147.500
8 Optimal 147.500
9 Optimal 147.500

Decision variables Slack variables (if you want them)


Variable Value Variable Value
x1 2.500 s1 0.000
x2 35.000 s2 0.000
Final Z
147.500

You might also like