Example: Formulating a Production Schedule Optimization Problem
LP is a strategy that permits the converging of a few variables based on a linear function of adequacy (target work) while at the same time fulfilling a gathering of linear confinements for these variables.
- First step we have to find the unknown variablethat hasto be determinedand representing them in form of algebraic symbols.
- Now, we will proceed to makeListskeeping in mind about restrictions of the problem andexpressing them in the form of linear equations in terms of thedecision variables which we have defined in theprevious step.
- Now, subsequent stage is to decide the objective function for advancing the issue and speaking to them as a linear function of the decision variables. The target can be either an augmenting or a limiting function.
Given a LP problem comprising of numerous variables in the augmentation or minimization mode from a linear function, which is otherwise called the objective function (OF), the factors are submitted to a gathering of confinements that are also linear. For the most part, an problem in LP is defined as pursues. The confinement of ‘no antagonism in the decision variables’ establishes a fundamental condition for the application of the solution algorithm. Although this restriction normally holds great because of the idea of the variables utilized in the model, in specific situations it can prompt circumstances where the variables becomes unrestricted. In this circumstance, an artificial variable ought to be utilized to substitute each unrestricted variable by the distinction between the other two factors for which the confinement of ‘no negativity’ is connected Briefly, the calculation can be portrayed as pursues
Where xn are the decision variables, cn are parameters of the OF, amn are parameters of the restriction conditions, bnn is an independent term of the restriction conditions, n is the quantity of decision variables, and m is the quantity of functional restrictions.
The values of all the coefficients, or control parameters,are known during the modelling of the problem. These coefficients can have either deterministic or probabilistic characteristics depending on the nature of the problem modelled.
Linear programming is applied in our daily life everywhere around you. You utilize linear programming at individual and expert fronts. You are utilizing linear programming whenever you are driving from some places to work and need to take the briefest course. Or on the other hand when you have a venture conveyance you make methodologies to make your cooperation productively for on time conveyance. Linear programming (LP) is one of the least difficult approaches to perform advancement. It encourages you take care of some mind boggling enhancement issues by making a couple rearranging suspicions. As an examiner you will undoubtedly go over applications and issues to be fathomed by Linear Programming.
Formulating a Linear Programming model to help the management of the factory determine the optimal daily production schedule, that is, finding the number of dresses andcoats to be produced that would maximize the profit.
Step 1→ |
Identifying the Decision Variables of interest to the decision maker and express them as x1, y1, x2……… |
Step 2→ |
Find out the Objective of the decision whether he needs to limit or to expand. |
Step 3→ |
Learn about the cost (if there should be an occurrence of minimization problem) or the profit (in case of maximization) per unit of every one of the decision variables.. |
Step 4→ |
Ascertain the constraints representing the maximum availability or minimum commitment or equality and represent them as less than or equal to (≤) type inequality or greater than or equal to (≥) type inequality or ‘equal to’ (=) type equality respectively. … |
For the above problem we have observed that the objective function will be price which we have to maximizeSo here we have taken price as the objective function. Time and resource as constraints.
Minutes per unit |
||
Cutting sewing Packaging |
Unit profit($) |
|
Dresses |
25 25 15 |
8 |
Coats |
12 55 15 |
15 |
Solution with R Code
25 employs worker in the cutting department,
52 workers in the sewing department,
14 workers in the packaging department.
Daily demand – 120 dresses
We have equations this Lp model are
Variable are taken as x for dresses and y for coats
Objective function –
Z= 8x+15y (Price for one unit is given 8$ ,Price for the coats per unit 15$)
Constraints-
25x +12y =< 1500 ( Resource constraints )
25x + 55y = < 3120
15x + 15y = < 840 (Time constraints)
R code –
require(lpSolve)
## objective function is defined as –
objective <- c(8,15)
## Here both resource contraints and time contraints are defined-
constraints <- matrix(c(25,12,25,55,15,15,1,0,0,1), ncol=2, byrow=TRUE)
rhs.in <- c(1500,3120,840,15,0)
## direction for every contraints
direction.as <- c(“<=”,”<=”,”<=”,”>=”,”>=”)
## formulated linear programming model for the given problem as-
optimum <- lp(“max”, objective, constraints, direction.as, rhs.in,compute.sens = TRUE)
## provides the solution for the problem that finding no of dresses and coats
optimum$solution
##calaculation of price
optimum$objval
We get out put as –
optimum$solution
[1] 15 41
>optimum$objval
[1] 735
15 dresses and 41 coats per hour to maximize the profit
Profit = 735$
Now ,we will use graphical method to find the optimum solution. Graph will Show the feasible region and the optimal solution on the graph.
Graphical Method: Owing to the importance of linear programming models in various industries, many types of algorithms have been developed over the years to solve them. Some famous mentions include the Simplex method, the Hungarian approach, and others. Here we are going to concentrate on one of the most basic methods to handle a linear programming problem i.e. the graphical method.
In principle, this method works for almost all different types of problems but gets more and more difficult to solve when the number of decision variables and the constraints increases. Therefore, we’ll illustrate it in a simple case i.e. for two variables only. So let’s get started with the graphical method!
We will first discuss the steps of the algorithm:
Step 1: Formulating the LP (Linear programming) problem
We have alreadyunderstand the mathematics behind formulation of an LP problem. Note that this is the one of the most crucial step in formulation of the linear programming model for the problem.
Step 2: Constructing a graph and plotting of the constraint lines
The graph which we will be constructing must be in ‘n’ dimensions, where ‘n’ represents the number of decision variables. This will provide an idea about the complexity of this step if the number of decision variables increases.
Graphical Method for Finding Optimum Solution
The constraint lines can be constructed by joining the horizontal and vertical intercepts found from each constraint equation.
Step 3: Determining the valid side of each constraint line formulated
A simple method is to put the coordinates of the origin (0,0) in the problem and determine whether the objective function takes on a physical solution or not. If yes, then the side of the constraint lines on which the origin lies is the valid side. Otherwise the opposite one.
Step 4: Identify the feasible solution region
The feasible solution region on the graph is the one which is satisfied by all the constraints. It could be viewed as the intersection of the valid regions of each constraint line as well. Choosing any point in this area would result in a valid solution for our objective function.
Step 5: Plot the objective function on the graph
It will clearly be a straight line since we are dealing with linear equations here. One must be sure to draw it differently from the constraint lines to avoid confusion. Choose the constant value in the equation of the objective function randomly, just to make it clearly distinguishable.
Step 6: Find the optimum point
An optimum point always lies on one of the corners of the feasible region. How to find it? Place a ruler on the graph sheet, parallel to the objective function. Be sure to keep the orientation of this ruler fixed in space. We only need the direction of the straight line of the objective function. Now begin from the far corner of the graph and tend to slide it towards the origin.
If the goal is to minimize the objective function, find the point of contact of the ruler with the feasible region, which is the closest to the origin. This is the optimum point for minimizing the function.
If the goal is to maximize the objective function, find the point of contact of the ruler with the feasible region, which is the farthest from the origin. This is the optimum point for maximizing the function.
Step 7: Calculate the coordinates of the optimum point.
This is the last step of the process. Once you locate the optimum point, you’ll need to find its coordinates. This can be done by drawing two perpendicular lines from the point onto the coordinate axes and noting down the coordinates.
Otherwise, you may proceed algebraically also if the optimum point is at the intersection of two constraint lines and find it by solving a set of simultaneous linear equations. The Optimum Point gives you the values of the decision variables necessary to optimize the objective function.
Objective function –
Z= 8x+15y (Price for one unit is given 8$ ,Price for the coats per unit 15$)
Constraints-
25x +12y =< 1500 ( Resource constraints )
25x + 55y = < 3120
15x + 15y = < 840 (Time constraints)
x>= 15 , x>=0,y>=0
Range for the pro?t ($) of a dress that can be changed without a?ecting the optimum solution obtained above 8$ to 49$
Procedure to find the range for the profit
As ,we know One unit dress price as given in the problem = 8 $
Total price obtained at maximum= 735$
Maximum no of dresses production completed at a optimum price is 15 unit.
Price for 15 dress 735/15=49$;
So range = 8$ to 49$
Problem Given – Here given food producer makes three types of cereals A, B, and C from a mix of several ingredients Oates, Raisins, Apricots and Hazelnuts. The cereals are produced in 2kg boxes. The following table provides details of the sales price per box of cereals and the production cost per ton (1000 kg) of cereals respectively.
Cereals |
Sale price per box |
Production cost per kg |
Cereal A |
1.3$ |
0.0042 |
Cereal B |
1.15$ |
0.0026 |
Cereal C |
1.6$ |
0.0030 |
Ingredients |
Purchase price per kg |
Maximum availability |
Oats |
0.1$ |
10000 |
raisins |
0.09$ |
5000 |
apricots |
0.11$ |
2000 |
hazelnuts |
0.1$ |
2000 |
Equations for the lpmodel, variableschoosen for the cereals A,B,C are taken as p,q,r
Objective function for the problem given as-
Z= 1.1955p +1.042q +1.4705r
Time and resource Constraints-
0.8p+0.6q+0.45r <= 10000
0.1p+0.25q+0.15r <= 5000
0.05p+0.05q+0.10r <= 2000
0.05p+0.10q+0.30r <= 2000
p>=0
q>=0
r>=0
R- Code
require(lpSolve)
## objective function is defined as –
object.in <- c(1.1955,1.042,1.4705)
## Here both resource contraints and time contraints are defined-
consT<- matrix(c(0.8,0.6,0.45,0.1,0.25,0.15,0.05,0.05,0.10,0.05,0.10,0.30,1,0,0,0,1,0,0,0,1), ncol=3, byrow=TRUE)
rhs<- c(10000,5000,2000,2000,2000,1600,1500)
## direction for every contraints
direction.in <- c(“<=”,”<=”,”<=”,”<=”,”>=”,”>=”,”>=”)
## formulated linear programming model for the given problem as-
optimum <- lp(“max”, object.in, consT, direction.in, rhs,compute.sens = TRUE)
## provides the solution for the problem
optimum$solution
##calaculation of price
optimum$objval
OUTPUT
OUTPUT
[1] 8662.069 1600.000 4689.655
>optimum$objval
[1] 18918.84
Cereal A – 8662.069 kg
Cereal B – 1600 kg
Cereal C – 4689.655 kg
In a zero-sum game, the unadulterated procedures of two players establish a saddle point if the relating section of the payoff matrixes all the while a limit of line minima and at least segment maxima. This basic leadership is alluded to as the minimax-maximin principle to acquire the most ideal choice of a strategy for the players.
In a pay-off matrix, the base an incentive in each row speaks to the base increase for player A. Player A will choose the system that gives him the most maximum gain among the row minimum values. The choice of system by player A depends on maximin guideline. So also, a similar payoff is a loss for player B. The maximum value in every segment speaks to the most extreme misfortune for Player B. Player B will choose the system that gives him the base misfortune among the section maximum values.
The choice of technique by player B depends on minimax standard. On the off chance that the maximin esteem is equivalent to minimax esteem, the diversion has a saddle point (i.e., equilibrium point). In this way the strategy chosen by player A and player B are optimal.
2.A payoff matrix_ is characterized as a visual portrayal of all the conceivable results that can happen when two individuals or gatherings need to settle on a strategic decision. The decision is alluded to as a strategic decision on the grounds that every leader needs to contemplate how their decision will influence their adversary’s decision and how their opponent’s choice. will influence their very own decision. The payoff matrix shows every conceivable methodology that one side can pick, just as each mix of results that are conceivable dependent on every opponent’s choice.
3.In mathematics, a “saddle point” of a two-variable function f(x,y) is a point (x*, y*) such that x* maximizes f(x,y*) over x while y* minimizes f(x*,y) over y. If you plot such a function in 3d, with x and y on the two horizontal axes and the values f(x,y) on the vertical axis, it will look like a saddle locally around (x*,y*). In application to zero-sum games, if x and y represent the (possibly mixed) strategies of players 1 and 2 respectively and f(x,y) represents the (expected) payoff of player 1 (which is the negative of player 2’s payoff), a saddle point is a Nash equilibrium of the game, whether neither player can improve his payoff given his opponent’s strategy. The Minimax Theorem establishes that in zero-sum games with finitely many actions and mixed strategies, a Nash equilibrium (=saddle point) exists, and that such points include precisely those strategy pairs in which each player’s strategy maximizes his worst-case payoff against possible strategies of his opponent.
If the two are equal, then write
where is called the value of the game. In this case, there exist optimal strategies for the first and second players.
A necessary and sufficient condition for a saddle point to exist is the presence of a payoff matrix element which is both a minimum of its row and a maximum of its column. A game may have more than one saddle point, but all must have the same value.
Linear programming model for the problem formulated in R studio-
R- code for the following is given as-
require(lpSolve)
objective.i<- c(2,1)
constt<- matrix(c(1,1,1,0,1,0,1,0,0,1), ncol=2, byrow=TRUE)
rhs<- c(2,1,1,0,0)
direction.as<- c(“<=”,”<=”,”<=”,”>=”,”>=”)
optimum <- lp(“max”, objective.i, constt, direction.as, rhs,compute.sens = TRUE)
optimum$solution
optimum$objval
Output-
>optimum$solution
>optimum$objval
(e)Occasionally it is easy to solve the game.
If some entry aij of the matrix A has the property that
(1) aij is the minimum of the ith row, and
(2) aij is the maximum of the jth column, then we say aij is a saddle point.
If aij is a saddle point, then Player I can then win at least aij by choosing row i, and Player II can keep her loss to at most aij by choosing column j. Hence aij is the value of the game.
To solve this game (i.e. to find the value and at least one optimal strategy for each player) we proceed as follows.
- Test for a saddle point.
- If there is no saddle point, solve by finding equalizing strategies. We now prove the method of finding equalizing strategies of Section 1.2 works whenever there is no saddle point by deriving the value and the optimal strategies. Assume there is no saddle point. If a ≥ b, then bd, as otherwise c is a saddle point. Continuing thus, we see that db. In other words, if a ≥ b, then a>bdca. This shows that If there is no saddle point, then either a>b, bd and dc,
References
Akpan, N. P. &. I., 2016. Application of Linear Programming for Optimal Use of Raw. International Journal of Mathematics and Statistics Invention, 4(8), pp. 51-55.
Amol Nayakappa Patil, S. K., 2016. Optimal Diet Decision Using Linear Programming. International Research Journal of Engineering and Technology, 3(8).
E.M.Malathy, J. A. ,. B. M., 2016. LINEAR PROGRAMMING MODEL APPROACH FOR TRAFFIC ANALYSIS IN WIFI WIRELESS NETWORK. International Journal of Scientific Research Engineering & Technology (IJSRET), 5(4), pp. 212 -213.
Ibitoye Olayinka, A. K. O. K. K., 2015. ENTREPRENEUR DECISION MAKING PROCESS AND APPLICATION OF LINEAR PROGRAMMING TECHNIQUE. European Journal of Business, Economics and Accountancy, 3(5).
O.S. Balogun, E. J. T. A. H. M., 2012. Use Of Linear Programming For Optimal Production In A Production Line In Coca –Cola Bottling Company, Ilorin. International Journal of Engineering Research and Applications (IJERA), 2(5), pp. 2004-2007 .
Okolie Paul Chukwulozie1*, C. J. L. O. N. C. A. O. A. ,. J. E., 2015 . Optimization of the Production Mixture of Selected Raw Material for Plastic Production: A Case Study of Louis Carter Plastic Manufacturing Industry. American Journal of Engineering Research (AJER) , 4(11), pp. 13-25 .