CAPRI
CAPRI
Common Agricultural Policy Regional Impact
CAPRI
Mathematical programming and exercises
Torbjörn Jansson*
CAPRI Training Session in Warzaw
June 26-30, 2006
*Corresponding author
+49-228-732323
www.agp.uni-bonn.de
Department for Economic and Agricultural Policy
Bonn University
Nussallee 21
53115 Bonn, Germany
CAPRI
Session outline:
CAPRI
• A linear programming model
• A quadratic programming model
• Experiments with a linear and a quadratic model
(exercise)
2
CAPRI Training Session in Warzaw, June 26-30, 2006
An aggregate LP model
CAPRI
Margins m
(yield*price-variable cost)
Objective value
CAPRI
Endogenous
variables,
here activity levels
n
Objective
Function
max z m j x j
x j 0
n
Constraints
j 1
s.t. aij x j bi
j 1
I/O coefficients
i
Shadow prices
of constraints
Constraint vector
3
CAPRI Training Session in Warzaw, June 26-30, 2006
Theory: Linear programming
CAPRI
Programming model
n
max z m j x j
n
j 1
s.t. aij x j bi
Lagrange function
n
L( x1 xn , 1 m ) m j x j i bi aij x j
j 1
i 1
j 1
n
x j 0
CAPRI
m
j 1
First order conditions (Kuhn - Tucker)
Revenue Exhaustion
(margin = opportunity
costs)
Constrains must hold
m
L
m j i aij 0 x j 0
x j
i 1
n
L
bi aij x j 0 i 0
i
j 1
4
CAPRI Training Session in Warzaw, June 26-30, 2006
CAPRI
Reaction to changed margins (I)
CAPRI
• Three activities {1,2,3} and two resources {l,c}
• Kuhn-Tucker conditions:
m1 l al1 c ac1 0
x1 0
m2 l al 2 c ac 2 0 x2 0
m3 l al 3 c ac 3 0
x3 0
At most two of the inequalities on the left can be satisfied with
equality (if matrix A has full rank)
At most two activities can be non-zero
At least one activity will have too small a margin m to pay for the fix
resources at least as good as the other activities.
5
CAPRI Training Session in Warzaw, June 26-30, 2006
CAPRI
Numerical example
DATA
Activities: CERE, SUGB, POTA
Resouces: Land, Capital
Margins:
CERE 575
SUGB 1000
POTA 500
CAPRI
FOC
CERE: 575 - l - c100 ≤ 0 xc ≥ 0
SUGB: 1000 - l - c300 ≤ 0 xs ≥ 0
POTA: 500 - l - c280 ≤ 0 xp ≥ 0
(solve with algorithm…)
Resource use matrix A =
CERE SUGB POTA
Land
1
1
1
Capital 100 300 280
Resource constraints B:
Land = 10, Capital = 2540
l = 362.5
c = 2.125
CERE:
0 ≤ 0, xc = 2.3
SUGB:
0 ≤ 0, xs = 7.7
POTA: -457.5 ≤ 0, xp = 0.0
6
CAPRI Training Session in Warzaw, June 26-30, 2006
Reaction to changed margins (II)
CAPRI
x
•
At POTA only SUGB and CERE take
place
•
Raise margin of the “zero activity”
(POTA) and observe behaviour
m0
•
At mPOTA < m’ POTA only SUGB and
CERE take place.
•
At mPOTA > m’ POTA only activities
POTA and CERE take place, a.s.o.
•
Dual values change
•
DEMO: Tuesday\LPQP.gms
SUGB
CAPRI
POTA
CERE
m0POTA m’POTA
mPOTA
Land
Capital
7
CAPRI Training Session in Warzaw, June 26-30, 2006
CAPRI
Conclusions LP
CAPRI
• If there are k constraints, at most k activities will nonzero in the optimal solution
• A linear model responds discontinuously
(semicontinuously) to changes
• Generally, it is not possible to set up the model to
exactly reproduce observed activity levels
8
CAPRI Training Session in Warzaw, June 26-30, 2006
Theory: Quadratic programming I
CAPRI
CAPRI
Programming model
max z m j x j x j j 12 jk xk
x j 0
j 1
j
k
n
n
s.t. aij x j bi
j 1
i
Lagrange function
n
1
L( x1 xn , 1 m ) m j x j x j j 2 jk xk i aij x j bi
j 1
j
k
i j 1
n
9
CAPRI Training Session in Warzaw, June 26-30, 2006
CAPRI
Theory: Quadratic programming II
CAPRI
Kuhn - Tucker conditions
Revenue Exhaustion (margin = opportunity costs)
L
mj j
x j
k
jk xk
m
a
i ij
0 x j 0
i 1
Constrains must hold
L
bi
i
n
a x
ij
j
0 i 0
j 1
10
CAPRI Training Session in Warzaw, June 26-30, 2006
CAPRI
How determine PMP-terms?
CAPRI
• Howitt 1995 works, but wrong dual values, no
information on price effects
• Heckelei 2003 Estimate first order conditions.
Difficult.
• In CAPRI: Use exogenous supply elasticities.
11
CAPRI Training Session in Warzaw, June 26-30, 2006
CAPRI
A calibration method for a QP using
exogenous own price elasticities
CAPRI
If only non-zero activities are considered
mj j
k
jk xk
m
a
i ij
0 m x A 0
i 1
Solving for x yields
Assumption 1: jk = 0 for j k
x 1 m A
xj
1
jj
m
j
j aij i
Assumption 2: is constant and known /m = 0
dx j
1
1 pj
1 pj
(with mj=pj-cj)
and jj
jj
dp j jj
jj x j
jj x j
12
CAPRI Training Session in Warzaw, June 26-30, 2006
CAPRI
Reaction to changes (III)
• Calibrate to own price
elasticities of unity
• Raise price of output of
POTA and observe
behaviour
CAPRI
x
SUGB
POTA
CERE
mPOTA
• DEMO: Tuesday\LPQP.gms
13
CAPRI Training Session in Warzaw, June 26-30, 2006
CAPRI
Exercises
CAPRI
• Use tuesday\LPQP.gms
• Task 1: Type the Kuhn-Tucker conditions of the NLP-model
and solve them.
Hints:
- assume that all activities are non-zero,
- define an equation z = 1 and solve system by max. z.
• Task 2: Plot the relationship between exogenous
exasticities and point elasticities of model.
Hint: Use the existing loop and parameters to calibrate the
QP to different own price elasticities, simulate a 1%
margin-increase, compute the point elasticity and plot the
results.
14
CAPRI Training Session in Warzaw, June 26-30, 2006
© Copyright 2026 Paperzz