Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix to cm_flex_tax bug #1150

Merged
merged 6 commits into from
Jan 12, 2023
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
2 changes: 1 addition & 1 deletion modules/32_power/DTcoup/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ q32_flexPriceBalance(t,regi)$(cm_FlexTaxFeedback eq 1)..
q32_flexAdj(t,regi,te)$(teFlexTax(te))..
vm_flexAdj(t,regi,te)
=e=
(1-v32_flexPriceShare(t,regi,te)) * pm_SEPrice(t,regi,"seel")$(cm_flex_tax eq 1 AND t.val ge 2025)
(1-v32_flexPriceShare(t,regi,te)) * pm_SEPrice(t,regi,"seel")$((cm_flex_tax eq 1) AND (t.val ge 2025) and (pm_SEPrice(t,regi,"seel") gt 0))
;

*** EOF ./modules/32_power/DTcoup/equations.gms
2 changes: 1 addition & 1 deletion modules/32_power/IntC/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ q32_flexPriceBalance(t,regi)$(cm_FlexTaxFeedback eq 1)..
q32_flexAdj(t,regi,te)$(teFlexTax(te))..
vm_flexAdj(t,regi,te)
=e=
(1-v32_flexPriceShare(t,regi,te)) * pm_SEPrice(t,regi,"seel")$(cm_flex_tax eq 1 AND t.val ge 2025)
(1-v32_flexPriceShare(t,regi,te)) * pm_SEPrice(t,regi,"seel")$((cm_flex_tax eq 1) AND (t.val ge 2025) and (pm_SEPrice(t,regi,"seel") gt 0))
;

*** EOF ./modules/32_power/IntC/equations.gms
16 changes: 0 additions & 16 deletions modules/32_power/IntC/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,10 @@
*** | Contact: [email protected]
*** SOF ./modules/32_power/IntC/presolve.gms


*** calculation of SE electricity price (useful for internal use and reporting purposes)
pm_SEPrice(t,regi,entySE)$( abs(qm_budget.m(t,regi)) gt sm_eps
AND sameas(entySE,"seel") )
= q32_balSe.m(t,regi,entySE)
/ qm_budget.m(t,regi);

if (cm_flex_tax eq 1,
if (smin((t,regi)$( t.val ge 2025 ), pm_SEprice(t,regi,"seel")) lt 0,
put logfile,
"Negative seel prices with the potential to crash q32_flexAdj:" /;
loop ((t,regi)$( pm_SEprice(t,regi,"seel") lt 0 AND t.val ge 2025 ),
put pm_SEprice.tn(t,regi,"seel"), " = ", pm_SEprice(t,regi,"seel") /;
);

putclose " ", logfile /;

execute_unload "abort.gdx";
abort "negative seel prices that could crash q32_flexAdj";
);
);

*** EOF ./modules/32_power/IntC/presolve.gms