Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions modules/80_optimization/nash/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ p80_defic_sum_rel(iteration) "Surplus monetary value over all tim
p80_etaLT_correct(all_enty,iteration) "long term price correction factor in percent"
p80_etaST_correct(tall,all_enty,iteration) "short term price correction factor in percent"

p80_Mport_iter(ttot,all_regi,all_enty,iteration) "Imports over iterations"
p80_Xport_iter(ttot,all_regi,all_enty,iteration) "Exports over iterations"
p80_prodPe_iter(ttot,all_regi,all_enty,iteration) "PE production over iterations"
p80_fuExtr_iter(ttot,all_regi,all_enty,rlf,iteration) "Fuel extraction over iterations"

p80_etaST_correct_safecopy(tall,all_enty,iteration) "auxiliary parameter to remember short term price correction factor in percent, before new convergence adjustments"
o80_counter_iteration_trade_ttot(ttot,all_enty,iteration) "auxiliary parameter to display in which iteration and for which item (ttot, trade) additional convergence measures were taken"
o80_trackSurplusSign(ttot,all_enty,iteration) "auxiliary parameter to track how long the surplus for an item (ttot, trade) had the same sign over iterations"
Expand Down
19 changes: 17 additions & 2 deletions modules/80_optimization/nash/postsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,27 @@ p80_normalize0(ttot,regi,tradePe)$(ttot.val ge 2005) = max(0.5 * (sum(rlf, vm_fu
+ p80_normalize0(ttot,regi,tradePe)$(pm_SolNonInfes(regi) eq 0) ,sm_eps);


*** track exports and imports and fuel extraction and prodPe
loop(ttot$(ttot.val ge 2005),
loop(regi,
loop(trade,
p80_Mport_iter(ttot,regi,trade,iteration) = vm_Mport.l(ttot,regi,trade);
p80_Mport_iter(ttot,regi,trade,iteration) = vm_Xport.l(ttot,regi,trade);
);
loop(entyPe,
p80_prodPe_iter(ttot,regi,entyPe,iteration) = vm_prodPe.l(ttot,regi,entyPe);
p80_fuExtr_iter(ttot,regi,entyPe,rlf,iteration) = vm_fuExtr.l(ttot,regi,entyPe,rlf);
);
);
);

***calculate residual surplus on the markets
loop(ttot$(ttot.val ge 2005),
loop(trade$(NOT tradeSe(trade)),
p80_surplus(ttot,trade,iteration) = sum(regi, (vm_Xport.l(ttot,regi,trade) - vm_Mport.l(ttot,regi,trade))$(pm_SolNonInfes(regi) eq 1)
p80_surplus(ttot,trade,iteration) = sum(regi, (vm_Xport.l(ttot,regi,trade) - vm_Mport.l(ttot,regi,trade))$(pm_SolNonInfes(regi) eq 1)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is simply a harmonization of indentation

+ (pm_Xport0(ttot,regi,trade) - p80_Mport0(ttot,regi,trade) )$(pm_SolNonInfes(regi) eq 0) );
);

);
);

*' calculate both the size of the price change due to the price change anticipation effect in percent, as well as
Expand Down
Loading