SlideShare a Scribd company logo
1 of 30
Download to read offline
Day 1: Introduction to GAMS, Linear
Programming, and PMP
Day 1 NotesHowitt and Msangi 1
 Understand basic GAMS syntax
 Calibrate and run regional or farm models from
minimal datasets
 Calculate regional water demands
 Calculate elasticity of water demand
 Estimate the value of rural water demand for
water policy
Day 1 NotesHowitt and Msangi 2
 Linear Models
 Linear Programming: Primal
 Positive Mathematical Programming
Day 1 NotesHowitt and Msangi 3
Day 1 NotesHowitt and Msangi 4
 We can typically specify a model as a constrained or
unconstrained maximization
 Consider the general production function
◦ The price of the output q is p per unit output, and the cost
per unit x is w. Define profit Π .
 Consider the profit maximization problem
 Which we can write and solve as
Day 1 NotesHowitt and Msangi 5
1 2( , )q f x x=
1 1 2 2Max pq x w x wΠ= − −
1 2subject to ( , )q f x x=
( )1 1 2 2 1 2( , )L pq x w x w q f x xλ= − − − −
 Let’s assume linear production technology (Leontief)
so we can write
 We can rewrite the linear model with one output as
 Or, in more compact matrix notation
Day 1 NotesHowitt and Msangi 6
1 2 1 1 2 2( , )f x x a x a x= +
1 1 2 2Max pq x w x wΠ= − −
1 1 2 2subject to 0q a x a x− − =
1 2[ , , ]p w w= − −c'
1 2[1, , ]a a= − −a'
1 2' [ , , ]q x x=x
Max 'c x
subject to ' 0=a x⇒
 We will modify this example to include multiple
outputs and derive the LP problem
 Linear Programming
◦ Output levels and input availability should be specified as
inequality constraints
◦ Given a set of m inequality constraints in n variables ( x ), we
want to find the non-negative values of a vector x which
satisfies the constraints and maximizes an objective function
 Define as the quantity available for each input (or
“resource”) i
 Resources can be used in the production of multiple
outputs (i), reflected in technical coefficients
Day 1 NotesHowitt and Msangi 7
ib
ija
 Let’s define the matrix of technical coefficients and
vector of available inputs
 And we can write the general LP as
 Note that we have 2 (constrained) inputs and 2
outputs in our example, but this notation generalizes
to any number.
Day 1 NotesHowitt and Msangi 8
11 12
21 22
a a
a a
 
=  
 
A1
2
b
b
 
=  
 
b
Max 'c x
subject to ≤Ax b
 The Machakos example: Machakos_Primal_Day1.gms
 Leontief technology
 5 Crops: Inter Cropped, Maize, Beans, Tomato, Grass
 4 inputs (constrained): land, labor, chemicals, and
seed
 We will formulate the model
Day 1 NotesHowitt and Msangi 9
Max 'c x
subject to ≤Ax b
Day 1 NotesHowitt and Msangi 10
[ ]1 2 3 4 5' [ ]x x x x x Inter Cropped Maize Beans Tomato Grass= = −x
1
2
3
4
Land (hectares) 2.78
Labor (person days) 250
Chemicals (kg) 6,000
Seed (kg) 6,000
b
b
b
b
     
     
     =≡ =
     
     
    
b
11 12 13 14 15
21 22 23 24 25
31 32 33 34 35
41 42 43 44 45
1 1 1 1 1
40.3 159 126.5 136 0
8.75 83.9 12.03 181.3 30
43 44.6 50.3 22 0
a a a a a
a a a a a
a a a a a
a a a a a
   
   
   =
   
   
  
A
[ ]1 2 3 4 5' [ ] 13,563 8,350 31,125 37,704 24,980c c c c c=c
 Let’s multiply out a constraint and interpret
 Constraint 3:
 Interpretation: total use of chemicals in the
production of all crops must be less than or equal to
the total available chemicals
 Numerically:
 We will formulate and solve the model during the
afternoon session
Day 1 NotesHowitt and Msangi 11
31 1 32 2 33 3 34 4 35 5 3a x a x a x a x a x b+ + + + ≤
1 2 3 4 58.75 83.9 12.03 181.3 30 6,000x x x x x kg+ + + + ≤
 Minimizing the cost of inputs subject to a
minimum output level is equivalent to
maximizing profit subject to production
technology and the total input available
 For every Primal Problem there exists a Dual
Problem which has the identical optimal solution.
◦ Primal question: what is the maximum value of firm's output?
◦ Dual question: what is the minimum acceptable price that I
can pay for the firm's assets?
 The “dual” or “shadow” value has economic
meaning:
◦ It is the marginal value (or marginal willingness to pay)
of another unit of a given resource.
Day 1 NotesHowitt and Msangi 12
( )iλ
 Dual objective function
◦ Equal to the sum of the imputed values of the total resource
stock of the firm (amount of money that you would have to
offer a firm owner for a buy-out).
 Dual Constraints
◦ Set of prices for the fixed resources (or assets) of the firm that
would yield at least an equivalent return to the owner as
producing a vector of products ( x ), which can be sold for
prices ( c ), from these resources.
 Where do these values come from?
Day 1 NotesHowitt and Msangi 13
Max 'c x
subject to ( )≤Ax b λ
Day 1 NotesHowitt and Msangi 14
 Linear Programming shortfalls
◦ Overspecialization
◦ Will not reproduce an observed allocation without
restrictive constraints
◦ Tendency for “jumpy” response to policy
 Questions
◦ How do we calibrate to observed but limited data?
◦ How do we use these models for policy analysis?
◦ How do we introduce rich resource constraints?
 Perennial crops
 Climate change
 Technology
 Regulations
