Linear Programming Flashcards
What goes on in linear programming
Have an objective function based on two variables (hence linear) that you want to maximise based on context and subject to certain restraints, to find an ideal solution.
This works by plotting the inequality lines to identify a feasibility region (region where all condtions are met), and then finding an optimal solution
For standard LP, where will the optimal solution always be?
Thus what might you shed to calculate
Always will be one of the vertices of the feasibility region you calculated
Thus might have to find points of intersection = use simultaneous solution solved calculator to help
How else can you Manually find / predict the optimal solution
The line if objective function, if it’d maximising, bring from above, if minimising, bring from below
This way you can eliminate some vertices anyways
How to show the feasibility region on graph (what to shade)
SHADE REGIONS YOU DINT WANT to make it clear
Possible to have a whole one staidly the objective function?
Yes, known as objective line
How to draw the liens very easily
Set x and y to zero, plot
If not use max min values of the graph
If not try find nice values to make ti as easy as possible
What about checking if a region satisfies an inequality (what points to pick)
MUST CHOOSE A POINT NOT ON THE LINE
if 00 available , use it, makes so easy
If not choose something else
What is INTEGER LP?
A lot of time irl the context means you are trying to maximise whole number things like tables and chairs etc, so can’t have 7.5 tables
This means need to change the way you calculate ideal solution
How to do ILP
Identify feasibility zone
- and then mark ALL WHOLE NUMBER COORDINATE POINTS IN IT
- make a table and essentially test them
- can predict to eliminate some first
Okay if it says twice as many A as B, be careful
This just means if a is 10, then B must be 5 and A must be at,east 10 can be more, so x>= 2y
How to formulate an LP (key steps)
WHAT TO NOT FORGOT AT END
1) state variables x and y (always 2) and COST /PROFIT equation
2) state objective function
3) “subject to” and state all limitations SIMPLIFIED
4) finally REMEMBER NON NEGATIVITY CINSTRAINTS !
Again what’s one thing you should try to include in all LP? As a constrain
The non negativity ones!
What happens if it is a mix (a blend)
Remember a blend is just percentage of thr WHOLE mixture, which was a combination of both
So do like 10x + 4y = 4(x+y)
NOW EXPAND, AND SIMPLIFY BY COLELCTING LIKE TERMS
How to decide inequalities
If fixed amount less than equal to
If needs an amount, but if more then won’t hurt (like availability) then do thst