Esittely latautuu. Ole hyvä ja odota

Esittely latautuu. Ole hyvä ja odota

5. lecture Questions associated with earlier lecture? Programme:

Samankaltaiset esitykset


Esitys aiheesta: "5. lecture Questions associated with earlier lecture? Programme:"— Esityksen transkriptio:

1 5. lecture Questions associated with earlier lecture? Programme:
Group work/term paper Let’s add measures (2-> 6 measures) to cost-minization problem developed last time (Vantaanjoki-case) Let’s add damage function to the problem formulation & solve socially optimal level of nutrient abatement

2 Term paper You obtain 40 points maximum from the term paper. The idea is to expand or/and combine the weakly exercises. Write the term paper in the form of a typical research paper: Describe the problem you are focusing on (introduction) Formulate the problem in a mathematical form (an optimization or estimation problem) (model description)) Write the matlab code (methods) Report and interpret the results (Results and Discussion) You may write in English or in Finnish (but not a mixture of the two languages). You may work individually or in pairs. If you choose to work in pairs, please report the contribution of each person. If you have any questions during the process, please contact the person responsible for the lecture you are focusing on. Help can be provided in any phase of the process. Please identify the topics and inform them to Matti before the last lecture Please hand in the term paper by the end of May.

3 (1) Extensions to Vantaanjoki-model
Let’s add 4 new measures: two agricultural measures (nutrient management zones ja wetlands) one measure affecting loading from forests one measure reflecting additional investment in municipal waste water treatment. When estimating the effects of agricultural measures (wetlands and management zones), one need to account for the cumulative impacts (i.e. joint impacts of measures on effectiveness)

4 opt_vantaa2.m Kaikkien kuuden muuttujan optimointia varten päivitä: opt_vantaa1b.m -> opt_vantaa2.m clear all global target % target of nutrient abatement global maxPvah % maximum reductions = capacity global maatkuor; % maatalouden osuus kokonaiskuormituksesta maxPvah= [ ]; maatkuor = 45406; % Measures % (1) fertilization & gypsum % (2) catch crop % (3) zoning % (4) wetland % (5) forestry activities % (6) Investments in wwt X0 = [ ]; % alkuarvaus toimenpidevektorille LB = [ ]; % alarajat toimenpiteille UB = [ ]; % ylärajat toimenpoiteille tulokset = []; for i=1:10 target = i*2000; [X,FVAL,EXITFLAG] = tulokset =[tulokset;target X FVAL]; i end

5 Catch crop Wetland Zones Fertilization Source: Baltic Deal
Source: Proagria Zones Fertilization Source: Hankkija Source: MTK

6 Päivitä kustannus.m - > kustannus2.m
function [totalcosts] = kustannus2(V) global maxPvah cost = zeros(1,6); f={}; *exp( *x); % fertilization & gypsum *exp( *x); % catch crop *x; % zoning *x; % wetland *exp(0.0208*x); % forestry activities *(1-exp( *x)); % Investments in wwt % Costs for i=1:length(V) cost(i) = integral(f{i},0,V(i)*maxPvah(i)); end totalcosts = sum(cost);

7 Päivitä rajoitteet.m - > rajoitteet2.m
function [c,ceq] = rajoitteet2(V) global target global maxPvah; abat =zeros(1,6); % toimenpiteiden puhdistukset %Lasketaan toimenpiteiden (1-2) lannoitus & kipsi ja nurmi & kasvipeitteisyys %vaikutukset muihin toimenpiteisiin (3-4) suojavyöhykkeet ja kosteikot kerroin =laskeKertoimet(V,3,4);%kerroin-vektori kaikille toimenpiteille 1-6 % VAIKUTTAVUUS - Vähennys kuormituksesta abat = V.*maxPvah.*kerroin; c = target-sum(abat); ceq = []; end