Day 1 NotesHowitt and Msangi 15
 Behavioral Calibration Theory
◦ We need our calibrated model to reproduce observed
outcomes without imposing restrictive calibration
constraints
 Nonlinear Calibration Proposition
◦ Objective function must be nonlinear in at least some
of the activities
 Calibration Dimension Proposition
◦ Ability to calibrate the model with complete accuracy
depends on the number of nonlinear terms that can
be independently calibrated
Day 1 NotesHowitt and Msangi 16
 Let marginal revenue = KSh 500/hectare
 Average cost = KSh 300/hectare
 Observed acreage allocation = 50 hectares
 Introduce calibration constraint to estimate
residual cost needed to calibrate crop
acreage to 50
Day 1 NotesHowitt and Msangi 17
Max500 300x x−
subject to 50x ≤
2λ
 We need to introduce a nonlinear term in the
objective function to achieve calibration. Here
we introduce a quadratic total cost function.
This is a common approach in PMP.
 Under unconstrained optimization, MR=MC
◦ For this condition to hold at x*=50 it must be that is the
difference at the constrained calibration value (MR-AC).
◦ We know that MR=MC
◦ Therefore , since we require MR=MC at x*=50
Day 1 NotesHowitt and Msangi 18
2
0.5TC x xα γ= +
2λ
2 MC - ACλ =
 We can now calculate the slope and intercept
of the nonlinear cost function which will allow
us to calibrate the mode without constraints
and , thus
 We can calculate the cost slope coefficient
 Given the slope, the intercept follows from the AC equation
 Verify that
Day 1 NotesHowitt and Msangi 19
MC xα γ= + 0.5AC xα γ= +
2( 0.5 )MC AC x xα γ α γ λ− = + − + =
2
*
2
x
λ
γ =
0.5 *AC xα γ= +
8 and 100γ α= =
 Combine this information and introduce the
calibrated cost function into an unconstrained
problem
 Verify that we get the observed allocation as
the optimal solution through standard
unconstrained maximization
◦ We see that x=50, which is our observed allocation and we have verified that
the model calibrates
Day 1 NotesHowitt and Msangi 20
2
500 0.5Max x x xα γΠ= − −
2
500 100 0.5(8)Max x x xΠ= − −
2
400 4Max x xΠ= −
 Now the model can be used for policy
simulations
 The unconstrained profit maximization
problem reproduces the observed base year
 We can introduce changes and evaluate the
response without restrictive calibration
constraints
 The method extends to multiple crops
Day 1 NotesHowitt and Msangi 21
 The PMP method extends to multiple crops
◦ PMP example: Machakos_QuadraticPMP_Day1.gms
 There are three stages to PMP
1. Constrained LP model is used to derive the dual
values for both resource and calibration
constraints
2. The calibration constraint dual values are used to
derive the calibration cost function parameters
3. The cost function parameters are used with the
base year data to specify the PMP model
Day 1 NotesHowitt and Msangi 22
 2 Crop example: wheat and oats
 Observed Data: 2 ha oats and 3 ha wheat
(total farm size of 5 hectares)
Day 1 NotesHowitt and Msangi 23
 We maintain the assumption of Leontief
production technology and assume that land
(input i=1) is the binding calibrating
constraint
 We can write the calibrated problem as
 PMP calibration proceeds in three stages
Day 1 NotesHowitt and Msangi 24
( )
3
2
0.5i i i i i i i j ij i
i j
Max p y x x x w a xα γ
=
− + −∑ ∑
subject to and= ≥Ax b x 0
 Stage 1
 Formulate and solve the constrained LP and
note the dual values ()
 We introduce a perturbation term to decouple
resource and calibration constraints
Day 1 NotesHowitt and Msangi 25
2
1
1
max ( ) ( )
5 ( )
3 ( )
2 ( )
w w w w o o o o
w o
w w
o o
y p w x y p w x
subject to
x x
x
x
λ
ε λ
ε λ
Π= − + −
+ ≤
≤ +
≤ +
 The optimal solution is when the wheat
calibration constraint is binding at 3.01
(wheat is the most valuable crop), and the
resource constraint ensures oats at 1.99
 Store the dual values for use in stage 2
Day 1 NotesHowitt and Msangi 26
2
1
1
max ( ) ( )
5 ( )
3 ( )
2 ( )
w w w w o o o o
w o
w w
o o
y p w x y p w x
subject to
x x
x
x
λ
ε λ
ε λ
Π= − + −
+ ≤
≤ +
≤ +
 Stage 2
 Derive the parameters of the quadratic total
cost function
◦ Use same logic as in the single crop example
 Notice two types of crops in the problem
depending on which constraint is binding
◦ Calibrated crops
◦ Marginal crops
 Calculate the cost intercept and slope for the
calibrated wheat crop
Day 1 NotesHowitt and Msangi 27
 Graphically
Day 1 NotesHowitt and Msangi 28
 Stage 3
 No restrictive calibration constraints
 Calibration checks
◦ Hectare allocation (all input allocation)
◦ Input cost = Value Marginal Product
 Can use the model for policy simulation
Day 1 NotesHowitt and Msangi 29
( )
3
2
0.5 ,i i i i i i i j ij i
i j
Max p y x x x w a x where i o wα γ
=
− + − =∑ ∑
0 5wx x+ ≤
 We have covered a range of topics
◦ Linear models
◦ Linear Programming
 Primal
 Dual
◦ Positive Mathematical Programming
 Single crop mathematical derivation
 Multiple crop generalization
 This afternoon we will revisit these topics in GAMS
