capri mathematical programming and exercises torbjörn jansson* *corresponding author +49-228-732323...

14
CAPRI CAPRI Mathematical programming and exercises Torbjörn Jansson* *Corresponding author +49-228-732323 www.agp.uni-bonn.de Department for Economic and Agricultural Policy Bonn University Nussallee 21 53115 Bonn, Germany CAPRI Training Session in Warzaw June 26-30, 2006 CAPRI Common Agricultural Policy Regional Impact

Upload: rhoda-black

Post on 31-Dec-2015

232 views

Category:

Documents


0 download

TRANSCRIPT

CAPRI CAPRI

Mathematical programming and exercises

Torbjörn Jansson*

*Corresponding author+49-228-732323www.agp.uni-bonn.de

Department for Economic and Agricultural PolicyBonn UniversityNussallee 2153115 Bonn, Germany

CAPRI Training Session in WarzawJune 26-30, 2006

CAPRICommon Agricultural Policy Regional Impact

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

2

Session outline:

• A linear programming model

• A quadratic programming model

• Experiments with a linear and a quadratic model (exercise)

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

3

An aggregate LP model

ii

n

jjij

n

jjj

x

bxats

xmzj

1

10

..

max

Endogenousvariables,here activity levels

Margins m(yield*price-variable cost)

Shadow pricesof constraints

Constraints

ObjectiveFunction

Objective value

Constraint vectorI/O coefficients

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

4

Theory: Linear programming

i

n

jjij

n

jjj

x

bxats

xmzj

1

10

..

max

Programming model

n

jjiji

m

ii

n

jjjmn xabxmxxL

11111 ),(

Lagrange function

First order conditions (Kuhn - Tucker)

001

m

ijijij

j

xamx

L Revenue Exhaustion (margin = opportunity costs)

001

n

jijiji

i

xabL Constrains must hold

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

5

• Three activities {1,2,3} and two resources {l,c}• Kuhn-Tucker conditions:

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.

Reaction to changed margins (I)

00

00

00

3333

2222

1111

xaam

xaam

xaam

ccll

ccll

ccll

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

6

Numerical example

DATAActivities: CERE, SUGB, POTAResouces: Land, Capital

Margins:CERE 575SUGB 1000POTA 500

Resource use matrix A = CERE SUGB POTALand 1 1 1Capital 100 300 280

Resource constraints B: Land = 10, Capital = 2540

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…)

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

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

7

• At m0POTA only SUGB and CERE take

place

• Raise margin of the “zero activity”

(POTA) and observe behaviour

• 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

Reaction to changed margins (II)

SUGB

CERE

POTA

mPOTA

x

m’POTAm0POTA

Land

Capital

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

8

Conclusions LP

• If there are k constraints, at most k activities will non-

zero 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

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

9

Theory: Quadratic programming I

ii

n

jjij

j kkjkjj

n

jjj

x

bxats

xxxmzj

1

21

10

..

max

Programming model

Lagrange function

i

n

jijiji

j kkjkjj

n

jjjmn bxaxxxmxxL

121

111 ),(

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

10

Theory: Quadratic programming II

Kuhn - Tucker conditions

001

m

ijiji

kkjkjj

j

xaxmx

L

Revenue Exhaustion (margin = opportunity costs)

001

n

jijiji

i

xabL

Constrains must hold

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

11

How determine PMP-terms?

• 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.

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

12

A calibration method for a QP using exogenous own price elasticities

001

Axmaxmm

iiji

kkjkjj

If only non-zero activities are considered

Solving for x yields Amx 1

Assumption 1: jk = 0 for j

k

iijjjjj

j amx

1

Assumption 2: is constant and known /m = 0

jjj

j

dp

dx

1

(with mj=pj-cj)j

j

jjjj

j

j

jjjj x

p

x

p

11

and

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

13

• Calibrate to own price

elasticities of unity

• Raise price of output of

POTA and observe

behaviour

• DEMO: Tuesday\LPQP.gms

Reaction to changes (III)

SUGB

CERE

POTA

mPOTA

x

CAPRI CAPRI

CAPRI Training Session in Warzaw, June 26-30, 2006

14

Exercises

• 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.