Output GDX files for vSPD

  • 25 Views
  • Last post yesterday
Kaka posted this 3 days ago

Hi there

On the main vSPD page it says "vSPD output is generated as a collection of GDX and CSV files". However, when I run vSPD in GAMS Studio, it appears that only CSV files are added to the Output folder. I require GDX files for more efficient analysis of the output data. Can you please indicate where the GDX output files are, or provide instructions on how they can be created?

Thanks

Order by: Standard | Newest | Votes
Phil Bishop posted this yesterday

Hi there

I assume you are referring to v5.0.2 of vSPD. Regardless, my comments below pertain to v5.0.2.

My guess is that the statement on the vSPD page that says "vSPD output is generated as a collection of GDX and CSV files" refers to an older version of vSPD, likely prior to 1 Nov 2022 (the onset of real-time pricing (RTP)). RTP resulted in the vSPD GAMS code being modified substantially. So much so that we no longer maintain backward compatibility, ie a different version of vSPD is reqiured pre and post RTP. In any event, we will modify the vSPD page and remove the comment about writing all output to GDX files.

If you look at the file called vSPDreport.gms you'll see a block of code starting at line 15 that writes output to CSV files. Each CSV file created is within a loop over the sets controlling the domain of the variables (technically parameters) being written to the CSV file. Be aware that this writing to CSV might occur within a larger loop iterating over the days/intervals the model is being solved, ie at each iterate, the CSV report writing appends the file written to in the previous iterate.

Anyway, if you want to write to GDX files instead of or in addition to the CSV files, I suggest you add a statement to write to a GDX file at the point in the vSPDreport code at which the CSV files are written. See GAMS Data eXchange (GDX).

Alternatively, you could write some new code to hoover up all the CSV files and write them to a single GDX file if that better suits your purpose. See CSVRead.

Good luck

Phil

Kaka posted this yesterday

Thanks Phil. Yes, I was referring to v5.0.2 of vSPD.

On review of vSPDreport.gms, I see there is a commented out "execute unload" statement on line 442. To create a GDX file, I simply uncommented this statement.

So you're aware, the same commented out statement exists in VSPDReport.gms for v3.0.4, so it appears the change to output CSV files only pre-dated real-time pricing.

Cheers