◦ Intro.gms
◦ Machakos_Primal_Day1.gms
◦ Machakos_Dual_Day1.gms
◦ Machakos_QuadraticPMP_Day1.gms
Day 1 NotesHowitt and Msangi 30

More Related Content

What's hot

An Efficient Elliptic Curve Cryptography Arithmetic Using Nikhilam Multiplica...
An Efficient Elliptic Curve Cryptography Arithmetic Using Nikhilam Multiplica...An Efficient Elliptic Curve Cryptography Arithmetic Using Nikhilam Multiplica...
An Efficient Elliptic Curve Cryptography Arithmetic Using Nikhilam Multiplica...theijes
 
How to set up a Graphical Method Linear Programming Problem - Introduction
How to set up a Graphical Method Linear Programming Problem - IntroductionHow to set up a Graphical Method Linear Programming Problem - Introduction
How to set up a Graphical Method Linear Programming Problem - IntroductionEd Dansereau
 
Matrix multiplicationdesign
Matrix multiplicationdesignMatrix multiplicationdesign
Matrix multiplicationdesignRespa Peter
 
Linear Regression (Machine Learning)
Linear Regression (Machine Learning)Linear Regression (Machine Learning)
Linear Regression (Machine Learning)Omkar Rane
 
Taylor introms10 ppt_03
Taylor introms10 ppt_03Taylor introms10 ppt_03
Taylor introms10 ppt_03QA Cmu
 
How to use SVM for data classification
How to use SVM for data classificationHow to use SVM for data classification
How to use SVM for data classificationYiwei Chen
 
Amortized analysis
Amortized analysisAmortized analysis
Amortized analysisajmalcs
 
Dynamic Programming - Matrix Chain Multiplication
Dynamic Programming - Matrix Chain MultiplicationDynamic Programming - Matrix Chain Multiplication
Dynamic Programming - Matrix Chain MultiplicationPecha Inc.
 
Amortized Analysis of Algorithms
Amortized Analysis of Algorithms Amortized Analysis of Algorithms
Amortized Analysis of Algorithms sathish sak
 
4. linear programming using excel solver
4. linear programming using excel solver4. linear programming using excel solver
4. linear programming using excel solverHakeem-Ur- Rehman
 
Aoa amortized analysis
Aoa amortized analysisAoa amortized analysis
Aoa amortized analysisSalabat Khan
 
Integer Programming, Gomory
Integer Programming, GomoryInteger Programming, Gomory
Integer Programming, GomoryAVINASH JURIANI
 
Amortized Analysis
Amortized Analysis Amortized Analysis
Amortized Analysis sathish sak
 

What's hot (19)

An Efficient Elliptic Curve Cryptography Arithmetic Using Nikhilam Multiplica...
An Efficient Elliptic Curve Cryptography Arithmetic Using Nikhilam Multiplica...An Efficient Elliptic Curve Cryptography Arithmetic Using Nikhilam Multiplica...
An Efficient Elliptic Curve Cryptography Arithmetic Using Nikhilam Multiplica...
 
Greedy method
Greedy method Greedy method
Greedy method
 
Topic 4.2
Topic 4.2Topic 4.2
Topic 4.2
 
How to set up a Graphical Method Linear Programming Problem - Introduction
How to set up a Graphical Method Linear Programming Problem - IntroductionHow to set up a Graphical Method Linear Programming Problem - Introduction
How to set up a Graphical Method Linear Programming Problem - Introduction
 
Matrix multiplicationdesign
Matrix multiplicationdesignMatrix multiplicationdesign
Matrix multiplicationdesign
 
Linear Regression (Machine Learning)
Linear Regression (Machine Learning)Linear Regression (Machine Learning)
Linear Regression (Machine Learning)
 
Taylor introms10 ppt_03
Taylor introms10 ppt_03Taylor introms10 ppt_03
Taylor introms10 ppt_03
 
How to use SVM for data classification
How to use SVM for data classificationHow to use SVM for data classification
How to use SVM for data classification
 
Topic 4.1
Topic 4.1Topic 4.1
Topic 4.1
 
Greedy method by Dr. B. J. Mohite
Greedy method by Dr. B. J. MohiteGreedy method by Dr. B. J. Mohite
Greedy method by Dr. B. J. Mohite
 
Amortized analysis
Amortized analysisAmortized analysis
Amortized analysis
 
Dynamic Programming - Matrix Chain Multiplication
Dynamic Programming - Matrix Chain MultiplicationDynamic Programming - Matrix Chain Multiplication
Dynamic Programming - Matrix Chain Multiplication
 
Amortized Analysis of Algorithms
Amortized Analysis of Algorithms Amortized Analysis of Algorithms
Amortized Analysis of Algorithms
 
4. linear programming using excel solver
4. linear programming using excel solver4. linear programming using excel solver
4. linear programming using excel solver
 
Aoa amortized analysis
Aoa amortized analysisAoa amortized analysis
Aoa amortized analysis
 
Integer Programming, Gomory
Integer Programming, GomoryInteger Programming, Gomory
Integer Programming, Gomory
 
Vb scripting
Vb scriptingVb scripting
Vb scripting
 
Topic 2
Topic 2Topic 2
Topic 2
 
Amortized Analysis
Amortized Analysis Amortized Analysis
Amortized Analysis
 

Viewers also liked

Biosight: Quantitative Methods for Policy Analysis using GAMS
Biosight: Quantitative Methods for Policy Analysis using GAMSBiosight: Quantitative Methods for Policy Analysis using GAMS
Biosight: Quantitative Methods for Policy Analysis using GAMSIFPRI-EPTD
 
