You are on page 1of 40

Farm System Modeling

(Module 4904-460)
Overview of Optimization

Special thanks to Cliff T. Ragsdale for the use of his


slides
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Outline
Objectives:
Optimization and Linear Programming is introduced with the help of a
simple example. A graphical approach is applied to solving the LP
problems.
Contents:
• Formulating LP problems
 Characteristics
 General mathematical form
• Examples
 Graphical Solution
 Anomalies
Main reference:
Ragsdale, CT (2008): Managerial decision modeling, chapter 2
3
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Farm management
• Management Science
What should we do?
 Operations research, Decision
science, Decision support
 Uses scientific methods to solve
business decision problems with
the help of computers, statistics,
and mathematics
Farm management as a sub
Farmers field, with specific methods and
applications, for example Whole
Farm Linear Programming
4
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Types of model uses


• Descriptive
How does the system work?

• Predictive
How will the system react to …?

• Prescriptive/Normative
What should we do to obtain the best solution…?

5
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Computer Modeling
Problem & Data Analysis

Conceptual model

Mathematical model

Computer model

Result interpretation 6
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Today:
Problem & Data Analysis

Conceptual model Decision problem

Mathematical model Linear programming

Spreadsheet
Computer model
(Excel, LibreOffice)

Result interpretation 7
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Mathematical Programming
• MP is a field of management science that finds
the optimal - or most efficient - way of using
limited resources to achieve the objectives of an
individual or of a business

• a.k.a. Optimization

Based on Ragsdale, Ch2


8
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Applications of Optimization

• Determining Product Mix


• Manufacturing
• Routing and Logistics
• Financial Planning
• …

Based on Ragsdale, Ch2


9
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Conceptual model:

Characteristics of Optimization Problems


Decisions
must be made so as to optimize the use of available
resources
Objectives
that the decision maker considers when deciding which
course of action is best
Constraints
are placed on the alternatives available to the decision
maker
Based on Ragsdale, Ch2
10
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Conceptual model  Mathematical model:


Optimization problems

• Decisions
expressed as variables X1, X2, …
• Objectives
expressed as function involving X1, X2, …
to be maximized or minimized
• Constraints
expressed as equations or inequations involving X1,
X2, …
11
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Mathematical Model:
General Form of an Optimization Problem

Objective function:
MAX (or MIN): 0(X1, X2, …, Xn)

Constraints:
subject to: f1(X1, X2, …, Xn) <= b1
:
fk(X1, X2, …, Xn) >= bk
:
fm(X1, X2, …, Xn) = bm

Note: If all the functions in an optimization are linear, the problem is a


Linear Programming (LP) problem
12
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Mathematical model:
Linear Programming (LP) Problems
MAX (or IN): c1X1 + c2X2 + … + cnXn
Subject to: a11X1 + a12X2 + … + a1nXn <= b1
:
ak1X1 + ak2X2 + … + aknXn >= bk
:
am1X1 + am2X2 + … + amnXn = bm

Based on Ragsdale, Ch2


13
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Linear Programming (LP) Some Terminology


Objective coefficients Activities

MAX (or IN): c1X1 + c2X2 + … + cnXn Capacities


Subject to: a11X1 + a12X2 + … + a1nXn <= b1
:
ak1X1 + ak2X2 + … + aknXn >= bk
Coefficients :
am1X1 + am2X2 + … + amnXn = bm

Left hand side Right hand side

14
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Conceptual Model:
An Example Problem
Blue Ridge Hot Tubs produces two types of hot tubs:
Aqua-Spas & Hydro-Luxes
Aqua-Spa Hydro-Lux
Pumps 1 1
Labor 9 hours 6 hours
Tubing 12 feet 16 feet
Unit Profit $350 $300
There are 200 pumps, 1566 hours of labor, and 2880
feet of tubing available
Based on Ragsdale, Ch2 15
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Conceptual problem  Mathematical model


5 Steps In Formulating LP Models

1. Understand the problem


2. Identify the decision variables
3. State the objective function as a linear combination of
the decision variables
4. State the constraints as linear combinations of the
decision variables
5. Identify any upper or lower bounds on the decision
variables

Based on Ragsdale, Ch2 16


Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Conceptual problem  Mathematical model


5 Steps In Formulating LP Models

1. Understand the problem


2. Identify the decision variables
X1=number of Aqua-Spas to produce
X2=number of Hydro-Luxes to produce

3. State the objective function as a linear combination of


the decision variables
• MAX: 350X1 + 300X2
Based on Ragsdale, Ch2 17
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Conceptual problem  Mathematical model


..continued
4. State the constraints as linear combinations of the
decision variables
1X1 + 1X2 <= 20 } pumps
9X1 + 6X2 <= 1566 } labor
12X1 + 16X2 <= 2880 } tubing

5. Identify any upper or lower bounds on the decision


variables
X1 >= 0
X2 >= 0
Based on Ragsdale, Ch2 18
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Blue Ridge Hot Tubs

MAX: 350X1 + 300X2

s.t.: 1X1 + 1X2 <= 200


9X1 + 6X2 <= 1566
12X1 + 16X2 <= 2880
X1 >= 0
X2 >= 0

Based on Ragsdale, Ch2 19


Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Solving LP Problems:
An Intuitive Approach
 Idea: Each Aqua-Spa (X1) generates the highest unit profit
($350), so let’s make as many of them as possible!
 How many would that be?
 Let X2 = 0
 1st constraint: 1X1 <= 200
 2nd constraint: 9X1 <= 1566 or X1 <=174
3rd constraint:
 12X1 <= 2880 or X1 <= 240
 If X2=0, the maximum value of X1 is 174 and the total profit is
