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

IT257 DAA Linear Programming

The document introduces linear programming and its components. It provides examples of decision and optimization problems that can be modeled as linear programs. These include problems related to forest protection, pollution minimization, and renewable energy investment. It then describes the formulation of a linear programming problem including defining decision variables, the objective function, and constraints. Finally, it formulates a nature recreation site allocation problem as a linear program to maximize visitor hours given land and budget constraints.

Uploaded by

Simhadri Sevitha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

IT257 DAA Linear Programming

The document introduces linear programming and its components. It provides examples of decision and optimization problems that can be modeled as linear programs. These include problems related to forest protection, pollution minimization, and renewable energy investment. It then describes the formulation of a linear programming problem including defining decision variables, the objective function, and constraints. Finally, it formulates a nature recreation site allocation problem as a linear program to maximize visitor hours given land and budget constraints.

Uploaded by

Simhadri Sevitha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Topics in Computational Sustainability:

Introduction to Linear Programming


Strategic Decision Making (SDM)
Computational Problems
Inputs
Decision Problems
(e.g., Yes or No decision: Can it be done and how?)
or
Problem
Outputs
Optimization Problems
(e.g., What’s the optimal solution and how?)

Decision Problem Decision Problem Optimization Problem Optimization Problem


(Graph Coloring) (Set Covering) (Linear Programming) (Knapsack Problem)

Can we color a Can we protect How to minimize What Renewable Energy


map with 4 colors? the forest with Pulp mill pollution? Investments should the
10 forest rangers? Green Power Company
pick to maximize profit?
Decision/Optimization Individual
Problems Perspective

Linear Non-linear

Social
Deterministic Stochastic
Perspective

Single-Agent Multi-Agent

Solution Methods

Exact or Complete Incomplete, Sampling, Simulation


Approximation Algorithms Markov Chain
Linear/Mixed/ Network Flow Monte Carlo Methods
Simulated Annealing
Integer/Quadratic (e.g.. Shortest Path)
Local Search Agent Based Simulation
Programming Non-Linear Programming
Genetic Algorithms Computable General Equilibrium
Dynamic Programming Branch and Bound Sampling Based Methods Meta-heuristic Methods
Stochastic Programming Others… Particle Swarm Optimization Others…
Optimization: Mathematical Program

▪ Optimization Problem in which the objective and


constraints are given as mathematical functions
and functional relationships.
Minimize f(x1, x2, …, xn)
Subject to (s.t.):
g1(x1, x2, …, xn) = ,  ,  b1
g2(x1, x2, …, xn) = ,  ,  b2

gm(x1, x2, …, xn) = ,  ,  bm
Linear Programming

Linear Programming
Linear Programming (LP)
▪ Linear – All the functions are Linear
Ex:f(x1, x2, …, xn)= c1x1 + c2 x2 + … cn xn
▪ Programming – doesn’t refer to Computer Programming,
but refers to “planning” of activity to find an optimal result
i.e., reaches the specified goal (the best solution) (according
to the mathematical model) among all feasible alternatives.
▪ Linear Programming (LP)
• LP has gained widespread industrial acceptance since 1950
for on-line optimization, blending etc.
Components of a Linear Programming Model

▪ A Linear Programming (LP) Model Consists of:


– A Set of Decision Variables

– A (Linear) Objective Function

– A Set of (Linear) Constraints


Linear Programming (LP) Problems
Linear Programming

Both objective function and constraints are linear.


Solutions are highly structured and can be rapidly obtained.
• Linear Constraints can arise due to:
1. Production Limitations for example: Equipment Limitations,
Storage Limits, Market Constraints.
2. Raw Material Limitation
3. Safety Restrictions, for example: Allowable Operating Ranges
for Temperature and Pressures.
4. Physical Property Specifications for example Product Quality
Constraints when a blend property can be calculated
n
as an
average of pure component properties: P =
i =1
yP 
i i

5. Material and Energy Balances


- Tend to yield equality constraints.
- Constraints can change frequently (daily or hourly).
Linear Programming (LP) Problems
Linear Programming

• Effect of Inequality Constraints


- Consider Linear and Quadratic Objective Functions on the next slide.
- For the LP problem, the optimum must lie on one or more constraints.
•Generic Statement of the LP Problem:
n
max f =  ci xi
i =1

subject to (s. t.): xi  0 i = 1, 2,..., n


n

a
j =1
ij x j  bi i = 1, 2,..., n