Quality Of Life of Elderly in India
Quality Of Life of Elderly in IndiaQuality Of Life of Elderly in India
Quality Of Life of Elderly in Indiaiosrjce
 
Biosight: Quantitative Methods for Policy Analysis: Multi Market Models
Biosight: Quantitative Methods for Policy Analysis: Multi Market ModelsBiosight: Quantitative Methods for Policy Analysis: Multi Market Models
Biosight: Quantitative Methods for Policy Analysis: Multi Market ModelsIFPRI-EPTD
 
360 Policy Implementation Presentation and Understanding.
360 Policy Implementation Presentation and Understanding.360 Policy Implementation Presentation and Understanding.
360 Policy Implementation Presentation and Understanding.Neville Shukla
 
Presentation on Trade policy 2072 Nepal
Presentation on Trade policy 2072 NepalPresentation on Trade policy 2072 Nepal
Presentation on Trade policy 2072 NepalBijay pandey
 
Policy instruments in practice.
Policy instruments in practice.Policy instruments in practice.
Policy instruments in practice.pasicUganda
 
Introducing Policy Implementation and Evaluation.
  Introducing Policy Implementation and Evaluation.  Introducing Policy Implementation and Evaluation.
Introducing Policy Implementation and Evaluation.pasicUganda
 
Policy Making Processes: Policy Implementation and Policy Evaluation
Policy Making Processes: Policy Implementation and Policy EvaluationPolicy Making Processes: Policy Implementation and Policy Evaluation
Policy Making Processes: Policy Implementation and Policy EvaluationMhd Faheem Aliuden
 
Instrument of trade policies
Instrument of trade policiesInstrument of trade policies
Instrument of trade policiesHuê Bùi Thị
 
Chapter 08_Conduct of Monetary Policy: Tools, Goals, Strategy, and Tactics
Chapter 08_Conduct of Monetary Policy: Tools, Goals, Strategy, and TacticsChapter 08_Conduct of Monetary Policy: Tools, Goals, Strategy, and Tactics
Chapter 08_Conduct of Monetary Policy: Tools, Goals, Strategy, and TacticsRusman Mukhlis
 
Instruments Of Trade Policy
Instruments Of Trade PolicyInstruments Of Trade Policy
Instruments Of Trade PolicyPANGO
 
Economic Policy
Economic Policy Economic Policy
Economic Policy domsr
 
TRADE POLICY OF PAKISTAN
TRADE POLICY OF PAKISTANTRADE POLICY OF PAKISTAN
TRADE POLICY OF PAKISTANNeelam Asad
 
International Trade Finance
International Trade FinanceInternational Trade Finance
International Trade Financeguestb7cb13
 
Foreign trade policy 2015 - 2020
Foreign trade policy 2015 - 2020Foreign trade policy 2015 - 2020
Foreign trade policy 2015 - 2020Arun Deva
 

Viewers also liked (20)

Biosight: Quantitative Methods for Policy Analysis using GAMS
Biosight: Quantitative Methods for Policy Analysis using GAMSBiosight: Quantitative Methods for Policy Analysis using GAMS
Biosight: Quantitative Methods for Policy Analysis using GAMS
 
Quality Of Life of Elderly in India
Quality Of Life of Elderly in IndiaQuality Of Life of Elderly in India
Quality Of Life of Elderly in India
 
Biosight: Quantitative Methods for Policy Analysis: Multi Market Models
Biosight: Quantitative Methods for Policy Analysis: Multi Market ModelsBiosight: Quantitative Methods for Policy Analysis: Multi Market Models
Biosight: Quantitative Methods for Policy Analysis: Multi Market Models
 
360 Policy Implementation Presentation and Understanding.
360 Policy Implementation Presentation and Understanding.360 Policy Implementation Presentation and Understanding.
360 Policy Implementation Presentation and Understanding.
 
Presentation on Trade policy 2072 Nepal
Presentation on Trade policy 2072 NepalPresentation on Trade policy 2072 Nepal
Presentation on Trade policy 2072 Nepal
 
Policy instruments in practice.
Policy instruments in practice.Policy instruments in practice.
Policy instruments in practice.
 
Policy Implementation
Policy Implementation Policy Implementation
Policy Implementation
 
Commercial policy
Commercial policyCommercial policy
Commercial policy
 
Economic policy of France
Economic policy of FranceEconomic policy of France
Economic policy of France
 
Introducing Policy Implementation and Evaluation.
  Introducing Policy Implementation and Evaluation.  Introducing Policy Implementation and Evaluation.
Introducing Policy Implementation and Evaluation.
 
Policy Making Processes: Policy Implementation and Policy Evaluation
Policy Making Processes: Policy Implementation and Policy EvaluationPolicy Making Processes: Policy Implementation and Policy Evaluation
Policy Making Processes: Policy Implementation and Policy Evaluation
 
Instrument of trade policies
Instrument of trade policiesInstrument of trade policies
Instrument of trade policies
 
Instrument Of Trade Policy(M)
Instrument Of Trade Policy(M)Instrument Of Trade Policy(M)
Instrument Of Trade Policy(M)
 
Instruments of Foreign Trade
Instruments of Foreign TradeInstruments of Foreign Trade
Instruments of Foreign Trade
 
Chapter 08_Conduct of Monetary Policy: Tools, Goals, Strategy, and Tactics
Chapter 08_Conduct of Monetary Policy: Tools, Goals, Strategy, and TacticsChapter 08_Conduct of Monetary Policy: Tools, Goals, Strategy, and Tactics
Chapter 08_Conduct of Monetary Policy: Tools, Goals, Strategy, and Tactics
 
Instruments Of Trade Policy
Instruments Of Trade PolicyInstruments Of Trade Policy
Instruments Of Trade Policy
 
