Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

Linear Programming Formulation

Linear programming involves optimizing linear functions subject to linear constraints, focusing on decision variables, constraints, and an objective function. The document outlines the formulation of linear programming problems, including examples of maximizing profit and minimizing cost with specific constraints. It also discusses the conversion of linear programming problems to standard form and various methods for solving them.

Uploaded by

prabhanjan.cs22
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Linear Programming Formulation

Linear programming involves optimizing linear functions subject to linear constraints, focusing on decision variables, constraints, and an objective function. The document outlines the formulation of linear programming problems, including examples of maximizing profit and minimizing cost with specific constraints. It also discusses the conversion of linear programming problems to standard form and various methods for solving them.

Uploaded by

prabhanjan.cs22
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

LINEAR

PROGRAMMIN
G
Formulation
Linear Programming
Linear programming deals with optimization (max or
min) of linear functions subject to linear constraints.

Three components of a decision making problem

i. Defining of the decision variables of the problem

ii. Identification of the constraints under which the decision is


to be made
iii. Constructing the objective function to be optimized –
maximizing profit or minimizing cost
General Format of LP Model
Maximize or minimize Objective Function
Subject to:
Constraints
And non-negativity of decision variables

• Values of the decision variables that satisfy all


the constraints including non-negativity,
constitute a feasible solution.
• If the feasible solution maximizes the profit or
minimizes the cost it is an optimum feasible solution.
Sample: Linear Programming
Example: Max z = x + y x and y are called
decision variables / Objective
Subject to: x + 2y ≤ 90
2x + y ≤ 60 The inequalities are constraints

x≥0 Non negative constraints


y≥0

It is called Linear programming as the functions


are linearly related.
Problem Formulation
• Problem formulation or modeling is the process of
translating the verbal statement of a problem into a
mathematical statement.

• Formulating models is an art that can only be mastered


with practice and experience

• The accuracy and value of the conclusions arrived at


depends on how well a model represents the real
situation
Formulation of an LPP
• Identify the Decision Variables of interest and
express them as x1, x2, x3, …

• Ascertain the Objective of the problem

• Ascertain the Cost (in case of minimization) or the Profit


(in case of maximization) per unit of each decision
variable

• On the basis of the above data, write down the


Objective Function, Z, as a linear function of the
decision variables
LPP Formulation (contd.)
• Ascertain the Constraints representing the maximum
availability (of resources) or the minimum commitment
(demands, targets etc.) or equality

• Write the constraints in terms of decision variables as


“less than or equal to” (<=) type inequality or “greater
than or equal to” (>=) type inequality or “equal to” (=)
type equality; all constraints shall be linear

• Note that maximum availability leads to a <= type and


minimum commitment gives a >= type inequality
Formulation (contd.)
• Add non-negativity restriction as under:
xj >= 0; j = 1, 2, … n

Non-negativity constraints are a general feature of all


LPPs
The Mathematical Formulation
The Mathematical Formulation looks like:

Maximize (or Minimize) Z = c1x1 + c2x2 + …


Subject to constraints:
a11x1 + a12x2+ … <= b1 (Maximum availability)
a21x1 + a22x2+ … >= b2 (Minimum commitment)
a31x1 + a32x2+ … = b3 (Equality)

x1, x2, … >= 0 (Non-negativity restriction)
Example-1
A garment manufacturer has a production line making
two styles of shirts.
Style I needs 200 g of cotton thread, 300 g of Dacron
thread and 300 g of linen thread.

Corresponding requirements of style II are 200g, 200g


and 100g.
The net contributions are Rs.19.50 for style I and
Rs.15.90 for style II.
The available inventory of cotton thread, Dacron
thread and linen thread are, respectively, 24 kg, 26 kg
and 22 kg.

The manufacturer wants to determine the number of


each style to be produced with the given inventory.
Formulate the LPP model.
Step 1: Objective Function
• Decision variables: These are the numbers of
each style to be produced:
– Number of style I shirts, say x1
– Number of style II shirts, say x2

• Objective of the decision maker: Maximize total


contribution , given that the contribution per unit
is Rs. 19.50 for x1 and Rs. 15.90 for x2
• Maximize profit
• Hence the objective function is:
Max Z = 19.50 x1 + 15.90 x2
Step 2: Constraints
• Availability of cotton thread: Style I needs 200 g
and style II needs 200 g. 24,000 g is available. The
corresponding constraint is
200 x1 + 200 x2 <= 24,000
• Availability of dracon thread: Style I needs 300 g and
style II needs 200 g. 26,000 g is available. The
corresponding constraint is
300 x1 + 200 x2 <= 26,000
• Availability of linen thread: Style I needs 300 g and style
II needs 100 g. 22,000 g is available. The
corresponding constraint is
300 x1 + 100 x2 <= 22,000
Step 3: Non-negativity
Since the number of shirts cannot be negative,
add the non-negativity restriction x1, x2 >= 0 and
complete the LP formulation.

Note: For the time being we ignore another restriction on


x1 and x2 that they be integers. If that restriction is also
added we write:
x1, x2 >=0 and integers. Then this becomes an
Integer LP or ILP, which we will see later.
Solution of Example 1
Let x1 = number of style I shirts
x2 = number of style II shirts
Max Z = 19.50 x1 + 15.90 x2 (contribution)
Sub to: 200 x1 + 200 x2 <= 24,000 (cotton)
300 x1 + 200 x2 <= 26,000 (dacron)
300 x1 + 100 x2 <= 22,000 (linen)
x1, x2 >= 0 (non-negativity)
Example 2
An animal feed company must produce 200 kg
of a mixture consisting of ingredients A and B
daily. A costs Rs. 3 per kg and B costs Rs. 8 per
kg. Not more than 80 kg of A can be used and
at least 60 kg of B must be used.

