0% found this document useful (0 votes)
17 views

Linear Programming

Linear programming optimizes (minimizes or maximizes) variables subject to constraints to find an optimal solution. It can be applied in economic planning like transportation, manufacturing, and power systems. LP problems can be solved graphically, using the Simplex method, or Karmakar's method. The basic concepts include decision variables, constraints, the objective function, optimal and feasible solutions. An example problem is formulated and solved graphically to find the optimal number of tables and chairs to purchase to maximize profit. Linear programming is widely used in operations research, manufacturing, logistics, energy, and agriculture.

Uploaded by

ngugi muchau
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Linear Programming

Linear programming optimizes (minimizes or maximizes) variables subject to constraints to find an optimal solution. It can be applied in economic planning like transportation, manufacturing, and power systems. LP problems can be solved graphically, using the Simplex method, or Karmakar's method. The basic concepts include decision variables, constraints, the objective function, optimal and feasible solutions. An example problem is formulated and solved graphically to find the optimal number of tables and chairs to purchase to maximize profit. Linear programming is widely used in operations research, manufacturing, logistics, energy, and agriculture.

Uploaded by

ngugi muchau
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Introduction to Linear Programming

Mathematically, linear programming optimizes (minimizes or maximizes) the linear objective of


several variables subject to the given conditions/constraints that satisfies a set of linear
inequalities. Linear programming can be applied in planning economic activities such as
transportation of goods and services, manufacturing products, optimizing the electric power
systems, and network flows. LP problems can be solved using different techniques such as
Graphical, Simplex, and Karmakar's method.

Basic Concepts of LPP


Let's see the basic terminologies of linear programming:

 Decision variables are the variables which will be used as a function of the objective
function. These variables decide your output. The decision maker can control the value of
an objective function using the decision variable. When you solve any linear
programming problem, you first need to identify the decision variables.
 Constraints are a set of restrictions or situational conditions. Constraints can be in
equalities or inequalities form. Constraints restrict the value of decision variables.
 The objective function is a profit or cost function that maximizes or minimize. It is the
main target of making decisions.
 The optimal solution is one of the feasible solutions where the objective function is
either maximum or minimum, for example, maximum profit or minimum cost. It is the
best value of the objective function.

 A feasible solution is the set of possible values for decision variables that meets all of the
constraints. LP problem is feasible if at least one solution is feasible.
 The infeasible solution is the set of possible values for decision variables that do not
meet all the constraints, i.e., there is no optimal solution. LP problem is an infeasible
solution if no solution exists that meets all of the constraints.
 The feasible region is a region which covered from all the possible set of values that
meet the constraints or intersection of all the constraints. It includes all the inequalities,
equalities, and integer constraints.
 Non-negativity constraints for decision variables which accept only non-negative
values. Such constraints are greater than or equal to zero.

LPP Problem Formulation (With Example)


Formulating linear programming models involves the following steps:

 Identify the decision variables


 Determine the objective function
 Identify the constraints
 Define the non-negative constraints

In a linear programming problem, the decision variables, objective function, and constraints all
have to be a linear function

Problem Statement: A furniture dealer deals in only two items–tables and chairs. He has Rs
50,000 to invest and has storage space of at most 60 pieces. A table costs Rs 2500 and a chair Rs
500. He estimates that from the sale of one table, he can make a profit of Rs 250 and from the
sale of one chair a profit of Rs 75. He wants to know how many tables and chairs he should buy
from the available money to maximize his total profit, assuming that he can sell all the items
which he buys. In this example, you observe that –

1. The dealer can invest his money in buying tables or chairs or a combination of both.
Further, he would earn different profits by following different investment strategies.
2. His investment is limited to a maximum of Rs 50,000, and so is his storage space, which
is for a maximum of 60 pieces.)

Mathematical Formulation:

Let’s suppose he decides to purchase tables only and no chairs. So, he can buy 50000/2500 = 20
tables. In this case, he will earn a profit of 250 x 20 = Rs. 5000. Or he decides to purchase chairs
only and no tables. So, he can buy 50000/500 = 100 chairs.

In this case, he will earn a profit of 75 x 60 = Rs. 4500.

There could be many combinations of tables and chairs he could buy.