Economic Policy
Economic Policy Economic Policy
Economic Policy
 
TRADE POLICY OF PAKISTAN
TRADE POLICY OF PAKISTANTRADE POLICY OF PAKISTAN
TRADE POLICY OF PAKISTAN
 
International Trade Finance
International Trade FinanceInternational Trade Finance
International Trade Finance
 
Foreign trade policy 2015 - 2020
Foreign trade policy 2015 - 2020Foreign trade policy 2015 - 2020
Foreign trade policy 2015 - 2020
 

Similar to Biosight: Quantitative Methods for Policy Analysis - Introduction to GAMS, Linear Programming

Biosight: Quantitative Methods for Policy Analysis: CES Production Function a...
Biosight: Quantitative Methods for Policy Analysis: CES Production Function a...Biosight: Quantitative Methods for Policy Analysis: CES Production Function a...
Biosight: Quantitative Methods for Policy Analysis: CES Production Function a...IFPRI-EPTD
 
Chapter 2 Linear Programming for business (1).pptx
Chapter 2 Linear Programming for business (1).pptxChapter 2 Linear Programming for business (1).pptx
Chapter 2 Linear Programming for business (1).pptxanimutsileshe1
 
Vcs slides on or 2014
Vcs slides on or 2014Vcs slides on or 2014
Vcs slides on or 2014Shakti Ranjan
 
CH-2 Linear Programing.pptx
CH-2 Linear Programing.pptxCH-2 Linear Programing.pptx
CH-2 Linear Programing.pptxRobiel1
 
chapter 2 revised.pptx
chapter 2 revised.pptxchapter 2 revised.pptx
chapter 2 revised.pptxDejeneDay
 
chapter 2 revised.pptx
chapter 2 revised.pptxchapter 2 revised.pptx
chapter 2 revised.pptxDejeneDay
 
EFFINET - Initial Presentation
EFFINET - Initial PresentationEFFINET - Initial Presentation
EFFINET - Initial PresentationPantelis Sopasakis
 
Biosight: Quantitative Methods for Policy Analysis : Dynamic Models
Biosight: Quantitative Methods for Policy Analysis : Dynamic ModelsBiosight: Quantitative Methods for Policy Analysis : Dynamic Models
Biosight: Quantitative Methods for Policy Analysis : Dynamic ModelsIFPRI-EPTD
 
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)Executability Analysis of Graph Transformation Rules (VL/HCC 2011)
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)Elena Planas
 
Linear Programming 1
Linear Programming 1Linear Programming 1
Linear Programming 1irsa javed
 
Chapter 6-INTEGER PROGRAMMING note.pdf
Chapter 6-INTEGER PROGRAMMING  note.pdfChapter 6-INTEGER PROGRAMMING  note.pdf
Chapter 6-INTEGER PROGRAMMING note.pdfTsegay Berhe
 
The GREDOR project. Redesigning the decision chain for managing distribution ...
The GREDOR project. Redesigning the decision chain for managing distribution ...The GREDOR project. Redesigning the decision chain for managing distribution ...
The GREDOR project. Redesigning the decision chain for managing distribution ...Université de Liège (ULg)
 
Estimation Of Production And Cost Function
Estimation Of Production And Cost FunctionEstimation Of Production And Cost Function
Estimation Of Production And Cost FunctionPradeep Awasare
 

Similar to Biosight: Quantitative Methods for Policy Analysis - Introduction to GAMS, Linear Programming (20)

linear programming
linear programming linear programming
linear programming
 
Unit.2. linear programming
Unit.2. linear programmingUnit.2. linear programming
Unit.2. linear programming
 
Biosight: Quantitative Methods for Policy Analysis: CES Production Function a...
Biosight: Quantitative Methods for Policy Analysis: CES Production Function a...Biosight: Quantitative Methods for Policy Analysis: CES Production Function a...
Biosight: Quantitative Methods for Policy Analysis: CES Production Function a...
 
Chapter 2 Linear Programming for business (1).pptx
Chapter 2 Linear Programming for business (1).pptxChapter 2 Linear Programming for business (1).pptx
Chapter 2 Linear Programming for business (1).pptx
 
Vcs slides on or 2014
Vcs slides on or 2014Vcs slides on or 2014
Vcs slides on or 2014
 
CH-2 Linear Programing.pptx
CH-2 Linear Programing.pptxCH-2 Linear Programing.pptx
CH-2 Linear Programing.pptx
 
Lecture2a algorithm
Lecture2a algorithmLecture2a algorithm
Lecture2a algorithm
 
chapter 2 revised.pptx
chapter 2 revised.pptxchapter 2 revised.pptx
chapter 2 revised.pptx
 
chapter 2 revised.pptx
chapter 2 revised.pptxchapter 2 revised.pptx
chapter 2 revised.pptx
 
Linear Programming Review.ppt
Linear Programming Review.pptLinear Programming Review.ppt
Linear Programming Review.ppt
 
EFFINET - Initial Presentation
EFFINET - Initial PresentationEFFINET - Initial Presentation
EFFINET - Initial Presentation
 
Biosight: Quantitative Methods for Policy Analysis : Dynamic Models
Biosight: Quantitative Methods for Policy Analysis : Dynamic ModelsBiosight: Quantitative Methods for Policy Analysis : Dynamic Models
Biosight: Quantitative Methods for Policy Analysis : Dynamic Models
 
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)Executability Analysis of Graph Transformation Rules (VL/HCC 2011)
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)
 
Linear Programming 1
Linear Programming 1Linear Programming 1
Linear Programming 1
 
