You are on page 1of 17

GROUP 6

LINEAR PROGRAMMING

FERNANDEZ, MARIE ANTOINETTE

LAGAN, STEPHANIE

MADJUS, KAREN

MALACAD, JOSSA

MALANAY, MARK JUDIEL

PALISOC, JENNIFER

TABIANO, JESSA
Linear Programming

- Is a method to achieve best outcome in a mathematical model whose requirements


are represented by linear relationships.

- Is a widely used mathematical modeling technique to determine the optimum


allocation of scarce resources among competing demands.

- Also called Linear Optimization

Types of Solution to LP problem

1. Graphical Method
- method of solving the problem through graphs, curves and other figures
2. Simplex Method
- is a search procedure that examines the sets of feasible solution

Linear Model consists of:

1. A set of Decision Variables


- set of quantities that need to be determined in order to solve the problem
2. An Objective Function
- objective of a linear programming problem will be to maximize or minimize
some numerical value.
3. A set of Constraints
- the inequalities limiting the problem at hand

Applications of Linear Programming

1. Business
2. Industrial
3. Military
4. Economic
5. Marketing
6. Distribution

History

1. Linear Programming used in military context


2. George B. Dantzig developed Simplex Method
3. Leonid Kantorovich
4. John von Neumann
5. Tjalling Koopsman

An Introductory Example

-Problem Statement: A company makes two products (say, P and Q) using two
machines (say, A and B). Each unit of P that is produced requires 50 minutes
processing time on machine A and 30 minutes processing time on machine B. Each unit
of Q that is produced requires 24 minutes processing time on machine A and 33
minutes processing time on machine B.

Decision Variables

Decision variables describe the quantities that the decision makers would like to
determine. They are the unknowns of a mathematical programming model. Typically we
will determine their optimum values with an optimization method. In a general model,
decision variables are given algebraic designations such as 𝑥1 , 𝑥2 ,𝑥3 , … 𝑥𝑛 . The
number of decision variables is n, and 𝑥𝑗 is the name of the jth variable. In a specific
situation, it is often convenient to use other names such as 𝑥𝑖𝑗 or 𝑧(𝑖, 𝑗). As mentioned
earlier, a variety of symbols, with subscripts and superscripts as needed, can be used to
represent the variables of a linear program. As a general rule, it is better to use variable
names that help you remember what the variable represents in the real world. For this
general introduction, the variables will be represented -- very abstractly -- as X1 , X2 , . .
., Xn . (Note that there are n variables in this list.)

Objective Function

The objective function evaluates some quantitative criterion of immediate importance


such as cost, profit, utility, or yield. The general linear objective function can be written
as
𝑛

𝑧 = 𝑐1 𝑥1 + 𝑐2 𝑥2 + … + 𝑐𝑛 𝑥𝑛 = ∑ 𝑐𝑗 𝑥𝑗
𝑗=1

Here 𝑐𝑗 is the coefficient of the jth decision variable. The criterion selected can be either
maximized or minimized.
The objective function indicates how much each variable contributes to the value
to be optimized in the problem. The objective function takes the following general form:

where
ci = the objective function coefficient corresponding to the ith variable, and
Xi = the ith decision variable. \1

The coefficients of the objective function indicate the contribution to the value of the
objective function of one unit of the corresponding variable. For example, if the objective
function is to maximize the present value of a project, and Xi is the ith possible activity in
the project, then ci (the objective function coefficient corresponding to Xi ) gives the net
present value generated by one unit of activity i. As another example, if the problem is
to minimize the cost of achieving some goal, Xi might be the amount of resource i used
in achieving the goal. In this case, ci would be the cost of using one unit of resource i.

Note that the way the general objective function above has been written implies that
each variable has a coefficient in the objective function. Of course, some variables may
not contribute to the objective function. In this case, you can either think of the variable
as having a coefficient of zero, or you can think of the variable as not being in the
objective function at all.

Constraints

The variables are also subject to conditions, in the form of linear inequalities. These are
called constraints.

A constraint is an inequality or equality defining limitations on decisions. Constraints


arise from a variety of sources such as limited resources, contractual obligations, or
physical laws. In general, an LP is said to have m linear constraints that can be stated
as
𝑛 ≤
∑ 𝑐𝑖𝑗 𝑥𝑗 {=} 𝑏𝑖 , 𝑓𝑜𝑟 𝑖 = 1 … 𝑚
𝑗=𝑖 ≥

One of the three relations shown in the large brackets must be chosen for each
constraint. The number 𝑎𝑖𝑗 is called a "technological coefficient," and the number 𝑏1 is
called the "right-side" value of the ith constraint. Strict inequalities (<, >, and ) are not
permitted. When formulating a model, it is good practice to give a name to each
constraint that reflects its purpose.