• Solution of LP Problems
- Simplex Method (Dantzig, 1947)
- Examine only constraint boundaries
- Very efficient, even for large problems
Steps in Setting up a LP
1. Determine and Label the Decision Variables.
2. Determine the Objective and Use the Decision Variables
to write an expression for the Objective Function.
3. Determine the Constraints - Feasible Region.
1. Determine the Explicit Constraints and write a functional
expression for each of them.
2. Determine the Implicit Constraints (Nonnegativity Constraints).
Nature Connection: Recreational Sites

Nature Connection is planning two new public recreational sites: The


forested wilderness area and a sightseeing and hiking park. They
own 80 hectares of forested wilderness area and 20 hectares suitable
for the sightseeing and hiking park but they don’t have enough resources
to make the entire areas available to the public. They have an overall
budget of $120K per year. They estimate a yearly management and
maintenance cost of $1K per hectare for the forested wilderness area,
and $4K per hectare for the sightseeing and hiking park. The expected
average number of visiting hours a day per hectare are: 10 for the forest
and 20 for the sightseeing and hiking park.

Question: How many hectares should Nature Connection allocate


to the public sightseeing and hiking park and to the public forested
wilderness area, in order to maximize the amount of recreation, (in
average number of visiting hours a day for the total area to be open to
the public, for both sites) given their budget constraint?
Problem Formulation as a LP
1. Decision Variables

x1 – # hectares to allocate to the public forested wilderness area


x2 – # hectares to allocate the public sightseeing and hiking park

2. Objective Function

Max {Z = 10 x1 + 20 x2}

3. Constraints
x1 <= 80
x2 <= 20
x1 + 4 x2 <= 120

x1 >= 0; x2 >= 0 Non-negativity constraints


Formulation of the Problem as a Linear Program
Nature Connection is planning two new public
recreational sites: a forested wilderness area 1. Decision Variables
and a sightseeing and hiking park. They own 80
hectares of forested wilderness area and 20 x1 – # hectares to allocate to the public
hectares suitable for the sightseeing and hiking forested wilderness area
park but they don’t have enough resources to x2 – # hectares to allocate the public
make the entire areas available to the public. sightseeing and hiking park
They have an annual budget of $120K so that
they can estimate the annual management and
maintenance cost of $1K per hectare, for the 2. Objective Function
forested wilderness area, and $4K per hectare
Max {Z = 10 x1 + 20 x2}
for the sightseeing and hiking park. The
expected average number of visiting hours a
day per hectare are: 10 for the forest and 20 for 3. Constraints
the sightseeing and hiking park.
x1 <= 80 Land for forest
Question: How many hectares should the x2 <= 20 Land for Park
Nature Connection allocate to the public
sightseeing and hiking park and to the public
x1 + 4 x2 <= 120 Budget
forested wilderness area, in order to x1 >= 0; x2 >= 0 Non-negativity constraints
maximize the amount of recreation, (in
average number of visiting hours a day for
total area to be open to the public, for both
sites) given their budget constraint?
x2-Park

x1 <= 80 Max {Z = 10 x1 + 20 x2}

x1 <= 80
x2 <= 20
x1 + 4 x2 <= 120

50 x1 >=0; x2 >= 0

30

20 x2 <= 20

10 Feasible Region

20 40 60 80 100 120 x1-Forest


x2-Park

The vector representing the gradient of Max {Z = 10 x1 + 20 x2}


the objective function is given by:

x1 <= 80
x2 <= 20
x1 + 4 x2 <= 120

50 x1 >=0; x2 >= 0

30

20

10 Feasible Region

20 40 60 80 100 120 x1-Forest


x2-Park

The vector representing the gradient of Max {Z = 10 x1 + 20 x2}


the objective function is given by:

x1 <= 80
x2 <= 20
x1 + 4 x2 <= 120

50 x1 >=0; x2 >= 0

Isobenefit lines (for different forest and park areas)


30
10 x1 + 20 x2 = Z
20 x2 = - ½ x1 + Z*

10
Z = 600

20 40 60 80 100 120 x1-Forest


x2-Park

The vector representing the gradient Max {Z = 10 x1 + 20 x2}


of the objective function is given by:
x1 <= 80
x2 <= 20
x1 + 4 x2 <= 120

50 x1 >=0; x2 >= 0

Isobenefit lines (for different forest and park areas)


30
x2 = - ½ x1 + Z*
20

10 Z* = 10 (80) + 20 (10) = 1000


Z = 200 Z = 600

20 40 60 80 100 120 x1-Forest


Summary of the Graphical Method

