Veda2.0 Released!


Source code for the commodity input/output for each process
#1
Hi,

I'm looking for a source code with the information of commodity input/output for each process.

The purpose of this is to put it into SQL Server to build a database for UKTM runs. Currently we've put the VD file produced from VEDA Front End into SQL Server and it's working well. But it doesn't show the which process has which commodities as inputs and outputs.

It would be great if you could point me in the right direction.

Thank you
Shibo
Reply
#2
I am not sure what you mean by "source code" here. But by reading the documentation, I can see that one can request having the process topology in the *.VD file if you use the option RPT_OPT('FLO','7')=1. It will be reported in the attribute PAR_TOP.

In addition, the documentation also tells me that the *.VDT file produced by VEDA-FE also contains the topology information. And looking at the files produced, I can see that is indeed the case. In addition, the documentation also mentions that the GAMS attributes TOP(r,p,c,io) and RPC_IRE(r,p,c,ie) contain the topology information. The full GDX file produced from each run thus contains the topology information in these GAMS attributes, which you could easily dump out in CSV format.

So, from the documentation, I quickly found at least these options for getting the information showing which process has which commodities as inputs and outputs.
Reply
#3
(09-01-2020, 09:23 PM)Antti-L Wrote: I am not sure what you mean by "source code" here. But by reading the documentation, I can see that one can request having the process topology in the *.VD file if you use the option RPT_OPT('FLO','7')=1. It will be reported in the attribute PAR_TOP.

In addition, the documentation also tells me that the *.VDT file produced by VEDA-FE also contains the topology information. And looking at the files produced, I can see that is indeed the case. In addition, the documentation also mentions that the GAMS attributes TOP(r,p,c,io) and RPC_IRE(r,p,c,ie) contain the topology information. The full GDX file produced from each run thus contains the topology information in these GAMS attributes, which you could easily dump out in CSV format.

So, from the documentation, I quickly found at least these options for getting the information showing which process has which commodities as inputs and outputs.

Hi Antti,

Thank you so much for your reply, that's very helpful.

It's good to know that it would be included in the *.VD file if I change the option. I've found RPT_OPT in the front end, but how can I change the setting to be RPT_OPT('FLO','7')=1?

And also what would be the software to open VDT file and GDX file?

Thank you so much
Shibo
Reply
#4
As far as I can see, the VEDA Attributes master tells that the indexes in RPT_OPT should be specified in Other_Indexes.  The value can be put into AllRegions. Thus, to define RPT_OPT('FLO','7')=1, I think you can put FLO~7 into Other_Indexes and 1 into AllRegions (in a ~TFM_INS table).

The *.VDT files are basically just CSV files (fixed format text files, with comma separated values, see Wikipedia:CSV), which you can directly read into any database system. The GAMS GDX files are binary files, which you can view with the GAMS utilities, and as said, you can easily dump out any attributes into CSV files by using the GDXDUMP utility. Please read the GAMS documentation for details.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)