Phil Bishop
posted this
19 November 2024
- Last edited 19 November 2024
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