▪ Draw the constraint boundary line for each constraint. Use the origin (or any
point not on the line) to find which side of line is permitted by the constraint.
▪ Find the feasible region by determining where all the constraints are
satisfied simultaneously.
▪ Determine the slope of one objective function line (which is perpendicular to
its gradient vector). All other objective function lines will have same slope.
▪ Move a straight edge with this slope through the feasible region in the
direction of improving values of the objective function (which is the direction
of the gradient). Stop at the last instant that the straight edge still passes
through a point in the feasible region. This is optimal objective function line.
▪ A feasible point on the optimal objective function line is an optimal solution.
x2-Park No Feasible Solutions – Why?

x1 <= 80 Max {Z = 10 x1 + 20 x2}

x1 <= 80
x2 <= 20
x1 + 4 x2 <= 120
x1 + x2 >= 100
50

x1 >=0; x2 >= 0

30

20 x2 <= 20

10 Feasible Region

20 40 60 80 100 120 x1-Forest


x2-Park Multiple Optimal Solutions – Why

x1 <= 80 Max {Z = x1 + 4 x2}

x1 <= 80
x2 <= 20
x1 + 4 x2 <= 120

50
x1 >=0; x2 >= 0

Isoprofit lines (for different forest and park areas)


30
x2 = - 1/4 x1 + Z*
20 x2 <= 20

10

20 40 60 80 100 120 x1-Forest


x2-Park Unbounded – Why?
Z = 440

Z = 320 Max {Z = x1 + 4 x2}

x1 <= 80
x1, x2 >=0
x1 <= 80

30

20

10 Z = 120

80 120 x1-Forest
Key Categories of LP Problems

➢ Resource-Allocation Problems
➢ Cost-benefit-trade-off Problems
➢ Distribution-Network Problems
➢ Mixed Problems
Second Example: Keeping the River Clean

Cost-benefit-trade-off problems

Choose the mix of levels of various activities to