Non- Negativity Restrictions

In most practical problems the variables are required to be nonnegative;

𝑥𝑗 ≥ 0, for 𝑗 = 1 … 𝑛

This special kind of constraint is called a nonnegativity restriction. Sometimes variables


are required to be nonpositive or, in fact, may be unrestricted (allowing any real value).
The variables must also satisfy the non-negativity condition: they can’t be negative.

Machine A is going to be available for 40 hours and machine B is available for 35 hours.
The profit per unit of P is $25 and the profit per unit of Q is $30. Company policy is to
determine the production quantity of each product in such a way as to maximize the
total profit given that the available resources should not be exceeded
Task: The aim is to formulate the problem of deciding how much of each product to
make in the current week as an LP.

Step 1: Defining the Decision Variables

-We often start with identifying decision variables (i.e., what we want to determine
among those things which are under our control).
The company wants to determine the optimal product to make in the current week. So
there are two decision variables: x: the number of units of P y: the number of units of Q

Step 2: Choosing an Objective Function

-We usually seek a criterion (or a measure) to compare alternative solutions. This yields
the objective function.
We want to maximize the total profit. The profit per each unit of product P is $25 and
profit per each unit of product Q is $30. Therefore, the total profit is 25x+30y if we
produce x units of P and y units of Q. This leads to the following objective function: max
40x+35y

Note that:
1: The objective function is linear in terms of decision variables x and
y (i.e., it is of the form ax + by, where a and b are constant).
2: We typically use the variable z to denote the value of the objective.
So the objective function can be stated as:
max z=25x+30y

Step 3: Identifying the Constraints

-In many practical problems, there are limitations (such as resource / physical / strategic
/
economical) that restrict our decisions. We describe these limitations using
mathematical
constraints.
The amount of time that machine A is available restricts the quantities to be
manufactured. If we produce x units of P and y units of Q, machine A should be used for
50x+24y minutes since each unit of P requires 50 minutes processing time on machine
A and each unit of Q requires 24 minutes processing time on machine A. On the other
hand, machine A is available for 40 hours or equivalently for 2400 minutes. This
imposes the following constraint: 50x + 24y ≤ 2400.
Similarly, the amount of time that machine B is available imposes the following
constraint: 30x + 33y ≤ 2100.
These constrains are linear inequalities since in each constraint the left-hand side of the
inequality sign is a linear function in terms of the decision variables x and y and the right
hand side is constant
Note: In most problems, the decision variables are required to be nonnegative, and this
should be explicitly included in the formulation.
This is the case here. So you need to include the following two non-negativity
constraints as well: x ≥0 and y ≥0
So the constraints we are subject to (s.t.)
are :
50x + 24y ≤ 2400, (machine A time)
30x + 33y ≤ 2100, (machine B time)
x ≥ 0,
y ≥ 0.
Now, write the LP by putting all the LP elements together.
Here is the LP:
max z= 25x + 30y
s.t. 50x + 24y ≤ 2400,
30x + 33y ≤ 2100,
x ≥ 0,
y ≥ 0.

Note: To be realistic, we would require integrality for the decision variables x and y. It
will lead to an integer program if we include integrality. Integer programs are harder to
solve and we will consider them in later lectures. For the moment, we leave out
integrality and consider this LP in this tutorial.

A Manufacturing Example
Problem Statement: An operations manager is trying to determine a production plan
for the next week. There are three products (say, P, Q, and Q) to produce using four
machines (say, A and B, C, and D). Each of the four machines performs a unique
process. There is one machine of each type, and each machine is available for 2400
minutes per week. The unit processing times for each machine is given inTable 1

Problem Statement (cont.): The unit revenues and maximum sales for the week are
indicated in Table 2. Storage from one week to the next is not permitted. The operating
expenses associated with the plant are $6000 per week, regardless of how many
components and products are made. The $6000 includes all expenses except for
material costs.

Task: Here we seek the “optimal” product mix-- that is, the amount of each product that
should be manufactured during the present week in order to maximize profits.
Formulate this as an LP
Step 1: Defining the Decision Variables
We are trying to select the optimal product mix, so we define three decision variables as
follows:
p: number of units of product P to produce,
q: number of units of product Q to produce,
r: number of units of product R to produce

Step 2: Choosing an Objective Function