Chapter 6-INTEGER PROGRAMMING note.pdf
Chapter 6-INTEGER PROGRAMMING  note.pdfChapter 6-INTEGER PROGRAMMING  note.pdf
Chapter 6-INTEGER PROGRAMMING note.pdf
 
Lp (2)
Lp (2)Lp (2)
Lp (2)
 
The GREDOR project. Redesigning the decision chain for managing distribution ...
The GREDOR project. Redesigning the decision chain for managing distribution ...The GREDOR project. Redesigning the decision chain for managing distribution ...
The GREDOR project. Redesigning the decision chain for managing distribution ...
 
Linear Programming
Linear ProgrammingLinear Programming
Linear Programming
 
Topic 1.3
Topic 1.3Topic 1.3
Topic 1.3
 
Estimation Of Production And Cost Function
Estimation Of Production And Cost FunctionEstimation Of Production And Cost Function
Estimation Of Production And Cost Function
 

More from IFPRI-EPTD

FAO_PRESS_RELEASE_PWC_Buffalo
FAO_PRESS_RELEASE_PWC_BuffaloFAO_PRESS_RELEASE_PWC_Buffalo
FAO_PRESS_RELEASE_PWC_BuffaloIFPRI-EPTD
 
Proyecciónde la Emisión, reservaCarbono, y economía Baja emisióny desarrollo
Proyecciónde la Emisión, reservaCarbono, y economía Baja emisióny desarrolloProyecciónde la Emisión, reservaCarbono, y economía Baja emisióny desarrollo
Proyecciónde la Emisión, reservaCarbono, y economía Baja emisióny desarrolloIFPRI-EPTD
 
IFPRI Low Emissions Development Strategies (LEDS) Colombia
IFPRI Low Emissions Development Strategies (LEDS) ColombiaIFPRI Low Emissions Development Strategies (LEDS) Colombia
IFPRI Low Emissions Development Strategies (LEDS) ColombiaIFPRI-EPTD
 
Biosight: Quantitative Methods for Policy Analysis: Stochastic Dynamic Progra...
Biosight: Quantitative Methods for Policy Analysis: Stochastic Dynamic Progra...Biosight: Quantitative Methods for Policy Analysis: Stochastic Dynamic Progra...
Biosight: Quantitative Methods for Policy Analysis: Stochastic Dynamic Progra...IFPRI-EPTD
 
Asti @ caadp pp
Asti @ caadp ppAsti @ caadp pp
Asti @ caadp ppIFPRI-EPTD
 
Low Emissions Development Strategies (Colombia Feb 20, 2014)
Low Emissions Development Strategies (Colombia Feb 20, 2014)Low Emissions Development Strategies (Colombia Feb 20, 2014)
Low Emissions Development Strategies (Colombia Feb 20, 2014)IFPRI-EPTD
 
Low Emissions Development Strategies (LEDS) Training Sept 9, 2013
Low Emissions Development Strategies (LEDS) Training Sept 9, 2013Low Emissions Development Strategies (LEDS) Training Sept 9, 2013
Low Emissions Development Strategies (LEDS) Training Sept 9, 2013IFPRI-EPTD
 
Future African Competitiveness: Foresight for better agricultural futures
Future African Competitiveness: Foresight for better agricultural futuresFuture African Competitiveness: Foresight for better agricultural futures
Future African Competitiveness: Foresight for better agricultural futuresIFPRI-EPTD
 

More from IFPRI-EPTD (8)

FAO_PRESS_RELEASE_PWC_Buffalo
FAO_PRESS_RELEASE_PWC_BuffaloFAO_PRESS_RELEASE_PWC_Buffalo
FAO_PRESS_RELEASE_PWC_Buffalo
 
Proyecciónde la Emisión, reservaCarbono, y economía Baja emisióny desarrollo
Proyecciónde la Emisión, reservaCarbono, y economía Baja emisióny desarrolloProyecciónde la Emisión, reservaCarbono, y economía Baja emisióny desarrollo
Proyecciónde la Emisión, reservaCarbono, y economía Baja emisióny desarrollo
 
IFPRI Low Emissions Development Strategies (LEDS) Colombia
IFPRI Low Emissions Development Strategies (LEDS) ColombiaIFPRI Low Emissions Development Strategies (LEDS) Colombia
IFPRI Low Emissions Development Strategies (LEDS) Colombia
 
Biosight: Quantitative Methods for Policy Analysis: Stochastic Dynamic Progra...
Biosight: Quantitative Methods for Policy Analysis: Stochastic Dynamic Progra...Biosight: Quantitative Methods for Policy Analysis: Stochastic Dynamic Progra...
Biosight: Quantitative Methods for Policy Analysis: Stochastic Dynamic Progra...
 
Asti @ caadp pp
Asti @ caadp ppAsti @ caadp pp
Asti @ caadp pp
 
Low Emissions Development Strategies (Colombia Feb 20, 2014)
Low Emissions Development Strategies (Colombia Feb 20, 2014)Low Emissions Development Strategies (Colombia Feb 20, 2014)
Low Emissions Development Strategies (Colombia Feb 20, 2014)
 
Low Emissions Development Strategies (LEDS) Training Sept 9, 2013
Low Emissions Development Strategies (LEDS) Training Sept 9, 2013Low Emissions Development Strategies (LEDS) Training Sept 9, 2013
Low Emissions Development Strategies (LEDS) Training Sept 9, 2013
 
Future African Competitiveness: Foresight for better agricultural futures
Future African Competitiveness: Foresight for better agricultural futuresFuture African Competitiveness: Foresight for better agricultural futures
Future African Competitiveness: Foresight for better agricultural futures
 

Recently uploaded

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

