Skip to content

Commit

Permalink
Merge pull request #7 from ElectricityAuthority/Real_time_pricing_pha…
Browse files Browse the repository at this point in the history
…se_3

Real time pricing phase 3
  • Loading branch information
TuongEA authored Oct 18, 2022
2 parents 69784aa + 366d187 commit d9e53ae
Show file tree
Hide file tree
Showing 112 changed files with 83,993 additions and 191,202 deletions.
2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

Binary file removed Input/FP_20221015_F.gdx
Binary file not shown.
Binary file removed Input/NRSS_20211202_RTPtest.gdx
Binary file not shown.
Binary file removed Input/PRSS_20220301_RTPtest.gdx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Input/RTP_20220301_RTPtest.gdx
Binary file not shown.
3 changes: 0 additions & 3 deletions Input/dumpGDX.bat

This file was deleted.

4 changes: 0 additions & 4 deletions Input/reloadGDX.bat

This file was deleted.

4 changes: 4 additions & 0 deletions Output/Run_All_Cases/Programs/cplex.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
epint = 1e-9
epopt = 1e-9
sos1reform = -1
sos2reform = -1
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ $endif
loop(i_fileName,

* Create the file that has the name of the input file for the current case being solved
putclose vSPDcase "$setglobal vSPDinputData " i_fileName.tl:0 ;
putclose vSPDcase "$setglobal GDXname " i_fileName.tl:0 ;

* Create a gdx file contains periods to be solved
put_utility temp 'exec' / 'gams vSPDperiod' ;
Expand All @@ -131,13 +131,11 @@ putclose rep / "Total execute time: " timeExec "(secs)" /;
*=====================================================================================
$label cleanUp
execute 'erase "vSPDcase.inc"' ;
execute 'erase "riskGroup.inc"' ;
$ifthen %opMode%=='DWH'
execute 'move /y ProgressReport.txt "%outputPath%%runName%\%runName%_RunLog.txt"';
$else
execute 'move /y ProgressReport.txt "%outputPath%%runName%"';
$endif
$ontext
execute 'if exist *.lst erase /q *.lst '
execute 'if exist *.~gm erase /q *.~gm '
execute 'if exist *.lxi erase /q *.lxi '
Expand All @@ -146,6 +144,6 @@ execute 'if exist *.put erase /q *.put '
execute 'if exist *.txt erase /q *.txt '
execute 'if exist *.gdx erase /q *.gdx '
execute 'if exist temp.* erase /q temp.*'
$offtext



7 changes: 7 additions & 0 deletions Output/Run_All_Cases/Programs/vSPDfileList.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/
'PRSS_202208021530_21302022080330347_20220802153312'
'PRSS_202210101230_91302022102330479_20221010123314'
'RTD_202209021535_21012022090335962_20220902153405'
'RTD_202210101250_91012022102350483_20221010124902'
'RTDP_202209021535_22012022090335962_20220902153406'
/
2,067 changes: 2,067 additions & 0 deletions Output/Run_All_Cases/Programs/vSPDmodel.gms

Large diffs are not rendered by default.

425 changes: 425 additions & 0 deletions Output/Run_All_Cases/Programs/vSPDoverrides.gms

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions Output/Run_All_Cases/Programs/vSPDperiod.gms
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
*=====================================================================================
* Name: vSPDPeriod.gms
* Function: Establish the set of periods selected to be solved in vSPD
* and unload to gdx file for later use in vSPDsolve.gms
* Developed by: Electricity Authority, New Zealand
* Source: https://github.com/ElectricityAuthority/vSPD
* https://www.emi.ea.govt.nz/Tools/vSPD
* Contact: Forum: https://www.emi.ea.govt.nz/forum/
* Email: [email protected]
* Last modified on: 1 Nov 2022
*
*=====================================================================================

$include vSPDsettings.inc
$include vSPDcase.inc

* If input file does not exist then go to the next input file
$ifthen exist "%inputPath%\%GDXname%.gdx"


*===============================================================================
* 1. Initialize set and data
*===============================================================================
Sets
tp 'Set of trading periods'
dt 'Set of datetime'
dt2tp(dt,tp) 'Mapping datetime to trading periods'

stp(tp) 'Trading periods to be solved'
sdt(dt) 'Date time to be solved'
sdt2tp(dt,tp) 'Mapping solved datetime to trading periods'
;
alias (tp,tp1);

Parameter
gdxDate(*) 'day, month, year of trade date'
;

$gdxin "%inputPath%\%GDXname%.gdx"
$load gdxDate
$load tp = i_tradePeriod
$load dt = i_dateTime
$load dt2tp = i_dateTimeTradePeriodMap
$gdxin

*===============================================================================
* 2. Establish which trading periods are to be solved
*===============================================================================
Sets
alp 'All trading periods to be solved' / All /
tmp 'Temporary list of trading period to be solved'
$include vSPDtpsToSolve.inc
;

stp(tp) = no ;
sdt(dt) = no;

stp(tp) $ sum[ tmp, diag(tp,tmp)] = yes ;
sdt(dt) $ sum[ tmp, diag(dt,tmp)] = yes ;

stp(tp) $ sum[ tmp, diag(tmp,'All')] = yes ;
$if %opMode% == 'DWH' stp(tp) = yes;

sdt(dt) $ sum[ stp(tp) $ dt2tp(dt,tp), 1 ] = yes ;
stp(tp) $ sum[ sdt(dt) $ dt2tp(dt,tp), 1 ] = yes ;

sdt2tp(dt,tp) $ sum[ (sdt(dt), stp(tp)) $ dt2tp(dt,tp), 1 ] = yes ;

execute_unload '%programPath%\vSPDperiod.gdx'
stp = i_TradePeriod
sdt = i_DateTime
sdt2tp = i_DateTimeTradePeriod
;

$endif
Loading

0 comments on commit d9e53ae

Please sign in to comment.