role of optimization techniques in agriculture jaslam
TRANSCRIPT
Department of Agricultural Statistics, COA vellayani 1
MUHAMMED JASLAM P K 2015-19-005
IInd year MSc. Agricultural Statistics
Department of Agricultural Statistics, COA vellayani2
The only way to meet increasing demand of food, fibre and fuel for the ever increasing population is by increasing production per unit area which is possible by more scientific utilization of the resources and their optimal allocation to achieve maximum returns
(Hassan et al. 2015).Department of Agricultural Statistics, COA vellayani 3
Role of optimization techniques in agriculture
Department of Agricultural Statistics, COA vellayani4
A schematic view of modeling/optimization
process
Solution to model
To the real-world problem
assumptions, abstraction,data,simplifications
optimization algorithm
interpretation
mak
es se
nse?
chan
ge th
e m
odel
, as
sum
ption
s?
Real-world problem
Department of Agricultural Statistics, COA vellayani 5
Decision making???
Decision making always involves making a choice between various possible alternatives
production scheduling vehicle routing and scheduling feed mix product mixes fertilizer mix
Examples:
Department of Agricultural Statistics, COA vellayani 6
What is a model?Model: A schematic description of a system, theory, or phenomenon that accounts for its known or inferred properties and maybe used for further study of its characteristics.
Mathematical models– abstract models– describe the mathematical relationships
among elements in a system
Mathematical models are cheaper, faster, and safer than constructing and manipulating real systems.
Department of Agricultural Statistics, COA vellayani7
What do we optimize?
A real function of n variables
with or without constrains
),,,( 21 nxxxf
Department of Agricultural Statistics, COA vellayani 8
Optimization is the act of obtaining the best result under given circumstances.
Optimization can be defined as the process of finding the conditions that give the maximum or minimum of a function.
The optimum seeking methods are also known as mathematical- programming techniques
Optimization
Department of Agricultural Statistics, COA vellayani9
An Optimization Problem
Objective Function
Variables
Constraintscom
pone
nts
Once the design variables, constraints, objectives and the relationship between them have been chosen,the optimization problem can be defined.
Department of Agricultural Statistics, COA vellayani 10
nx
xx
x..2
1
xf
;0xg imi ,....,3,2,1
0xh jmj ,....,3,2,1
Statement of an optimization problem
An optimization problem can be stated as follows:
To find
Subject to the constraints
which minimizes or maximizes
Department of Agricultural Statistics, COA vellayani 11
Optimization methods
constraints
Optimization without
constraints
Optimization with constraints
Type of solved problem
Linear programming
Non Linear Optimization
Classification of Optimization methods
Department of Agricultural Statistics, COA vellayani 12
Classical optimization techniques
Single variable optimization
• Useful in finding the optimum solutions of continuous and differentiable functions
• These methods are analytical and make use of the techniques of differential calculus in locating the optimum points.
• Since some of the practical problems involve objective functions that are not continuous and/or differentiable, the classical optimization techniques have limited scope in practical applications.
Department of Agricultural Statistics, COA vellayani 13
Department of Agricultural Statistics, COA vellayani 14
Necessary condition
a point x* at which f’(x*)=0 is called a stationary point.
If a function f (x) is defined in the interval a ≤ x ≤ b and has a relative minimum at x = x*, where a < x* < b, and if the derivative df (x) / dx = f’(x) exists as a finite number at x = x*, then f’ (x*)=0
Sufficient condition
• Let f ’(x*)=f’’(x*)=…=f (n-1)(x*)=0, but f(n)(x*) ≠ 0. Then f(x*) is
– A minimum value of f (x) if f (n)(x*) > 0 and n is even– A maximum value of f (x) if f (n)(x*) < 0 and n is even– Neither a minimum nor a maximum if n is odd
Department of Agricultural Statistics, COA vellayani 15
Department of Agricultural Statistics, COA vellayani
16
A Citrus grower estimates that if 60 orange trees are planted; the average yield per tree will be 400 oranges. The average yield will decrease by 4 oranges per tree for each additional tree planted on the same acreage. How many trees should the grower plant to maximize the total yield?
Department of Agricultural Statistics, COA vellayani
To maximize! Let’s find the critical numbers:
Y’ (n) = 160 − 8n = 0 n = 160 / 8 = 20 is the only critical number.
Moreover, Y” (n) = −8 Y” (20) = −8 < 0.
By the second derivative test, Y has a local maximum at n = 20, which is an absolute maximum since it is the only critical number.
Let n= the number of additional trees. Y= the total yield = number of trees × the yield per tree.
Then:
Y (n) = (60trees + n · trees) (400oranges − n · 4oranges) = (60 + n) (400 − 4n) = 24, 000 + 160n − 4n2
17
The grower should plant 60+20 = 80 trees to maximize the total yield.
Department of Agricultural Statistics, COA vellayani 18
A landscape architect plans to enclose a 3000 square foot rectangular region in a botanical garden; she will use shrubs costing Rupees 15 per foot along three sides and fencing costing Rupees 10 per foot along the fourth side, find the minimum total cost.
Department of Agricultural Statistics, COA vellayani 19
If the rectangular region has dimensions x and y, then its area is A = x*y = 3000ft2. So y = 3000/x.
If y is the side with fencing costing Rupees 10 per foot, then the cost for this side is Rupees 10 y.
The cost for the three other sides, where shrubs costing Rupees 15 is used, is then Rupees 15 (2x+y).
Therefore the total cost is: C(x) = 10y + 15(2x + y) = 30x + 25y.
Since y = 3000/x,
Then C(x) = 30x + 25 * (3000/x) that we wish to minimize.
Department of Agricultural Statistics, COA vellayani 20
Since C’(x) = 30 – 25(3000/x2), then C’(x) = 0 for x2 = (25 * 3000)/30 = 2500.
Therefore, since x is positive, we have only one critical number in the domain which is x = 50ft.
Since C”(x) = 25*(6000/x3), we have C” (50) > 0. Thus, by the 2nd derivative test, C has a local minimum
At x = 50, and therefore an absolute minimum because we have only one critical number in the domain.
Hence, the minimum cost is C (50) = 3000, with the dimensions x = 50 ft and y = 3000/50 = 60 ft.
Necessary condition
If f(X) has an extreme point (maximum or minimum) at X=X* and if the first partial derivatives of f (X) exist at X*, then
Sufficient condition
A sufficient condition for a stationary point X* to be an extreme point is that the matrix of second partial derivatives (Hessian matrix)
of f (X*) evaluated at X* is
Positive definite when X* is a relative minimum pointNegative definite when X* is a relative maximum point
Multivariable optimization with no constraints
0*)(*)(*)(21
XXX
nxf
xf
xf
Department of Agricultural Statistics, COA vellayani 21
Department of Agricultural Statistics, COA vellayani 22
Example (Discriminating Monopolist)
23
A monopolist producing a single output has two types of customers. If it produces q1 units for type 1, then these customers are willing to pay a price of 50-5q1 per unit. If it produces q2 units for type 2, then these customers are willing to pay a price of 100-10q2 per unit.
The monopolist’s cost of manufacturing q units of
output is 90+20q.
In order to maximize profits, how much should the monopolist produce for each market?
Department of Agricultural Statistics, COA vellayani
Department of Agricultural Statistics, COA vellayani24
Profit is:
plan.supply maximizing -profit theis (3,4) definite negative is
.0,20,10
.402020100qf,30201050
qf
are points critical The)).(2090()10100()550(),(
2
12
2
21
2
22
2
21
2
222
111
21221121
f
qqf
qqf
qf
qf
qqqq
qqqqqqqqf
Multivariable optimization with equality constraints
• Problem statement:
Minimize f = f (X) subject to gj(X)=0, j=1,2,…..,m where
Here m is less than or equal to n, otherwise the problem becomes overdefined and, in general, there will be no solution.
• Solution:– Solution by direct substitution– Solution by the method of Lagrange multipliers
nx
xx
2
1
X
Department of Agricultural Statistics, COA vellayani 25
Department of Agricultural Statistics, COA vellayani 26
Solution by direct substitution
• Simple in theory
• Not convenient from a practical point of view as the constraint equations will be nonlinear for most of the problems
• Suitable only for simple problems
Department of Agricultural Statistics, COA vellayani 27
Necessary conditions for a general problem:
Minimize f(X)
subject to
gj (X)= 0, j=1, 2,….,m
The Lagrange function, L, in this case is defined by introducing one Lagrange multiplier j for each constraint gj(X) as
Solution by Lagrange multipliers
)()()()(),,,,,,,( 22112121 XXXX mmmn gggfxxxL
By treating L as a function of the n+m unknowns, x1, x2,…,xn,1, 2,…, m, the necessary conditions for the extremum of L, which also corresponds to the solution of the original problem are given by:
The above equations represent n+m equations in terms of the n+m
unknowns, xi and j
Department of Agricultural Statistics, COA vellayani 28
Solution by Lagrange multipliers
mjgL
nixg
xf
xL
jj
i
jm
jj
ii
,,2,1,0)(
,,2,1,01
X
The solution:
The vector X* corresponds to the relative constrained minimum of f(X) (sufficient conditions are to be verified) while the vector * provides the sensitivity information.
Department of Agricultural Statistics, COA vellayani29
Solution by Lagrange multipliers
*
*2
*1
*
*2
*1
*and
mnx
x
x
X*
Sufficient Condition
A sufficient condition for f(X) to have a constrained relative minimum at X* is that the quadratic Q defined by
evaluated at X=X* must be positive definite for all values of dX for which the constraints are satisfied.
If
is negative for all choices of the admissable variations dxi, X* will be a constrained maximum of f(X)
Department of Agricultural Statistics, COA vellayani 30
Solution by Lagrange multipliers
ji
n
j ji
n
i
dxdxxxLQ
1
2
1
ji
n
j ji
n
i
dxdxxxLQ )(
1
2
1
*X*,
Department of Agricultural Statistics, COA vellayani 31
Utility maximization from consumption of two goods x and y with the constraint of total income available (I) - 90 rupees and prices of these goods (p1)- 3 rupees for good x and (p2)- 2 rupees for good y with parallel solution.
Max x,y f(x,y) subject to g(x,y) = I
Department of Agricultural Statistics, COA vellayani 32
Utility (objective function) = U = u(x,y) = 2xy
Budget (constraint) = I = g(x,y) , I = p1x + p2y , 90 = 3x + 4y
L = UL = U(x,y) +λ ( I – g(x,y)) L =2xy +λ (90 – 3x -4y)
Lx = dL / dx = df(x,y)/dx – λ[dg(x,y)/dx] = 0 Lx = dL / dx = 2y – 3λ = 0
Ly = df(x,y)/dy – λ[dg(x,y)/dx] = 0 Ly = dL / dy = 2x – 4λ = 0
Lλ = dL/dλ = 1 – g(x,y) = 0 Lλ = dL / dλ = 90 – 3x – 4y = 0
from these three equations we have2y = 3λ ; λ = (2/3)y2x = 4λ ; λ = (1/2)x3x + 4y = 90 (2/3)y = (1/2)x4y = 3x Y = (3/4) x
Department of Agricultural Statistics, COA vellayani
3x + 4 * (3/4) x = 906x = 90
x = 15 units these are the values or x and y at which the Lagrange function is optimized.
45 + 4y = 904y = 90-454y = 45y= 11.25 units λ = 7.5
33
Department of Agricultural Statistics, COA vellayani 34
yyyxy
xyxxx
yx
B
LLgLLggg
H0
0
2
2
0
4),(
3),(
2
2
2
2
2
2
yLL
xyLL
yxLL
xLL
yyxgg
xyxgg
yy
yx
xy
xx
y
x
024203430
=48 >0
Department of Agricultural Statistics, COA vellayani 35
LINEAR PROGRAMMING
Department of Agricultural Statistics, COA vellayani 36
Mathematical programming is used to find the best or optimal solution to a problem that requires a decision or set of decisions about how best to use a set of limited resources to achieve a state goal of objectives.
A mathematical tool for maximizing or minimizing a quantity (usually profit or cost of production), subject to certain constraints.
Of all computations and decisions made by management in business, 50-90% of those involve linear programming.
– Conversion of stated problem into a mathematical model that abstracts all the essential elements of the problem.
– Exploration of different solutions of the problem.
– Finding out the most suitable or optimum solution.
Steps involved in mathematical programming
Formulation
Solution
Interpretation and What-if Analysis
37Department of Agricultural Statistics, COA vellayani
The Linear Programming Model (1)
Let: X1, X2, X3, ………, Xn = decision variables
Z = Objective function or linear function
Requirement:- Maximization of the linear function Z. Z = c1X1 + c2X2 + c3X3 + ………+ cnXn
subject to the following constraints:
where aij, bi, and cj are given constants.38Department of Agricultural Statistics, COA vellayani
Department of Agricultural Statistics, COA vellayani 39
• only two decision variables• • provide visualization
• large, real world LPP• most efficient and popular
method
GRAPHICAL METHOD
LIN
EAR
PRO
GRAM
MIN
GSEN
SITIVE ANALYSIS
Examples of LP Problems (1)
1. A Product Mix Problem
• The decision maker wishes to produce the combination of products that will maximize total income.
40Department of Agricultural Statistics, COA vellayani
E.g. Optimum crop-mix.
2. A Blending Problem
• The problem is to determine how much of each commodity should be purchased and blended with the rest so that the characteristics of the mixture lie within specified bounds and the total cost is minimized.
. E.g. Fertilizer mix, feed mix or diet problem.
Examples of LP Problems (3)
3. A Production Scheduling Problem
The problem is to determine the production schedule that minimizes the sum of production and storage costs.
41Department of Agricultural Statistics, COA vellayani
4. A Transportation Problem
The problem is to determine the amount to be shipped from each origin to each destination such that the total cost of transportation is a minimum.
5. A Flow Capacity Problem
The problem is to determine the maximum flow, or capacity of the network.
42Department of Agricultural Statistics, COA vellayani
What is Linear Programming?
Department of Agricultural Statistics, COA vellayani 43
A workshop has three (3) types of machines A, B and C; it can manufacture two (2) products 1 and 2, and all products have to go to each machine and each one goes in the same order; First to the machine A, then to B and then to C. The following table shows:
Formulate and solve using the graphical method a Linear Programming model for the situation that allows the workshop to obtain maximum gains.
Type of Machine Product 1 Product 2 Available hours per week
A 2 2 16B 1 2 12C 4 2 28
Profit per unit 5 8
Department of Agricultural Statistics, COA vellayani
44
2
22
2
1
4Product 1
Product 2
Decision Variables:• x 1: Product 1 Units to be produced weekly• x 2: Product 2 Units to be produced weekly
Objective Function: Maximize 21 85 xx
Subjected to :
02824
12211622
2,1
21
21
21
xxxxxxxx
45Department of Agricultural Statistics, COA vellayani
02,1 xx
46Department of Agricultural Statistics, COA vellayani
01622
2,1
21
xxxx
47Department of Agricultural Statistics, COA vellayani
012211622
2,1
21
21
xxxxxx
48Department of Agricultural Statistics, COA vellayani
02824
12211622
2,1
21
21
21
xxxxxxxx
21 85 xx Z=
@(0,6) z=40@(7,0) z=35@(6,2) z=46@(4,4) z=52
Department of Agricultural Statistics, COA vellayani 49
International Wool Company operates a large farm on which sheep are raised. The farm manager determined that for the sheep to grow in the desired fashion, they need at least minimum amounts of four nutrients (the nutrients are nontoxic so the sheep can consume more than the minimum without harm). The manager is considering three different grains to feed the sheep. Table lists the number of units of each nutrient in each kg of grain, the minimum daily requirements of each nutrient for each sheep, and the cost of each grain. The manager believes that as long as a sheep receives the minimum daily amount of each nutrient, it will be healthy and produce a standard amount of wool. The manager wants to raise the sheep at minimum cost.
Grain Min. Daily
req.1 2 3nutrient A 20 30 70 110nutrient B 10 10 0 18nutrient C 50 30 0 90nutrient D 6 2.5 10 14
cost in Rs/- 41 36 96solver
Department of Agricultural Statistics, COA vellayani50
321 963641 xxxz
110703020 321 xxx
Department of Agricultural Statistics, COA vellayani 51
52Department of Agricultural Statistics, COA vellayani
53Department of Agricultural Statistics, COA vellayani
54Department of Agricultural Statistics, COA vellayani
55Department of Agricultural Statistics, COA vellayani
SENSITIVITY ANALYSIS
56Department of Agricultural Statistics, COA vellayani
Optimal solutions to LP problems have been examined under deterministic assumptions.
Conditions in most real world situations are dynamic and changing.
After an optimal solution to a problem is found, input data values are varied to assess optimal solution sensitivity.
This process is also referred to as sensitivity analysis or post-optimality analysis.
57Department of Agricultural Statistics, COA vellayani
Sensitivity analysis determines the effect on optimal solutions of changes in parameter values of the objective function and constraint equations
Changes may be reactions to anticipated uncertainties in the parameters or the new or changed information concerning the model
58
Department of Agricultural Statistics, COA vellayani
Eg. OPTIMUM CROP MIX
Department of Agricultural Statistics, COA vellayani 59
Department of Agricultural Statistics, COA vellayani 60
Department of Agricultural Statistics, COA vellayani 61
Department of Agricultural Statistics, COA vellayani 62
Sonmez and Altin (2004) developed a linear programming model for irrigation scheduling and cropping pattern with adequate and deficit water supply in Harrran plain, Turkey. It was found that even with very low water supply, it is possible to keep the farm income at high levels.
John and Nair (1998) worked out an optimal Integrated Farming System (IFS) model through linear programming for small farmers (0.2 ha and less) comprising of 43 enterprises with a cropping intensity of 161 per cent and a cost benefit ratio of 1:2.5.
Department of Agricultural Statistics, COA vellayani63
Subhadra (2007) conducted a study to identify the optimum activity mix of dairy enterprise and crop production to enhance farm income with the given resource use efficiency and technology in Thrissur and Palakkad districts of Kerala. It was found that net income of different farm size groups could be enhanced in between Rs.4,275 to Rs.15,252 by adding two animals to large and small farmers each and three animals to marginal farmers.
Dey (2011) applied linear programming to study on optimum allocation of vegetable crops in Kakdwip block of South Parganas district in West Bengal. In the optimal crop plan, resources were allocated in favour of brinjal and pointed gourd. Net return earned from optimal crop plan increased by 49.79 percent over the net return earned in existing crop.
Department of Agricultural Statistics, COA vellayani
64
Traditionally, judgment based on experience has been the basis for planning in agriculture, but in creased specialization and the adoption of capital intensive production systems have stimulated the development of more formal planning methods based on the construction and analysis of a mathematical model.
Once a solution to the model has been derived and tested, the solution can be implemented and its performance is monitored and controlled.
Mathematical modeling is quicker and less expensive than using the trial-and-error approach or constructing and manipulating real systems.
CONCLUSION
65Department of Agricultural Statistics, COA vellayani
66
A Diet is to contain 300 units of carbohydtrates ,100 units of fat 60 units of protien,
Two foods A&B are available
10 units of carbohydrate 20 units of Fat 15 units of protien
25 units of carbohydrate 10 units of fat 20 units of protien.
Formulate and solve LPP so as to find the minimized cost for diet that Consist of mixture of these two foods and also meet the minimum nutrient requirements.
Cost of food A is Rs 6/unit and B is Rs 4/unit
Department of Agricultural Statistics, COA vellayani
1 UNIT
1 UNIT
A
B
67Department of Agricultural Statistics, COA vellayani
Minimize 21 46 xxz
subjectd to
0601051005153002510
3,2,1
21
21
21
xxxxxxxxx