Skip to content

Commit

Permalink
Add Period's start datetime to Publsihed Price reports
Browse files Browse the repository at this point in the history
  • Loading branch information
TuongEA committed Nov 29, 2023
1 parent 5ca51ff commit 446da43
Show file tree
Hide file tree
Showing 8 changed files with 1,089 additions and 354 deletions.
2 changes: 1 addition & 1 deletion Programs/vSPDfileList.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/
'Pricing_20221105'
'Pricing_20231128'
/
Binary file modified Programs/vSPDmodel.g00
Binary file not shown.
1 change: 1 addition & 0 deletions Programs/vSPDmodel.gms
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ Scalars
Sets
* Global
case2dt(ca,dt) 'mapping caseID-DateTime pair'
tp2dt(tp,dt) 'mapping period to first datetime in a period '
t(ca,dt) 'Current trading interval to solve'

* Node/bus
Expand Down
1,419 changes: 1,076 additions & 343 deletions Programs/vSPDoverrides.gms

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Programs/vSPDreport.gms
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ File PublishedEnergyPrices_TP /"%outputPath%\%runName%\%runName%_PublishedEnerg
PublishedEnergyPrices_TP.pc = 5; PublishedEnergyPrices_TP.lw = 0; PublishedEnergyPrices_TP.pw = 9999;
PublishedEnergyPrices_TP.ap = 1; PublishedEnergyPrices_TP.nd = 5; PublishedEnergyPrices_TP.nw = 20;
put PublishedEnergyPrices_TP ;
loop( (tp,n),
put tp.tl, n.tl, o_PublisedPrice_TP(tp,n) / ;
loop( (dt,tp,n) $ tp2dt(tp,dt) ,
put dt.tl,tp.tl, n.tl, o_PublisedPrice_TP(tp,n) / ;
) ;

* Published reserve prices
File PublishedReservePrices_TP /"%outputPath%\%runName%\%runName%_PublishedReservePrices_TP.csv"/;
PublishedReservePrices_TP.pc = 5; PublishedReservePrices_TP.lw = 0; PublishedReservePrices_TP.pw = 9999;
PublishedReservePrices_TP.ap = 1; PublishedReservePrices_TP.nd = 5; PublishedReservePrices_TP.nw = 20;
put PublishedReservePrices_TP ;
loop( (tp,isl),
put tp.tl, isl.tl, o_PublisedFIRPrice_TP(tp,isl), o_PublisedSIRPrice_TP(tp,isl) / ;
loop( (dt,tp,isl) $ tp2dt(tp,dt) ,
put dt.tl, tp.tl, isl.tl, o_PublisedFIRPrice_TP(tp,isl), o_PublisedSIRPrice_TP(tp,isl) / ;
) ;

* Trading period offer result
Expand Down Expand Up @@ -439,6 +439,6 @@ loop( (ca,dt,tp) $ case2dt2tp(ca,dt,tp),
execute_unload '%outputPath%\%runName%\%GDXname%_AllData.gdx' ;
$endif.AuditReport
*===============================================================================
execute_unload '%outputPath%\%runName%\%GDXname%_AllData.gdx' ;
*execute_unload '%outputPath%\%runName%\%GDXname%_AllData.gdx' ;


4 changes: 2 additions & 2 deletions Programs/vSPDreportSetup.gms
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ put nodeResults_TP 'CaseID','DateTime','Period', 'Node','Generation (MW)','Load

File PublishedEnergyPrices_TP /"%outputPath%\%runName%\%runName%_PublishedEnergyPrices_TP.csv"/;
PublishedEnergyPrices_TP.pc = 5 ; PublishedEnergyPrices_TP.lw = 0 ; PublishedEnergyPrices_TP.pw = 9999 ;
put PublishedEnergyPrices_TP 'TradingPeriod','Pnodename','vSPDDollarsPerMegawattHour';
put PublishedEnergyPrices_TP 'DateTime','TradingPeriod','Pnodename','vSPDDollarsPerMegawattHour';

File PublishedReservePrices_TP /"%outputPath%\%runName%\%runName%_PublishedReservePrices_TP.csv"/;
PublishedReservePrices_TP.pc = 5 ; PublishedReservePrices_TP.lw = 0 ; PublishedReservePrices_TP.pw = 9999 ;
put PublishedReservePrices_TP 'TradingPeriod','Island','vSPDFIRDollarsPerMegawattHour','vSPDSIRDollarsPerMegawattHour';
put PublishedReservePrices_TP 'DateTime','TradingPeriod','Island','vSPDFIRDollarsPerMegawattHour','vSPDSIRDollarsPerMegawattHour';

File offerResults_TP / "%outputPath%\%runName%\%runName%_OfferResults_TP.csv" /;
offerResults_TP.pc = 5; offerResults_TP.lw = 0; offerResults_TP.pw = 9999;
Expand Down
6 changes: 3 additions & 3 deletions Programs/vSPDsettings.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $inlinecom ## ##
$eolcom !

*+++ Paths +++
$setglobal runName daily_202221105_0140_RTD
$setglobal runName Testing

$setglobal programPath '%system.fp%'
$setglobal inputPath '%system.fp%..\Input\'
Expand All @@ -14,7 +14,7 @@ $setglobal vSPDinputOvrdData '' !Name of override file
*+++ Model +++
Scalar sequentialSolve / 0 / ; ! Vectorisation: Yes <-> i_SequentialSolve: 0
Scalar dailymode / 0 / ; ! Solving quickly by using RTD pre-calculated demand or PRSS solved initial MW
Scalar dailymode / 1 / ; ! Solving quickly by using RTD pre-calculated demand or PRSS solved initial MW
*+++ Network +++
Scalar useACLossModel / 1 / ;
Expand Down Expand Up @@ -44,4 +44,4 @@ $setglobal licenseMode 1
*+++ Various switches +++
$setglobal opMode SPD ! DWH for data warehouse; AUD for audit; FTR for FTR Rental; SPD for normal SPD run; PVT for pivot analysis; DPS for demand~price sensitivity analysis
$setglobal opMode SPD ! SPD for normal SPD run;
1 change: 1 addition & 0 deletions Programs/vSPDsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ $if exist "%ovrdPath%%vSPDinputOvrdData%.gdx" $include vSPDoverrides.gms
studyMode(ca,dt) = runMode(ca,'studyMode');
IntervalDuration(ca,dt) = runMode(ca,'intervalLength');
case2dt(ca,dt) = yes $ sum[ tp $ case2dt2tp(ca,dt,tp), 1] ;
tp2dt(tp,dt) = yes $ [ord(dt) = smin[case2dt2tp(ca,dt1,tp), ord(dt1)] ];

* Nodal data
node(ca,dt,n) = yes $ sum[ b $ nodeBus(ca,dt,n,b), 1 ] ;
Expand Down

0 comments on commit 446da43

Please sign in to comment.