Achieve the minimum acceptable levels for
various benefits at a minimum cost.
Second Example: Keeping the River Clean
A pulp mill in Maine makes mechanical and chemical pulp, polluting the river in which it spills
its spent waters. This has created several problems, leading to a change in management.
The previous owners felt that it would be too expensive to reduce pollution, so they decided
to sell the pulp mill. The mill has been bought back by the employees and local businesses,
who now own the mill as a cooperative. The new owners have several objectives:
(i) – to keep at least 300 people employed at the mill (300 workers a day);
(ii) – to generate at least $40,000 of revenue per day
They estimate that this will be enough to pay operating expenses and yield a return that will
keep the mill competitive in the long run. Within these limits, everything possible should be
done to minimize the pollution.
Both the chemical and mechanical pulp units require the labor (workforce) of one worker for
1 day (1 workday, wd) per ton produced;
Mechanical pulp sells at $100 per ton; Chemical pulp sells at $200 per ton;
Pollution is measured by the Biological Oxygen Demand (BOD). One ton of mechanical pulp
produces 1 unit of BOD; One ton of chemical pulp produces 1.5 units of BOD.
The maximum capacity of the pulp mill is to make the mechanical pulp is 300 tons per day,
and for chemical pulp is 200 tons per day. The two manufacturing processes are statistically
independent (mechanical pulp line cannot be used to make chemical pulp and vice versa).
▪ The Pollution, Employment, and the Revenues result from the Production of both
types of Pulp (Chemical and Mechanical). So a natural choice for the variables is:
Decision Variables
▪ x1 amount of mechanical pulp produced (in tons per day, or t/d) and
▪ x2 amount of chemical pulp produce (in tons per day, or t/d
▪ Minimize Z = 1 x1 + 1.5 x2
(BOD/day) (BOD/t) (t/d) (BOD/t) (t/d)
Subject to (s.t.):
1 x1 + 1 x2 >= 300 Workers/day
(wd/t) (t/d) (wd/t)(t/d)
100 x1 + 200 x2 >= 40,000 revenue/day
($/t) (t/d) + ($/t)(t/d) $/d
x1 <= 300 (mechanical pulp)
(t/d) (t/d)
x2 <= 200 (chemical pulp)
(t/d) (t/d)
x1 >=0; x2 >= 0
Distribution Network Problems
Distribution-Network Problem
▪ The International Hospital Share Organization is a
non-profit organization that refurbishes a variety of
used equipment for hospitals of developing
countries at two international factories (F1 and F2).
One of its products is a large X-Ray machine.
▪ Orders have been received from three large
communities for the X-Ray machines.
Distribution-Network Problem
Shipping Cost for Each Machine
(Model L)
Community Community Community
To 1 2 3
From Output
12 X-ray
Factory 1 $700 $900 $800 machines
15 X-Ray
Factory 2 800 900 700 machines
10 8 9
Order Size
X-ray machines X-Ray machines X-Ray machines

Question: How many X-Ray machines (model L) should be shipped from


each factory to each hospital so that shipping costs are minimized?
The Distribution Network
C1 10 lathes
10 Model L
needed
$700/machine
$700/lathe
$700/machine needed

12 Model L
12 lathe
produced
F1 $900/machine
$900/lathe

$800/machine
$800/lathe
C2 88 lathes
Model L
needed
$800/machine
$800/lathe $900/lathe
$900/machine needed

15 lathes
15 Model L F2
produced

$700/lathe
$700/machine C3 99lathes
Model
L
needed
needed

Question: How many machines (model L) should be shipped from each


factory to each customer so that shipping costs are minimized?
▪ Activities – shipping lanes (not the level of production which
has already been defined)

– Level of each activity – number of machines of model L


shipped through the corresponding shipping lane.
→ Best mix of shipping amounts

Example:

Requirement 1: Factory 1 must ship 12 machines


Requirement 2: Factory 2 must ship 15 machines
Requirement 3: Customer 1 must receive 10 machines
Requirement 4: Customer 2 must receive 8 machines
Requirement 5: Customer 3 must receive 9 machines
Algebraic Formulation
Let Sij = Number of machines to ship from i to j (i = F1, F2; j = C1, C2, C3).

Minimize Cost = $700SF1-C1 + $900SF1-C2 + $800SF1-C3


+ $800SF2-C1 + $900SF2-C2 + $700SF2-C3

subject to
SF1-C1 + SF1-C2 + SF1-C3 = 12
SF2-C1 + SF2-C2 + SF2-C3 = 15
SF1-C1 + SF2-C1 = 10
SF1-C2 + SF2-C2 = 8
SF1-C3 + SF2-C3 = 9
and
Sij ≥ 0 (i = F1, F2; j = C1, C2, C3).
Algebraic Formulation
Let Sij = Number of machines to ship from i to j (i = F1, F2; j = C1, C2, C3).

Minimize Cost = $700SF1-C1 + $900SF1-C2 + $800SF1-C3


+ $800SF2-C1 + $900SF2-C2 + $700SF2-C3

subject to
Factory 1: SF1-C1 + SF1-C2 + SF1-C3 = 12
Factory 2: SF2-C1 + SF2-C2 + SF2-C3 = 15
Customer 1: SF1-C1 + SF2-C1 = 10
Customer 2: SF1-C2 + SF2-C2 = 8
Customer 3: SF1-C3 + SF2-C3 = 9
and
Sij ≥ 0 (i = F1, F2; j = C1, C2, C3).
Terminology and Notations
Terminology of Solutions in LP Model
▪ Solution – not necessarily the final answer to the problem!!!
▪ Feasible Solution – Solution that satisfies all the constraints
▪ Infeasible Solution – Solution for which at least one of the
constraints is violated
▪ Feasible Region – Set of all points that satisfies all constraints
(possible to have a problem without any feasible solutions)
▪ Binding Constraint – The left-hand side (LHS) and the right-
hand side (RHS) of the constraint are equal, I.e., constraint is
satisfied in equality. Otherwise the constraint is nonbinding.
▪ Optimal Solution – Feasible Solution that has the Best Value
of the Objective Function.
Largest Value → Maximization Problems
Smallest Value → Minimization Problems
▪ Multiple Optimal Solutions, no optimal solutions, unbounded Z
3D Feasible Region
Solving Linear Programs
Solution Methods for Linear Programs

▪ Simplex Method
– Optimum must be at the intersection of constraints
– Intersections are easy to find, change inequalities to equalities

x2

cT

x1
Solution Methods for Linear Programs

▪ Interior Point Methods


▪ Benefits
– Scales Better than Simplex

x2

-cT

x1
Standard Form of the LP Model

xi >= 0 , (i =1,2,…,n)

Other Variants:
Maximize Z (instead of minimizing Z; but Min Z = - Max -Z)
Some constraints have other signs (=; and >= )
Some variables have unrestricted sign, i.e., they are not
subject to (s.t.) the non-negativity constraints.
Solving Linear Programs
Violates Divisibility Assumption of LP
▪ Divisibility Assumption of Linear Programming:
Decision variables in a Linear Programming (LP)
model are allowed to have any values, including
the fractional (noninteger) values, that satisfy all the
functional and the nonnegativity constraints i.e.,
activities can be run at the fractional levels.

When the divisibility assumption is violated then


we need to apply Integer Linear Programming!!!

You might also like