8 laskeKertoimet.m laskeKertoimet.m
% Computes the impacts of measures the efficiency of which is altered due to % application of some other measures % eka – first measure affected % vika – last measures affected function [kertoimet] = laskeKertoimet(V,eka,vika) global maxPvah; global maatkuor; %By default the multiplier are ones (no effect from other measures) kertoimet = ones(1,length(V)); %Lasketaan kertoimet toimenpiteille ekasta vikaan for i=eka:vika kertoimet(i)=(maatkuor-(V(1:i-1).*kertoimet(1:i-1))*maxPvah(1:i-1)')/maatkuor; end

9 y=kerroin

10 Excercise 5/1. Sensitivity analysis
Draw a figure that shows optimal combination of abatement measures as function of target level of nutrient abatement Draw a figure that shows total costs as function of target level of nutrient abatement Compare the results with earlier model runs carried out with only 2 candidate measures. Explain the reasons for differences

11 (2) Socially optimal level of nutrient abatement
Adjust the minimization problem by adding the health damages from municipal waste water overflows No given target level (target is the outcome of the optimization) min 𝑥 𝑖 , 𝑖=1,…,𝑛 𝐷= 𝑖=1 𝑛 𝑒 𝑖 𝑥 𝑖 +ℎ 𝑖 𝑥 𝑖 + 𝑐 𝑖 𝑥 𝑖 0≤ 𝑥 𝑖 ≤1 xi Measure i application in relation to the maximum level (Amax) D Sum of damages and costs h damage from eutrophication recreation possibilities & services e Health damage from waste water owerflows (bacteria etc) ci Costs of implmenting the measure

12 Damage to recreation (due to eutrophication)
Health damage (waste water overflows) Rehev_haitta = alfa1 * Pkuorma terv_haitta = alfa2 * Pkuorma(jätevedenpuhdistuksesta) damage Health damage P load maxPvah(6) P load alfa1 = marginal costs of reducing phosporus loads from other drainage basins that drain to the same recipient water body (Baltic Sea) alfa2 = marginal cost of reducing the health damages by using other measures or in other drainage basins Initial assumptions: alfa1 = 45 €/kg, alfa2 = 100 €/kg

13 New function: vantaa_damage.m From earlier model versions:
capacity Cost functions Effectiveness New elements: Health damage Damage to recreation Revise optimization accordingly: opt_vantaa3.m

14 vantaa_damage.m function [dampluscost] = vantaa_damage(V)
% (1) COSTS OF MEASURES global alfa maxPvah= [ ]; cost = zeros(1,6); f={}; *exp( *x); % lannoitus & kipsi *exp( *x); % nurmi & kasvipeitteisyys *x; % suojavyöhykkeet *x; % kosteikot *exp(0.0208*x); % metsätoimenpiteet *(1-exp( *x)); % jätevedet for i=1:length(V) cost(i) = integral(f{i},0,V(i)*maxPvah(i)); end totalcosts = sum(cost); % (2) MULTIPLE IMPACTS kertoimet = ones(1,length(V)); eka=3; vika=4; maatkuor=45406; for i=eka:vika kertoimet(i)=(maatkuor-(V(1:i-1).*kertoimet(1:i-1))*maxPvah(1:i-1)')/maatkuor; abat = V.*maxPvah.*kertoimet; % (3) DAMAGES AND COSTS Pkuorma = 80000; % Total P load rehev_haitta = alfa(1)*(Pkuorma-sum(abat)); terveyshaitta = alfa(2)* maxPvah(6)*(1-V(6)); dampluscost = rehev_haitta + terveyshaitta + totalcosts;

15 Opt_vantaa3.m clear all global alfa alfa(1) = 45; alfa(2) = 400; X0 = [ ]; % alkuarvaus toimenpidevektorille LB = [ ]; % alarajat toimenpiteille UB = [ ]; % ylärajat toimenpoiteille tulokset = []; [X,FVAL,EXITFLAG] =

16 Excersise 5/2 Compute the result with default values for alfa1 (unit damage for recreation) and alfa2 (healt damage). Does it pay to invest in reducing nutrient loading? (little, much, not at all?) What measures should be applied? If alfa1 is constant (45 €/kg) how large should the marginal health damage (alfa2) be in order that Any investment in measure 6 (investment in waste water treatment) is worthwhile? Measures 6 is applied 50% of the capacity? Measure 6 is fully adopted with full capacity? alfa2=100, how large should the marginal damage to recreation be (alfa1) so that waste water treatment is fully adopted?

17 (3) Dynamic model version for optimizing P fertilization
Main nutrients: N & P Other nutrients: K, Ca, Se, jne. Management unit: individual field More or less homogenous piece of land Parameters described per hectare Kuva: google earth

18

19 Optimize P fertilization for a certain piece of agricultural land:
max 𝑥 𝑡 =1,…,30 𝑍 = 𝑒 −𝑟𝑡 𝑡=1 30 𝑝 𝑌 𝑡 ( 𝑆 𝑡 )− 𝑎𝑥 𝑡 +𝑇−𝐶 𝑥 𝑡 =𝑓( 𝑆 𝑡 Crop yield Z annual profit for a farmer, €/ha x Fertilizer input, kg/ha/year t 1,…,100 years a price of fertilazer, 4 €/kg T Support, 400 €/ha C Fixed costs, 423 €/ha p crop price, €/kg Y Yield, kg/ha S Soil test phosporus (STP) r rate of interest, 0.03 % 𝑆 0 =𝑆’ Initial STP 𝑆 𝑡+1 =𝑓( 𝑆 𝑡 , 𝑥 𝑡 Transition of STP State variable

20

21 Estimate crop yield function
load havainnot.txt a=havainnot (:,1); % Soil test phosporus b=havainnot (:,2); % annual crop yield Scatter(a,b) -> curve fitting tool - > Find the best possible functional form and estimate crop yield function

22 lohkomalli_1.m 1/2 function [Z] = lohkomalli_1(X); % Parameters per = 100; % years a = 4; % price of P fertilizer, €/kg T = 400; % agricultural support, €/ha/yr C = 423; % fixed cost of agriculture, €/ha/yr p = 0.147; % crop price, €/kg r = 0.03; % interest rate % Variables Y = zeros(1,per); % crop yield S = zeros(1,per); % Soil test phosporus (state variable) profit = zeros(1,per); % Annual profit, €/ha/yr % Initial state S(1,1) = 8; % STP initially

23 lohkomalli_1.m 1/2 % Loop for t=1:per Y(t) = max(0, 0.6*(-8720 * (S(t))^ )); % crop yield function S(t+1) = *S(t) + ( *S(t))*(X(t)-(3+0.19*log(S(t))*Y(t)/1000)); end % profit and NPV profit = p*Y - a*X + T - C; Z = - exp(-r*(1:1:per))* profit'; % (negative) of the net present value

24 X=rand(1,100)*40; % prepare random fertiliation trajectory
plot(X) [Z] = lohkomalli_1(X) % run the model % study the development of state variables plot(S) plot(Y) plot(profit)

25 opt_lohkomalli_1.m 1/1 clear all X0 = 20*ones(1,100); % initial guess for P fertilization LB = zeros(1,100); UB = 300*ones(1,100); [X,FVAL,EXITFLAG] =

26 Excersise 5/3 Compute optimal trajectory of P fertilization for different initial levels of Soil test phosporus:(S0=8), (S0=6), and (S0=10). Do the trajectories meet, i.e. reach equilibrium in the future? How long does this take? How does the price of fertilizers affect optimal level of fertilization? Compute the results for one initial soil test phosporus level (S0=8) and three price levels: 3, 4 and 5 euroa/kg


Lataa ppt "5. lecture Questions associated with earlier lecture? Programme:"

Samankaltaiset esitykset


Iklan oleh Google