$350*174 + $300*0 = $60,900
 This solution is feasible, but is it optimal?
 No!
Based on Ragsdale, Ch2 20
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Solving LP Problems: A Graphical Approach

• The constraints of an LP problem defines its


feasible region

• The best point in the feasible region is the


optimal solution to the problem

• For LP problems with 2 variables, it is easy to


plot the feasible region and find the optimal
solution

Based on Ragsdale, Ch2 21


Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Plotting the First Constraint


X2
250 (0,200)

200
Boundary line of pump constraint
150 X1 + X2 = 200

100

50 (0,200)

0
0 50 100 150 200 250 X1 22
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Plotting the Second Constraint


X2
250 (0,261)

200
Boundary line of labor constraint
150
9X1 + 6X2 = 1566

100

50 (174,0)

0
0 50 100 150 200 250 X1 23
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Plotting the Third Constraint


X2
250 (0,180)

200
Boundary line of tubing constraint
150
12X1 + 16X2 = 2880

100

50 (240,0)

0
0 50 100 150 200 250 X1 24
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Plotting A Level Curve of the Objective Function


X2
250 (0,116,67)

200
Objective function
150 350X1 + 300X2= 35000

100

50 (100,0)

0
0 50 100 150 200 250 X1 25
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

A Second Level Curve of the Objective Function


X2
250 (0,175)

200 Objective function


350X1 + 300X2= 35000
150
Objective function
100 350X1 + 300X2= 52500

50 (150,0)

0
0 50 100 150 200 250 X1 26
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Using A Level Curve to Locate the Optimal Solution


X2
250
Objective function
200
350X1 + 300X2= 35000

Optimal solution
150

100 Objective function


350X1 + 300X2= 52500
50

0
0 50 100 150 200 250 X1 27
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Calculating the Optimal Solution


 The optimal solution occurs where the “pumps” and “labor”
constraints intersect.
 This occurs where: X1 + X2 = 200 (1)
and 9X1 + 6X2 = 1566 (2)
 From (1) we have, X2 = 200 -X1 (3)
 Substituting (3) for X2 in (2) we have,
9X1 + 6 (20 -X1) = 1566
which reduces to X1 = 122
 So the optimal solution is,
X1=122, X2=200-X1=78
Total Profit = $350*122 + $300*78 = $66,100
Based on Ragsdale, Ch2 28
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Enumerating all corner points


• Instead of shifting the isoprofit line to identify the corner point with
the highest OV, we could also just calculate the OV for all corner
points and then see which is the highest.
• There are three kinds of corner points:
 The origin of the graph (0,0) if part of the feasible region
 The 2 points where the boundaries of the feasible region hit
the axes
 Corner points where two constraints intersect:
We find these by looking at the graph and solving the 2
variables/2 equations system posed by the two constraints.

Based on Ragsdale, Ch2 29


Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Enumerating all corner points


X2 Note: This technique will not work if
the solution is unbounded.
250
obj. value: $54,000
200 (0,180) obj. value: $64,000
(80,120)
150
obj. value: $66,100
100 (122,78)

50 obj. value: $0 obj. value: $60,900


(0,0) (174,0)

0
0 50 100 150 200 250 X1 30
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Summary of Graphical Solution to LP


Problems

1. Plot boundary line of each constraint


2. Identify the feasible region
3. Locate he optimal solution by either:
• Plotting level curves
• Enumerating the extreme points

Based on Ragsdale, Ch2 31


Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Understanding How Things Change

See file RagsdaleFig2-8.xls


(Answer question of Case 2-1 as exercise)

Based on Ragsdale, Ch2 32


Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Special Conditions in LP Models

• A number of anomalies can occur in LP problems:


 Alternate Optimal Solutions
 Redundant Constraints
 Unbounded Solutions
 Infeasibility

Based on Ragsdale, Ch2 33


Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Example of Alternate Optimal Solutions


X2
250
Objective function level curve
450X1 + 300X2 = 78300
200

150

100
Alternate optimal solutions
50

0
0 50 100 150 200 250 X1 34
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Example of a Redundant Constraint


X2
250
Boundary line of tubing constraint
200
Boundary line of tubing constraint
150 225 pumps available instead of 200
pumps
100
Boundary line of labour constraint
Feasible
50
Region

0
0 50 100 150 200 250 X1 35
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Example of an Unbounded Solution


X2
objective function
1000
X1 + X2 = 600
X1 + 2X2 = 400
objective function
800
X1 + X2 = 800

600

400

200
X1 + X2 =
400
0
0 200 400 600 80 1000 X1 36
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Example of Infeasibility
X2
250

X1 + X2 = 200
200 Feasible region
for second
150 constraint

100

50 Feasible region
for first
constraint
X1 + X2 = 150
0
0 50 100 150 200 250 X1 37
Based on Ragsdale, Ch2
Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Assignment #1

• Reading:
Review Ragsdale chapter 2
http://www.wadsworthmedia.com/marketing/sample_chapters/
0324312504_ch02.pdf
Prepare Ragsdale chapter 3

Based on Ragsdale, Ch2 38


Institut für Tropische Agrarwissenschaften (490d): Farm System Modeling (4904-460)_Optimization

Assignment #2
• Exercises (all on ILIAS):
 Formulate the LP problems for
1. Farm problem 1 (Zeddies)
2. Farm problem 2 (Ragsdale)
3. Investment problem 1 (Ragsdale, Ch.)

 Find a graphical solution


• for Farm problems 1 & 2

Based on Ragsdale, Ch2 39


Thank you very much
and have a nice day!

40

You might also like