Lesson in Linear Programming - Compress
Lesson in Linear Programming - Compress
LINEAR PROGRAMMING
Linear Programming
it is a computer science technique to address issues of
optimization process.
The word "linear" implies the linearity of all mathematical relationships
NOTE
within a model. The constraints of non-negativity
(variables are negative or positive)
Standard model are also included in the model.
is the set of linear equations and/or inequalities (called The manager's aim is to find the
constraints) and; right solution for the highest objective
function value.
the linear objective function (to be maximized or minimized).
Formulation
1. Decision variables
The variables would explain thoroughly the management's decisions to be made. To optimize the income,
the manager needs to determine how many cars and how many boats will be generated per month.
2. Objective function
This function reflects the criteria of the management which must be maximized or minimized.
The management aims to optimize gross monthly income in the circumstance of the ABC as the disparity
between total monthly revenues and total monthly costs.
Revenue and cost can be represented as the function of the variables x1 and x2 for decision.
1. Total revenue (TR) = revenue from sold car + revenues from sold boat. The price of one car is P550
and ABC produces x1 of car, the revenue resulting from the cars is 550x1. Likewise, the revenue from
sold boats is 700x2.
The total monthly revenue from production is expressed as:
TR= 500x1 + 700x2
0 0
2. Monthly wood cost (WC) = WC of produced cars + WC of produced boats. The wood cost of
production of one car (50 ) and the total number of produced car is x1, the monthly wood cost of all
produced cars is 50x1. Likewise, the monthly wood cost of all boats is 70x2.
Total monthly wood cost is :
WC= 50x1 + 70x2
3. Woodwork labor cost (WLC) = WLC of produced cars + WLC of produced boats. One car needs 1
hour of woodwork labor and cost of 1 hour of this labor is 30 , the unit cost is 30 . The monthly cost of
carpentry labor used for all produced cars is 30x1. One boat requires 2 hours, the monthly cost of
woodwork labor used for boats is 60x2.
Total monthly cost of woodwork labor:
WLC= 30x1 + 60x2
4. Painting and assembling labor cost (PALC) = PALC of produced cars + PALC of produced boats. Both
a piece of car and boat need 1 hour of painting and assembling labor. Cost of this labor is 20 per
hour.
Therefore the total monthly cost of painting and assembling labor:
PALC= 20x1 +20x2
5. The total monthly cost can be expressed as:
TC= WC + WLC + PALC
= (50x1 + 70x2) + (30x1 + 60x2) + (20x1 +20x2)
TC= 100x1 + 150x2
6. The total profit:
TP = TR − TC
= (550x1 + 700x2) − (100x1 + 150x2 )
= 450x1 + 550x2
the objective function in the linear programming model is:
Maximize z = 450x1 + 550x2
450 and 550 in the function are termed objective function coefficients.
3. Constraints
If no restrictions are imposed, objective function (profit) can expand to infinity. There are three limits (called
constraints) to the development of toys, though:
ABC, Inc. has just 5000 hours of woodwork labor accessible per month.
No more than 3000 hours of finished labor can be used each month.
Because of minimal demand, there will be a maximum of 2000 cars delivered each month.
0 0
o Total consumption of woodwork labor for both products can be expressed as x1 + 2x2. This is actual
use of labor (in hours) that cannot be greater than available number of hours (5000). With this, the
constraint can be:
x1 + 2x2 ≤ 5000
o The creation of the second constraint regarding painting and assembling labor is like to the
foregoing:
x1 + x2 ≤ 3000
o The last constraint is easy to be construct. The number of produced cars x1 must be less than or equal
to 2000:
x1 ≤ 2000
o Technological coefficients are coefficients of the decision variables in the constraints while numbers
5000, 3000 and 2000 are termed right-hand side values.
Non-negativity Constraints
Both decision variables have rational sign restrictions: because the values of variables reflect numbers of
toys made, we would expect them not to be negative:
x1, x2 ≥ 0
0 0
0 0
Figure 2.2 Woodwork Labor
Drawn in Figure 2.3 is the second inequality 3000 x1 + x2 ≤ (painting and assembling labor constraint),
the last constraint 2000x1 ≤ is comprehended in Figure 2.4.
0 0
STEP 2 - COMBINING THE CONSTRAINTS
If all of the restrictions are drawn independently, they must be placed together in a single graph.
Practically, this final graph may be built by systematic addition of the individual feasible areas from the
beginning.
The ultimate graph of the feasible area in the example is seen in Figure 2.5. Any solution in this area is
feasible as regards all the constraints.
Figure 2.6 introduces three of those equations of values 495,000, 1,485,000 and 2,475,000. All the lines
are parallel to each other and can be constructed in the same way as the constraints borderline in Step 1.
0 0
Both points on a specific line produce the same profit, and hence the lines are typically called isoprofit
lines. The arrow expressed income growth.
There are two potential ways of seeking the best approach using the model's graphical representation:
o The first approach has only been illustrated. We can determine the "best" point of the feasible
area, by finding a slope and the growth direction of the isoprofit line.
o This level is the optimal solution, and the isoprofit line suits the ideal objective function optimal value.
Within this section of the text it is important to notice that a convex set is the feasible field of all
linear programming models.
A set of points S is a convex set if the section of the line connecting each pair of points in S is entirely enclosed in S.
The disparity between convex and non-convex sets is shown in Figure 2.8. Although the first three examples
are convex sets (a), (b) and (c), the group (d) is non-convex.
The set (a) varies significantly from the sets (b) and (c), due to nonlinear border.
0 0
If the convex set boundary consists only of linear segments, as seen in cases (b) and (c), the set is called a
convex polyhedron, which reflects the standard feasible field of linear programming models. It is the
feature which is useful in linear programming methods.
The key problem is how to measure optimum solution of coordinates X(1000, 2000). As it is apparent
from Figure 2.6, this point is the borderline intersection of two constraints. Determining the co-ordinates is
therefore very simple by solving the series of two linear equations. The borderlines compare in our situation
are:
x1 + 2x2 = 5000 , x1 + x2 = 3000 .
Pretty simple solution: x1 = 1,000 and x2 = 2,000. Those values are point X coordinates. Incorporating
them into objective function z = 450x1 + 550x2 = 1 550 000.
It is important to identify a corner point before beginning to explain the second approach used to find the
best solution in the graph. With respect to the convex polyhedron definition it is possible to describe the
corner point clearly as follows:
o A point P in convex polyhedron S is a corner point if it does not lie on any line joining any pair of other
(than P) points in S.
Keystone of the second approach is the basic linear programming theorem:
o The optimal feasible solution, if it exists, will occur at one or more of the corner points.
In this theorem, what we need is to define the feasible area's corner points and determine the objective
values for all of those points. The optimal solution is the corner point and has the highest objective value.
The feasible area in the example contains 5 corner points (Figure 2.9), of which the coordinates can be
observed in Table 2.1. All the coordinates were calculated in the manner described above: after
classification of the intersected lines, the set of equations is solved and the x1 and x2 co-ordinates provide
the solution. The objective value z is then calculated for each solution by incorporating the co-ordinates into
the objective function.
From the table it is evident that the optimal solution corresponds to the maximum objective value
z = 1,550,000.
0 0
is a general method used for solving linear programming problems. It is an iterative algorithm for efficient
searching for the optimal solution.
The method uses the Gauss- Jordan method of solving simultaneous equations. In addition, the method is
based on the basic linear programming theorem (the search can concentrate only on the corner points of
the feasible area).
The run of algorithm starts in one of the corner points (usually in the origin) and moves to adjacent corner
that improves the value of the objective function. The process of movement continues until no further
improvement is possible.
The simplex method and its variations have been programmed and therefore even large linear
programming problems can be easy solved.
0 0
which is almost the same as the right-hand side value 5000 (the constraint is obligatory). Since the right-
hand side relates to the hours of work available, equality means that no hour stays or all available hours
are being used for optimal production.
The painting and assembling labor condition is similar. The constraint's left-hand side value is
1000 + 2000 = 3000,
the right-hand side value is always equal to 3000; therefore, all required painting and assembling labor
hours are used.
The last constraint relates to demand limitation (the amount of cars created should be less than or
equivalent to 2000). Because output of 1000 cars is optimal (the constraint is non-binding), this is not the
restriction that affects ABC, Inc's production.
The organization could increase cars production as it succeeded in having more hours of work or
developing the technologies (i.e. reducing unit labor consumption).
0 0
Sensitivity analysis
defines, typically for coefficients of objective function and right-hand side values, the array of their
potential changes that do not have the cardinal effect on the optimal solution.
Changing the car’s price from 550 to 649 (i.e. the objective function coefficient was improved from 450 to
549), the optimal solution would be the original corner point (1000, 2000).
Only modification would be higher profit, while the production assembly would be alike. If the price
increased to 651, the optimal solution (2000, 1000) would be attained, and resulting in this
recommendation the business should change the production assembly from the base.
The price 650 provides the business the option to manufacture either 1000 cars (and 2000 boats) or 2000
cars (and 1000 boats).
Modification in coefficients of objective function impacts only its slope, whereas the feasible area remains
static. The best corner point was determined by the slope of the function. If right-hand side value is
modified the feasible area is also modified.
The constraint’s borderline’s movement was due to change (the new borderline is parallel with the original).
Smaller change in the right-hand side value means smaller change in the feasible area while big changes in
the feasible area makes the cardinal change as shown by Figure 2.11 (decrease in available painting and
assembling labor from 3000 to 2000 hours).
Corner points original number of 5 decreases to 3. In this situation, new optimal solution is presented by the
corner point (0, 2000).
0 0
Only one optimal solution has been attained in the production problem of ABC, Inc. It is a distinctive in most
cases linear programming problems. Figure 2.12 express the feasible area together with the objective
function z (the arrow specifies the improvement direction’s of the objective value). Unique optimal solution is
the corner point A.
In the previous discussion, the price of the car is 650 (instead of 550), the management of ABC, Inc. has two
basic possibilities how to optimize the profit. Producing 1000 cars (and 2000 boats) or 2000 cars (and
1000 boats) would bring the identical optimal profit 1,650,000.
A linear programming problem with two or more optimal solutions is said to have alternative (or multiple) optimal
solutions.
This condition occurs in graphical depiction of the model when the objective function line is parallel to the
borderline of one constraint, as can be shown in Figure 2.13.
Because the objective function reflects the isoprofit line (in case of maximization) or the isocost line (in case
of minimization), all the solutions at the edge of the feasible area have the same objective value (optimal).
There are two optimal corner points (B and C) and the infinite number of optimal points on line segment BC.
0 0
Figure 2.14 shows an interesting alternative of just described case. The difference is evident – the feasible
area is unbounded and there is only one optimal corner point D; the other optimal points lie on the
borderline running to infinity.
There is no optimal solution if the feasible solution area is unbounded and the objective value is being
enhanced in the direction of unboundedness, therefore, the optimal solution is endless (see Figure 2.15).
Since these instances are uncommon in reality, this finding typically indicates mistake in formulation.
0 0
Infeasibility exists when no solution meets any of the constraints. There is no common feasible area (no
feasible solution) in case of two constraints graphed in Figure 2.16.
In reality this scenario sometimes occurs, particularly if the manager wants to be too accurate in model
formulation. In order to remove the infeasibility, the model must be simplify by for example eliminating any
vain restrictions.
0 0
END OF MODULE
Exercises
Required:
1. Define the decision variables
2. Compute for the Optimal Solution
PR Developments is skilled in analyzing the response of customers to the latest goods and services. A client,
launching new form of body lotion, requested the PR Developments to plan a campaign of specific door-to -
door interviews about the opinion of households. Households with children and without children should be
interviewed; interviews will be held both daytime and nighttime.
A schedule for performing 1000 interviews with the following constraints is set:
PR Creations project manager can recommend interview schedule that would satisfy the constraints for the lowest
minimum total cost.
0 0