Our objective is to maximize profit:
Profit = (90-45)p + (100-40)q + (70-20r – 6000
= 45p + 60q + 50r – 6000
Note:The operating costs are not a function of the variables in the problem. If we were
to drop the $6000 term from the profit function, we would still obtain the same optimal
mix of products. Thus, the objective function is z = 45p + 60q + 50r
Step 3: Identifying the Constraints
The amount of time a machine is available and the maximum sales potential for each
product restrict the quantities to be manufactured. Since we know the unit processing
times for each machine, the constraints can be written as linear inequalities as follows:
20p+10q +10r ≤ 2400 (Machine A)
12p+28q+16r ≤ 2400 (Machine B)
15p+6q+16r ≤ 2400 (Machine C )
10p+15q+0r ≤ 2400 (Machine D)
Observe that the unit for these constraints is minutes per week. Both sides of an
inequality must be in the same unit. The market limitations are written as simple upper
bounds.
Market constraints: P ≤ 100, Q ≤ 40, R ≤ 60.
Logic indicates that we should also include nonnegativity restrictions on the variables .
Nonnegativity constraints: P ≥ 0, Q ≥ 0, R ≥ 0.
By combining the objective function and the constraints, we obtain the LP model as
follows: max z=45p+60q+50r
s.t. 20p+10q+10r ≤ 2400
12p+28q+16r ≤ 2400
15p+6q+16r ≤ 2400
10p+15q+0r ≤ 2400
0 ≤ p ≤ 100
0 ≤ q ≤ 40
0 ≤ r ≤ 60
A Manufacturing Example: Optimal Solution

The optimal solution to this LP is P=81.82,Q=16.36,R=60 with the corresponding


objective value z=$7664. To compute the profit for the week, we reduce this value by
$6000 for operating expenses and get $1664. By setting the production quantities to the
amount specified by the solution, we find machine usage as shown in the following
table.

LINEAR PROGRAMMING GRAPHICAL METHOD

“Closed half plane”

 A half-plane is a planar region consisting of all points on one side of an infinite


straight line and no points on the other side. If the points on the line are included,
then it is called an closed half plane.
“Feasible solution”

 A feasible solution to a linear program is a solution that satisfies all constraints.

 A feasible solution is a set of values for the decision variables that satisfies all of
the constraints in an optimization problem. The set of all feasible solutions
defines the feasible region of the problem.

“Feasible region”

 A feasible region- feasible set, search space, or solution space is the set of all
possible points sets of values of the choice variables of an optimization problem
that satisfy the problems constraints, potentially including inequalities, equalities
and integer constraints.
“Convex Set”

 A convex set is a set of points such that given any two points X and Y in that set,
the line XY joining them lies entirely within the set.

Linear Programming: Applications, Definitions and Problems

Linear Programming:

An Essential Tour for Operation Research

Linear programming is a mathematical technique that has application to almost


all class of decision problems. This technique is applied for choosing the best
alternative from a set of feasible alternative. In Linear Programming objective function
as well as constraints can be expressed as linear mathematical function, which can be
used to solve the practical scheduling .

1. Production Management:

LP is applied for determining the optimal allocation of such resources as


materials, machines, manpower, etc. by a firm. It is used to determine the optimal
product- mix of the firm to maximize its revenue. It is also used for product smoothing
and assembly line balancing.

2. Personnel Management:

LP technique enables the personnel manager to solve problems relating to


recruitment, selection, training, and deployment of manpower to different departments
of the firm. It is also used to determine the minimum number of employees required in
various shifts to meet production schedule within a time schedule.

3. Inventory Management:
A firm is faced with the problem of inventory management of raw materials and
finished products. The objective function in inventory management is to minimise inven-
tory cost and the constraints are space and demand for the product. LP technique is
used to solve this problem.

4. Marketing Management:

LP technique enables the marketing manager in analysing the audience


coverage of advertising based on the available media, given the advertising budget as
the constraint. It also helps the sales executive of a firm in finding the shortest route for
his tour. With its use, the marketing manager determines the optimal distribution
schedule for transporting the product from different warehouses to various market
locations in such a manner that the total transport cost is the minimum.

5. Financial Management:

The financial manager of a firm, mutual fund, insurance company, bank, etc.
uses the LP technique for the selection of investment portfolio of shares, bonds, etc. so
as to maximise return on investment.

6. Blending Problem:

LP technique is also applicable to blending problem when a final product is


produced by mixing a variety of raw materials. The blending problems arise in animal
feed, diet problems, petroleum products, chemical products, etc. In all such cases, with
raw materials and other inputs as constraints, the objective function is to minimise the
cost of final product.

7. Military:

Linear programming was originally developed during World War II to plan


spending on military activities, so as to reduce the army's costs and increase losses for
the enemy. Linear programming remains one of many operational research techniques
used by armed forces worldwide.

Unbounded Solution or Infinite (Overlap or Extent)

An unbounded solution of a linear programming problem is a situation where objective


function is infinite. A linear programming problem is said to have unbounded solution if
its solution can be made infinitely large without violating any of its constraints in the
problem. Since there is no real applied problem which has infinite return, hence an
unbounded solution always represents a problem that has been incorrectly formulated.
Under the Simplex Method, an unbounded solution is indicated when there are no
positive values of Replacement Ratio i.e. Replacement ratio values are either infinite or
negative. In this case there is no outgoing variable.

The rule for recognizing unboundedness is that if at any iteration all the constraint
coefficients of any non-basic variable are zero or negative, then the solution space is
unbounded in that direction. Objective coefficient of that variable is negative in the case
of maximization or positive in the case of minimization, then the objective value is
unbounded as well.
Example: BICYCLE FACTORIES
A small business makes 3-speed and 10-speed bicycles at two different factories.
Factory A produces 16 3-speed and 20 10-speed bikes in one day while factory B
produces 12 3-speed and 14 10-speed bikes daily. It costs $1000/day to operate factory
A and $800/day to operate factory B. An order for 96 3-speed bikes and 140 10-speed
bikes has just arrived. How many days should each factory be operated in order to fill
this order at minimum cost?
Solution:
Minimize Cost C= 1000x + 800y
Let x represents the no. of units of Factory A
y represents the no. of units of Factory B

Constraints: x≥0, y≥0


16x + 12y ≥ 96
20x + 14y ≥ 140

16x + 12y = 96 20x + 20y = 140


X Y X Y
6 0 7 0
0 8 0 7
(6,0), (0,8) (7,0),(0,7)

16(0)+ 12(0) ≥ 96 20(0) + 14(0) ≥ 140


0 ≥ 96 0 ≥ 140
X X
Unbounded Feasible Region (the shaded part)

APPLICATION OF
LINEAR
PROGRAMMING

Steps to find the


optimal solution using
LP
1. Analyze the
problem
2. Formulate
objective function
3. Formulate
constraints function
4. Find the vertices
of your constraint
function
5. Plot the coordinates and make a line
6. Solve the vertices of the feasible region
7. Substitute every points to the objective function
8. Choose the optimal solution

STEP1: Analyze the problem

Jonathan has 240 acres of land. Planting corn will profit 40php per acre and oats will
profit 30php per acre. Corn takes 2 hours of labor per acre, oats require 1 hour.
Jonathan only have 320 hours available. How many acres of each should be planted
to maximize profits?

Let ‘x’ = # of acres of corn


‘y’= # of acres of oats

Step2: Formulate objective function

OBJECTIVE: MAXIMIZE THE PROFIT

P= 40x + 30y Objective Function


Profit = total income from the corn + total income from the oats
STEP3: Formulate constraints function
CONSTRAINTS:

x≥0, y≥0 “Non- negativity constraint”


Because there are no negative corns and oats.

x + y ≤ 240 C1 “total # of acres”


Because Jonathan has a limited acres of land which is 240 acres. That’s
why Jonathan should plant less than or equal to 240 acres.

2x + y ≤ 320 C2 “total # of hours”


Because it was told in the problem that Jonathan only have 320 hours
available. That’s why the we are restricted to maximize the profit with only
320 hours available.

STEP4: Find the vertices of your constraint function

C1 x + y ≤ 240 C2 2x + y ≤ 320

X Y X Y
0 240 0 240
240 0 240 0

The vertices/ points are


C1 (0,240) (240,0)
C2 (0,160) (320,0)

STEP5: Plot the coordinates and make a line


350
300 C2
250 Constraint Line
C1 (0,240) (240,0)
200 C2 (0,160) (320,0)
150
100
50
0 C1
0 100 200 300

Step 6: Solve the vertices of the feasible region

350
300 C2
(240,0)
250
200 ??? = (80,160)
150
FEASIBLE
100 REGION
50
0 (0,0) (160,0)
C1
0 100 200 300
“Elimination by Addition”

To find the value of X, we eliminate Y


multiplying C1 by -1

C1 -1 (x + y = 240)
-x – y = -240

C2 2x + y = 320
-x - y = -240
x = 80

To find the value of Y, we substitute


X to any constraint function

C1 x + y = 240
(80) + y = 240

y = 240 – 80
y = 160
x = 80, y = 160
(80,160)

STEP 7: Substitute every points to the objective function

Vertices Objective Profit


Function

P = 40x + 30y

(0,0) 40(0) + 30(0) 0

(0,240) 40(0) + 30(240) 7200

(80,160) 40(80) + 7000


30(160)

(160,0) 40(160) + 30(0) 6400

Step 8: Choose the optimal solution

Problem: How many acres of corn and oats should be planted to maximize profits?

Objective: Maximize profit

Answer: (0,240)

Jonathan should plant all oats and no corn to his 240 acres of land. Because
planting oats will give him the profit of 7200php.

You might also like