The company wants to know how much of each


ingredient should be used to minimize cost.
Formulate the LPP.
Step 1: Objective Function
• Decision variables: Qty of each ingredient used:
– Quantity of ingredient A, say A kg
– Quantity of ingredient B, say B kg

• Objective of the decision maker: Minimize cost,


given that cost per kg is Rs. 3 for A; Rs. 8 for
B.

• Hence the objective function is:


Min Z = 3A + 8B
Step 2: Constraints
• Committed output is 200 kg of the mixture. The
corresponding constraint is
A + B = 200
• Not more than 80 kg of A can be used.
The corresponding constraint is
A <= 80
• At least 60 kg of B must be used. The
corresponding constraint is
B >= 60
Step 3: Non-negativity
Since the decision variables cannot be
negative, add the non-negativity
restriction A, B >= 0 and complete the LP
formulation.
-

Note that we do not have any integer restrictions


on the decision variables in this case.
Solution to Example 2
Min Z = 3A + 8B
Sub to: A + B = 200
A <= 80
B >= 60
A, B >= 0
Example 3
The vitamins V and W are found in two different
foods, F1 and F2. The respective prices per unit
of each food are Rs. 3 and Rs. 2.5.

One unit of F1 contains 2 units of vitamin V and


3 units of vitamin W.

One unit of F2 contains 4 units of vitamin V and


2 units of vitamin W.

The daily requirements of V and W are at least


60 units and 75 units respectively.

Formulate an LPP to meet the daily requirement of


the vitamins at minimum cost
• Decision variables:
Quantity of foods F1 and F2 required be x1 and x2.
• Objective: Minimize cost given that the costs per
unit of F1 and F2 are Rs. 3 and Rs. 2.5
respectively
• Hence the objective function is:
Min Z = 3 x1 + 2.5 x2

• Constraints:
– Requirement of V: 2x1 + 4 x2 ≥ 60
– Requirement of W: 3x1 + 2 x2 ≥ 75

• Non-negativity: x1, x2 >= 0


Solution to Example 3
Let x1 and x2 be the quantities of F1 and F2.
Minimise: 3x1 + 2.5 x2
s.t: 2x1 + 4 x2 ≥ 60 (Min requirement of V)
3x1 + 2x2 ≥ 75 (Min requirement of W)
x1 , x2 ≥ 0
Conversion of LPP to Standard form
A standard form has to follow the following
4 rules
1. The objective should be a Maximization
Minimize 4x+y+ z Maximize -4x-y-z

2. All the variables in the object must have non negative


Constraints

x-y=6 x’-x’’ –y = 6
x+2z ≥ 24 x’-x’’+2z’-2z’’ ≥ 24
z≤0,y≥0 x , y, z ≥ 0
3. There should be no equalities.

2x+y = 5 2x + y ≥ 5
2x + y ≤ 5

4. All inequalities must be less-than-equal-to


form
2x+ y ≥ 24 -2x –y ≤ -24
Conversion from Standard to Slack form

Max 3x+2y
Sub : x + y ≤ 7
2x-y ≤ 2
x,y≥0

Max 3x + 2y
Sub : s1 = 7-x-y x, y are non basic variables
s1 and s2 are basic variables
s2 = 2-2x - y
x,y≥0
• A company receives in sales Rs20/- per book and
Rs18/- per calculator.
• The cost per unit to manufacture each book and
calculator are Rs5/- and Rs4/- respectively.
• The monthly (30 days) manufacturing cost must
not exceed Rs27,000/- per month.
• If the manufacturing equipment used by the
company takes 5 minutes to produce a book and
15 minutes to produce a calculator, how many
books and calculators should the company make
to maximize profit?

• Determine the max profit the company earns in


*
a 30 day period. Linear Programming 26
Objective: Max S= 20B+18C
Constraints: 5B+4C<=27000
5B+15C<=43200
(30*24*60=43200)
Non negative constraints : B ≥ 0 C ≥ 0

* Linear Programming 27
B C Sales
5400 0 108000
0 2880 51840
4221 1473 110,934

Objective: S= 20B+18C
Profit=Sales-Cost=110934-27000=83934/-

* Linear Programming 28
Approaches to solve LPP
1. Graphical method
2. Simplex algorithm
3. Dual Simplex Method
4. Interior point method
Feasible Solution
Optimal solution
A bakery produces cookies , biscuits and bread. They sell each of
these at 6 , 5 , 4 respectively.
To bake each of the above they source flour , butter , sugar from the
market .
Cookies take 2 units flour, 1 unit butter and 2 units Sugar
Biscuits take 1unit flour, 2 units butter and 2 units Sugar
Bread takes 1 unit flour, 2units butter and 2 units Sugar.

Their inventory has 18 units of flour , 30 units of butter and 24 units of


Sugar respectively.

Using Simplex algorithm find out the maximum profit the company can
make by selling the above items.
Niki holds two part-time jobs, Job I and Job II. She never
wants to work more than a total of 12 hours a week. She
has determined that for every hour she works at Job I, she
needs 2 hours of preparation time, and for every hour she
works at Job II, she needs one hour of preparation time,
and she cannot spend more than 16 hours for preparation.
If she makes $40 an hour at Job I, and $30 an hour at Job
II, how many hours should she work per week at each job
to maximize her income?
Solution: Z=400 , x1= 4 , x2=8

You might also like