Let’s suppose he purchases X number of tables and Y number of chairs. So X and Y must be
non-negative.
1. The dealer has a maximum amount of Rs. 50000 to purchase tables and chairs hence –

2500 X + 500 Y <= 50000 (Investment constraints) or 5 * X + Y <= 100


………………………………………………………. Eq.1

1. The maximum number of units he can store is 60.

X + Y <= 60 ………………………………………………………. Eq.2

1. The dealer wants to purchase in such quantities so he can maximize his profit Z, hence
the equation would be –

Max Z : 250 X + 75 Y

Objective function: Max Z: 250 X + 75 Y

Subjected to constraints:

5 * X + Y <= 100,
X + Y <= 60 and
X,Y >= 0

Graphical Method to solve LPP in Spreadsheet


Linear Programming Example

Objective function: Max Z: 250 X + 75 Y

Subjected to constraints:

5 * X + Y <= 100,

X + Y <= 60 and

Where X,Y >= 0

Step 1: Let’s write the function in excel like shown below.


Step 2: After writing objective function and constraints in the spreadsheet, let's calculate values
for constraints C1 and C2. You can calculate values of by putting another variable value to zero.
Like for C1, at X = 0, Y’s value would be Y = 100 and at Y = 0, X’s value would be X = 20.
Similarly, for constraints C2.

Step-3: Now, after calculating values, let’s plot the graph. Select C1 constraints values, go to
insert and plot the scatter chart with smoothed lines. You might see your chart like this.
If it looks like this, don’t worry, follow the below steps to change it. Right-click on the chart, go
to Select Data, you will see two series there, remove Series 2 and Edit series 1.

Name series as C1 and change its X value to C1’s A column values and Y value to C1’s B
column values. And Click on, Ok. You will see your chart like the one below:
Step-4: 4. Again, go to Select Data by right-clicking on the chart and add another series. Name it
C2 and in X values select constraints C2 X column values and in Y values select constraints C2
Y column values. Your chart will look like the one below:

Step-5: Now the graph has been plotted, and you need to look at the feasible region:
Now you have 4 points (O, A, B, C) at feasible region area, you need to calculate objective
function values at all the points to see which point gives you the maximum value of the
objective.

Step-6: To calculate objective function values, Follow the below steps:

Calculate the objective function for each value of point:

 At point O the coordinate values of (X, Y) are (0, 0) Hence objective function value
would be = (2500+750) = 0
 At point A the coordinate values of (X, Y) are (0, 60) Hence objective function value
would be = (2500+753) = 4500
 At point B the coordinate values of (X, Y) are (20, 0) Hence objective function value
would be = (2503+750) = 5000
 At point C To find the coordinate values at point Z, you need to find the intersection
point of constrains line C1 and C2. You will use MMULT() and MINVERSE() function
to calculate the intersection of two equations.
 MMULT(MINVERSE(array),array) # This gives the values of the solution of equations
with two variables Or, =MMULT(MINVERSE(AB17:AC18), AE17:AE18), Before
using this formula, select X and Y values cells yellow highlighted cells and use this
function to calculate intersection point of two equation and press CTRL+SHIFT+ENTER
The final values of Z:

As you can see here in this linear maximization problem, you have got Z’s maximum value at
Point B, and the maximum value is Rs. 6250. Hence, in order to maximize profit, the dealer must
purchase 10 tables and 50 chairs.

Use-cases of LPP
Linear programming is applied to find optimal solutions for operations research. LP can find the
most optimum solution in given constraints and restrictions. LP is applicable in all kinds of
problems such as economic activities in agriculture, engineering, manufacturing, energy,
logistics, and supply chain.

 Engineers apply linear programming in the manufacturing and production industry to


optimize the available resources, which allows them to gain maximum profits.
 Logistics and transportation industry uses linear programming to find the shortest
path/route, travel time, and pricing strategy.
 Engineers apply linear programming in the energy sector. They optimize the electric
load, shortest distribution lines, and also optimize the electrical power grid design.
 In the agriculture sector, linear programming can be used by engineers to determine the
type of crop and quantity of crop they should grow to increase revenue efficiently.
 In the food industry, linear programming can help health managers and nutritionists to
plan dietary needs, and low-cost food item set in order to keep away from
noncommunicable disease.

You might also like