Biosight: Quantitative Methods for Policy Analysis - Introduction to GAMS, Linear Programming

  • 1. Day 1: Introduction to GAMS, Linear Programming, and PMP Day 1 NotesHowitt and Msangi 1
  • 2.  Understand basic GAMS syntax  Calibrate and run regional or farm models from minimal datasets  Calculate regional water demands  Calculate elasticity of water demand  Estimate the value of rural water demand for water policy Day 1 NotesHowitt and Msangi 2
  • 3.  Linear Models  Linear Programming: Primal  Positive Mathematical Programming Day 1 NotesHowitt and Msangi 3
  • 4. Day 1 NotesHowitt and Msangi 4
  • 5.  We can typically specify a model as a constrained or unconstrained maximization  Consider the general production function ◦ The price of the output q is p per unit output, and the cost per unit x is w. Define profit Π .  Consider the profit maximization problem  Which we can write and solve as Day 1 NotesHowitt and Msangi 5 1 2( , )q f x x= 1 1 2 2Max pq x w x wΠ= − − 1 2subject to ( , )q f x x= ( )1 1 2 2 1 2( , )L pq x w x w q f x xλ= − − − −
  • 6.  Let’s assume linear production technology (Leontief) so we can write  We can rewrite the linear model with one output as  Or, in more compact matrix notation Day 1 NotesHowitt and Msangi 6 1 2 1 1 2 2( , )f x x a x a x= + 1 1 2 2Max pq x w x wΠ= − − 1 1 2 2subject to 0q a x a x− − = 1 2[ , , ]p w w= − −c' 1 2[1, , ]a a= − −a' 1 2' [ , , ]q x x=x Max 'c x subject to ' 0=a x⇒
  • 7.  We will modify this example to include multiple outputs and derive the LP problem  Linear Programming ◦ Output levels and input availability should be specified as inequality constraints ◦ Given a set of m inequality constraints in n variables ( x ), we want to find the non-negative values of a vector x which satisfies the constraints and maximizes an objective function  Define as the quantity available for each input (or “resource”) i  Resources can be used in the production of multiple outputs (i), reflected in technical coefficients Day 1 NotesHowitt and Msangi 7 ib ija
  • 8.  Let’s define the matrix of technical coefficients and vector of available inputs  And we can write the general LP as  Note that we have 2 (constrained) inputs and 2 outputs in our example, but this notation generalizes to any number. Day 1 NotesHowitt and Msangi 8 11 12 21 22 a a a a   =     A1 2 b b   =     b Max 'c x subject to ≤Ax b
  • 9.  The Machakos example: Machakos_Primal_Day1.gms  Leontief technology  5 Crops: Inter Cropped, Maize, Beans, Tomato, Grass  4 inputs (constrained): land, labor, chemicals, and seed  We will formulate the model Day 1 NotesHowitt and Msangi 9 Max 'c x subject to ≤Ax b
  • 10. Day 1 NotesHowitt and Msangi 10 [ ]1 2 3 4 5' [ ]x x x x x Inter Cropped Maize Beans Tomato Grass= = −x 1 2 3 4 Land (hectares) 2.78 Labor (person days) 250 Chemicals (kg) 6,000 Seed (kg) 6,000 b b b b                  =≡ =                  b 11 12 13 14 15 21 22 23 24 25 31 32 33 34 35 41 42 43 44 45 1 1 1 1 1 40.3 159 126.5 136 0 8.75 83.9 12.03 181.3 30 43 44.6 50.3 22 0 a a a a a a a a a a a a a a a a a a a a            =            A [ ]1 2 3 4 5' [ ] 13,563 8,350 31,125 37,704 24,980c c c c c=c
  • 11.  Let’s multiply out a constraint and interpret  Constraint 3:  Interpretation: total use of chemicals in the production of all crops must be less than or equal to the total available chemicals  Numerically:  We will formulate and solve the model during the afternoon session Day 1 NotesHowitt and Msangi 11 31 1 32 2 33 3 34 4 35 5 3a x a x a x a x a x b+ + + + ≤ 1 2 3 4 58.75 83.9 12.03 181.3 30 6,000x x x x x kg+ + + + ≤
  • 12.  Minimizing the cost of inputs subject to a minimum output level is equivalent to maximizing profit subject to production technology and the total input available  For every Primal Problem there exists a Dual Problem which has the identical optimal solution. ◦ Primal question: what is the maximum value of firm's output? ◦ Dual question: what is the minimum acceptable price that I can pay for the firm's assets?  The “dual” or “shadow” value has economic meaning: ◦ It is the marginal value (or marginal willingness to pay) of another unit of a given resource. Day 1 NotesHowitt and Msangi 12 ( )iλ
  • 13.  Dual objective function ◦ Equal to the sum of the imputed values of the total resource stock of the firm (amount of money that you would have to offer a firm owner for a buy-out).  Dual Constraints ◦ Set of prices for the fixed resources (or assets) of the firm that would yield at least an equivalent return to the owner as producing a vector of products ( x ), which can be sold for prices ( c ), from these resources.  Where do these values come from? Day 1 NotesHowitt and Msangi 13 Max 'c x subject to ( )≤Ax b λ
  • 14. Day 1 NotesHowitt and Msangi 14
  • 15.  Linear Programming shortfalls ◦ Overspecialization ◦ Will not reproduce an observed allocation without restrictive constraints ◦ Tendency for “jumpy” response to policy  Questions ◦ How do we calibrate to observed but limited data? ◦ How do we use these models for policy analysis? ◦ How do we introduce rich resource constraints?  Perennial crops  Climate change  Technology  Regulations Day 1 NotesHowitt and Msangi 15
  • 16.  Behavioral Calibration Theory ◦ We need our calibrated model to reproduce observed outcomes without imposing restrictive calibration constraints  Nonlinear Calibration Proposition ◦ Objective function must be nonlinear in at least some of the activities  Calibration Dimension Proposition ◦ Ability to calibrate the model with complete accuracy depends on the number of nonlinear terms that can be independently calibrated Day 1 NotesHowitt and Msangi 16
  • 17.  Let marginal revenue = KSh 500/hectare  Average cost = KSh 300/hectare  Observed acreage allocation = 50 hectares  Introduce calibration constraint to estimate residual cost needed to calibrate crop acreage to 50 Day 1 NotesHowitt and Msangi 17 Max500 300x x− subject to 50x ≤ 2λ
  • 18.  We need to introduce a nonlinear term in the objective function to achieve calibration. Here we introduce a quadratic total cost function. This is a common approach in PMP.  Under unconstrained optimization, MR=MC ◦ For this condition to hold at x*=50 it must be that is the difference at the constrained calibration value (MR-AC). ◦ We know that MR=MC ◦ Therefore , since we require MR=MC at x*=50 Day 1 NotesHowitt and Msangi 18 2 0.5TC x xα γ= + 2λ 2 MC - ACλ =
  • 19.  We can now calculate the slope and intercept of the nonlinear cost function which will allow us to calibrate the mode without constraints and , thus  We can calculate the cost slope coefficient  Given the slope, the intercept follows from the AC equation  Verify that Day 1 NotesHowitt and Msangi 19 MC xα γ= + 0.5AC xα γ= + 2( 0.5 )MC AC x xα γ α γ λ− = + − + = 2 * 2 x λ γ = 0.5 *AC xα γ= + 8 and 100γ α= =
  • 20.  Combine this information and introduce the calibrated cost function into an unconstrained problem  Verify that we get the observed allocation as the optimal solution through standard unconstrained maximization ◦ We see that x=50, which is our observed allocation and we have verified that the model calibrates Day 1 NotesHowitt and Msangi 20 2 500 0.5Max x x xα γΠ= − − 2 500 100 0.5(8)Max x x xΠ= − − 2 400 4Max x xΠ= −
  • 21.  Now the model can be used for policy simulations  The unconstrained profit maximization problem reproduces the observed base year  We can introduce changes and evaluate the response without restrictive calibration constraints  The method extends to multiple crops Day 1 NotesHowitt and Msangi 21
  • 22.  The PMP method extends to multiple crops ◦ PMP example: Machakos_QuadraticPMP_Day1.gms  There are three stages to PMP 1. Constrained LP model is used to derive the dual values for both resource and calibration constraints 2. The calibration constraint dual values are used to derive the calibration cost function parameters 3. The cost function parameters are used with the base year data to specify the PMP model Day 1 NotesHowitt and Msangi 22
  • 23.  2 Crop example: wheat and oats  Observed Data: 2 ha oats and 3 ha wheat (total farm size of 5 hectares) Day 1 NotesHowitt and Msangi 23
  • 24.  We maintain the assumption of Leontief production technology and assume that land (input i=1) is the binding calibrating constraint  We can write the calibrated problem as  PMP calibration proceeds in three stages Day 1 NotesHowitt and Msangi 24 ( ) 3 2 0.5i i i i i i i j ij i i j Max p y x x x w a xα γ = − + −∑ ∑ subject to and= ≥Ax b x 0
  • 25.  Stage 1  Formulate and solve the constrained LP and note the dual values ()  We introduce a perturbation term to decouple resource and calibration constraints Day 1 NotesHowitt and Msangi 25 2 1 1 max ( ) ( ) 5 ( ) 3 ( ) 2 ( ) w w w w o o o o w o w w o o y p w x y p w x subject to x x x x λ ε λ ε λ Π= − + − + ≤ ≤ + ≤ +
  • 26.  The optimal solution is when the wheat calibration constraint is binding at 3.01 (wheat is the most valuable crop), and the resource constraint ensures oats at 1.99  Store the dual values for use in stage 2 Day 1 NotesHowitt and Msangi 26 2 1 1 max ( ) ( ) 5 ( ) 3 ( ) 2 ( ) w w w w o o o o w o w w o o y p w x y p w x subject to x x x x λ ε λ ε λ Π= − + − + ≤ ≤ + ≤ +
  • 27.  Stage 2  Derive the parameters of the quadratic total cost function ◦ Use same logic as in the single crop example  Notice two types of crops in the problem depending on which constraint is binding ◦ Calibrated crops ◦ Marginal crops  Calculate the cost intercept and slope for the calibrated wheat crop Day 1 NotesHowitt and Msangi 27
  • 28.  Graphically Day 1 NotesHowitt and Msangi 28
  • 29.  Stage 3  No restrictive calibration constraints  Calibration checks ◦ Hectare allocation (all input allocation) ◦ Input cost = Value Marginal Product  Can use the model for policy simulation Day 1 NotesHowitt and Msangi 29 ( ) 3 2 0.5 ,i i i i i i i j ij i i j Max p y x x x w a x where i o wα γ = − + − =∑ ∑ 0 5wx x+ ≤
  • 30.  We have covered a range of topics ◦ Linear models ◦ Linear Programming  Primal  Dual ◦ Positive Mathematical Programming  Single crop mathematical derivation  Multiple crop generalization  This afternoon we will revisit these topics in GAMS ◦ Intro.gms ◦ Machakos_Primal_Day1.gms ◦ Machakos_Dual_Day1.gms ◦ Machakos_QuadraticPMP_Day1.gms Day 1 NotesHowitt and Msangi 30