Linear/Integer Programming Flashcards
How to put a LP problem in standard form?
- Objective from min to max (*-1)
- <Slack (+) / >Surplus (-)
- Constraints RHS to positives (*-1)
Eg:
min z = -50x_1 + 100x_2 to max z = 50x_1 - 100x_2
x_1 + 2x_2 >= 7 to x_1 + 2x_2 - s_1 = 7
x_1 + 2x_2 <= -7 to -x_1 - 2x_2 + s_2 = 7
Put this into a Simplex tableau:
Max 2x_1 + 3x_2 + s_1 + s_2 + s_3
S.t. x_1 + s_1 = 30
x_1 + 2x_2 + s_2 = 54
x_2 + s_3 = 20
Basics | z| x_1| x_2| s_1| s_2|s_3| sol
z |1| -2 |-3 |0 |0 |0 |0
s_1 |0| 1 |0 |1 |0 |0 |30
s_2 |0| 1 |2 |0 |1 |0 |54
s_3 |0| 0 |1 |0 |0 |1 |20
7 steps to solving Simplex
- Pivot column (most negative in obj row)
- Ratio (sol ÷ pivot column)
- Pivot row (smallest positive number)
- Pivot number (intersect)
- Re-write tableau (column var replaces row var)
- Row operations (pivot # = 1, pivot column = 0)
- Repeat (until no negatives in obj row)
Decision variable definition
The unknown quantities you’re solving for eg: tonnes of silk paint and matt paint.
x_i
Coefficients definition
The weight or cost associated with each decision variable eg: £40 profit per tonne of matt paint.
40x_1
3 things needed in a LIP problem?
Decision variables - x_i
Linear objective function - c_1x_1+…+c_nx_n
Constraints - a_1x1+…+a_2x_2 =>< b
Basic solution
The number of ways that the system of linear equations can be solved without yielding a contradictory result.
Basic solutions aren’t necessarily feasible (don’t meet non-negativity constraint)
n! / m!*(n-m)!
Basic variable definition
Variable IS NOT 0 in a basic solution
Non-basic variable
Variable is 0 in a basic solution
Basic feasible solution
Solution that meets the non-negativity constraints.
What is the solution to this Simplex tableau:
Basics | z| x_1| x_2| s_1| s_2|s_3 | sol
z |1| 0 | 0 |1/2 |0 |3/2 |96
s_2 |0| 0 | 0 |1/2 |1 |-1/2|8
x_1 |0| 1 | 0 |1 |0 |0 |30
x_2 |0| 0 | 1 |-1/2|0 |1/2 |12
Z = 96
X_1 = 30
X_2 = 12
Or c_130 + c_212 = 96
8 slack on constraint 2 (s_2)