Skip to content
Snippets Groups Projects
Commit 8225de7f authored by David Klein's avatar David Klein
Browse files

*refactoring* Deleted q30_pebiolc_price_base and vm_pebiolc_price_shifted...

*refactoring* Deleted q30_pebiolc_price_base and vm_pebiolc_price_shifted since it was a remainder of old implementations and had no function anymore.
parent 97ab0244
No related branches found
No related tags found
1 merge request!24Completed documentation for 30_biomass/magpie_40 and 26_agcost/cost
......@@ -302,7 +302,6 @@ vm_prodFe(ttot,all_regi,all_enty,all_enty,all_te) "fe production. [TWa]"
v_costFu(ttot,all_regi) "fuel costs"
vm_costFuEx(ttot,all_regi,all_enty) "fuel costs from exhaustible energy [tril$US]"
vm_pebiolc_price(ttot,all_regi) "bioenergy price according to MAgPIE supply curves"
vm_pebiolc_price_shifted(ttot,all_regi) "bioenergy price according to shifted MAgPIE supply curves, required only for calculation of the bioenergy tax"
v_costOM(ttot,all_regi) "o&m costs"
v_costInv(ttot,all_regi) "investment costs"
......
......@@ -70,7 +70,6 @@ vm_capDistr.l(t,regi,te,rlf) = 0;
vm_cap.l(t,regi,te,rlf) = 0;
vm_fuExtr.l(ttot,regi,"pebiolc","1")$(ttot.val ge 2005) = 0;
vm_pebiolc_price.l(ttot,regi)$(ttot.val ge 2005) = 0;
vm_pebiolc_price_shifted.l(ttot,regi)$(ttot.val ge 2005) = 0;
*** overwrite default targets with gdx values if wanted
Execute_Loadpoint 'input' p_emi_budget1_gdx = sm_budgetCO2eqGlob;
......
......@@ -163,7 +163,7 @@ v21_taxrevSO2(t,regi) =g= p21_tau_so2_tax(t,regi) * vm_emiTe(t,regi,"so2")
*' Documentation of overall tax approach is above at q21_taxrev.
***---------------------------------------------------------------------------
q21_taxrevBio(t,regi)$(t.val ge max(2010,cm_startyear))..
v21_taxrevBio(t,regi) =g= v21_tau_bio(t) * vm_fuExtr(t,regi,"pebiolc","1") * vm_pebiolc_price_shifted(t,regi)
v21_taxrevBio(t,regi) =g= v21_tau_bio(t) * vm_fuExtr(t,regi,"pebiolc","1") * vm_pebiolc_price(t,regi)
- p21_taxrevBio0(t,regi);
***---------------------------------------------------------------------------
......
......@@ -39,7 +39,7 @@ p21_taxrevPE2SE0(ttot,regi) = SUM(pe2se(enty,enty2,te),
);
p21_taxrevXport0(ttot,regi) = SUM(tradePe(enty), p21_tau_XpRes_tax(ttot,regi,enty) * vm_Xport.l(ttot,regi,enty));
p21_taxrevSO20(ttot,regi) = p21_tau_so2_tax(ttot,regi) * vm_emiTe.l(ttot,regi,"so2");
p21_taxrevBio0(ttot,regi) = v21_tau_bio.l(ttot) * vm_fuExtr.l(ttot,regi,"pebiolc","1") * vm_pebiolc_price_shifted.l(ttot,regi);
p21_taxrevBio0(ttot,regi) = v21_tau_bio.l(ttot) * vm_fuExtr.l(ttot,regi,"pebiolc","1") * vm_pebiolc_price.l(ttot,regi);
p21_implicitDiscRate0(ttot,regi) = sum(ppfKap(in), p21_implicitDiscRateMarg(ttot,regi,in) * vm_cesIO.l(ttot,regi,in) );
***DK: for reporting only
p21_tau_bioenergy_tax(t) = v21_tau_bio.l(t);
......
......@@ -40,7 +40,7 @@ p21_taxrevPE2SE0(ttot,regi) = SUM(pe2se(enty,enty2,te),
);
p21_taxrevXport0(ttot,regi) = SUM(tradePe(enty), p21_tau_XpRes_tax(ttot,regi,enty) * vm_Xport.l(ttot,regi,enty));
p21_taxrevSO20(ttot,regi) = p21_tau_so2_tax(ttot,regi) * vm_emiTe.l(ttot,regi,"so2");
p21_taxrevBio0(ttot,regi) = v21_tau_bio.l(ttot) * vm_fuExtr.l(ttot,regi,"pebiolc","1")*vm_pebiolc_price_shifted.l(ttot,regi);
p21_taxrevBio0(ttot,regi) = v21_tau_bio.l(ttot) * vm_fuExtr.l(ttot,regi,"pebiolc","1")*vm_pebiolc_price.l(ttot,regi);
p21_implicitDiscRate0(ttot,regi) = sum(ppfKap(in), p21_implicitDiscRateMarg(ttot,regi,in) * vm_cesIO.l(ttot,regi,in) );
*** EOF ./modules/21_tax/on/presolve.gms
......@@ -58,7 +58,6 @@ v30_multcost(ttot,all_regi) "cost markup factor for deviations from deman
equations
q30_costFuBio(ttot,all_regi) "total costs of bioenergy production"
q30_pebiolc_price(ttot,all_regi) "MAgPIE emulator: calculates the price of pebiolc according to MAgPIE supply curves"
q30_pebiolc_price_base(ttot,all_regi) "MAgPIE emulator: calculates the price of pebiolc according to MAgPIE supply curves"
q30_pebiolc_costs(ttot,all_regi) "MAgPIE emulator: calculates the costs of pebiolc according to MAgPIE supply curves"
q30_priceshift "calculates shift factor by minimizing least squares of price differences between MAgPIE output and MAgPIE emulator"
q30_limitXpBio(ttot,all_regi) "only purpose grown bioenergy may be exported, no residues"
......
......@@ -13,10 +13,11 @@
*'
*' **Total fuel costs for biomass**
*' The first part, summing over *peren2rlf30*, represents costs for biomass with fixed prices.
*' The second part that includes *v30_pebiolc_costs* represents costs for biomass with continous supply curves from MAgPIE.
*' In coupled runs *v30_multcost* is a cost markup factor improving the optimization performance by penalizing
*' (too) large jumps in the demand in between two coupling iterations. It converges to 1 and therefore does not affect the outcome.
*' The last part, containing *pm_costsTradePeFinancial*, represents additional tradecosts (only for purpose grown lignocellulosic biomass).
*' The second part that includes *v30_pebiolc_costs* represents costs for biomass with continous
*' supply curves from MAgPIE. In coupled runs *v30_multcost* is a cost markup factor improving
*' the optimization performance by penalizing (too) large jumps in the demand between two coupling
*' iterations. It converges to 1 and therefore does not affect the outcome. The last part, containing
*' *pm_costsTradePeFinancial*, represents additional tradecosts (only for purpose grown lignocellulosic biomass).
q30_costFuBio(ttot,regi)$(ttot.val ge cm_startyear)..
vm_costFuBio(ttot,regi)
......@@ -28,21 +29,13 @@ $if %cm_MAgPIE_coupling% == "off" (v30_pebiolc_costs(ttot,regi))
+
sum(peren2cont30(enty,rlf), vm_fuExtr(ttot,regi,enty,rlf) * pm_costsTradePeFinancial(regi,"use",enty));
*' **Calculate cost markup factor for coupled runs**
*' It penalizes large jumps from the previous coupling iteration and converges to 1, as the difference between *vm_fuExtr* and
*' *p30_pebiolc_demandmag* vanish when the coupling converges over iterations.
q30_costAdj(ttot,regi)$(ttot.val ge cm_startyear)..
v30_multcost(ttot,regi)
=e=
power((vm_fuExtr(ttot,regi,"pebiolc","1")-p30_pebiolc_demandmag(ttot,regi))/ (p30_pebiolc_demandmag(ttot,regi) + 0.15),2) * 0.4 + 1
;
***---------------------------------------------------------------------------
*** MAgPIE EMULATOR
***---------------------------------------------------------------------------
*' **Caclulate bioenergy price according to MAgPIE supply curves**
*' The equation is mainly used by shift factor calculation in the preloop. In main solve it is only required for bioenergy tax.
*' **Caclulate bioenergy prices according to MAgPIE supply curves**
*' The equation is used by shift factor calculation in the preloop stage. In the main solve stage the price is only used to apply
*' the bioenergy tax.
q30_pebiolc_price(ttot,regi)$(ttot.val ge cm_startyear)..
vm_pebiolc_price(ttot,regi)
......@@ -52,16 +45,6 @@ q30_pebiolc_price(ttot,regi)$(ttot.val ge cm_startyear)..
+ i30_bioen_price_b(ttot,regi) * (vm_fuExtr(ttot,regi,"pebiolc","1") + sm_eps) )
* v30_pricemult(ttot,regi);
*' **Calculate bioenergy price according to shifted MAgPIE supply curves**
*' Required only to calculate the bioenergy tax. For historic reasons there exist both *vm_pebiolc_price_shifted* and
*' *vm_pebiolc_price*. Could be refactored some time.
q30_pebiolc_price_base(ttot,regi)$(ttot.val ge cm_startyear)..
vm_pebiolc_price_shifted(ttot,regi)
=e=
vm_pebiolc_price(ttot,regi)
;
*' **MAgPIE EMULATOR**
*' Calculates bioenergy costs of purpose grown lignocellulosic biomass by integrating the linear price supply curve.
*' It contains optional shift and scaling of supply curves in coupled runs.
......@@ -96,6 +79,21 @@ q30_priceshift$(s30_switch_shiftcalc eq 1)..
)
;
***---------------------------------------------------------------------------
*** COUPLING CONVERGENCE
***---------------------------------------------------------------------------
*' **Calculate cost markup factor for coupled runs**
*' It penalizes deviations in the demand for purpose grown bioenergy from the previous coupling iteration
*' by increasing the costs proportional to the deviation. The scaling factor converges to 1, as the
*' difference between *vm_fuExtr* and *p30_pebiolc_demandmag* vanishes when the coupling converges over
*' iterations.
q30_costAdj(ttot,regi)$(ttot.val ge cm_startyear)..
v30_multcost(ttot,regi)
=e=
power((vm_fuExtr(ttot,regi,"pebiolc","1")-p30_pebiolc_demandmag(ttot,regi))/ (p30_pebiolc_demandmag(ttot,regi) + 0.15),2) * 0.4 + 1
;
***---------------------------------------------------------------------------
*** Definition of resource constraints for biomass
***---------------------------------------------------------------------------
......
......@@ -77,9 +77,7 @@ $endif
***------------ Step 3: calculate bioenergy costs -------------
*** The costs are calculated applying the regular cost equation.
*** This equation integrates the shifted (!) price supply curve over the demand.
*** Since the price shift factor is required for this it has been calcualted before (see above).
*** There is no cost shift factor (anymore) since there is no cost emulator (anymore),
*** because the costs are calculated by integrating the shifted price supply curve.
*** It requires the price shift factor to be calcualted before (see above).
solve model_biopresolve_c using cns; !!! nothing has to be optimized here, just pure calculation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment