GAMS [ Home | Downloads | Documentation | Solvers | APIs | Tools | Model Libraries | Resources | Sales | Support | Contact Us | Search ]

GDX2VEDA

Translates a GDX file into the VEDA format.

Usage

gdx2veda gdx vdd [run]

gdx

GAMS GDX file

vdd

VEDA Data Definition file

run

VEDA Run identifier (optional)

The VEDA data file name and run identifier are either taken from the gdx file name or specified with the run name. Use "token with blanks" if needed.

Examples

This example dumps the gdx symbols:

gdx2veda mygdx

This exmaple prints usage and example:

gdx2veda          

To print more detailed help message:

gdx2veda --help   

Add .csv to the run name to write in csv format

Detailed Help Message

VDD file Summary

[DataBaseName]
 myveda

[Dimensions] cube dimensions
 long_name tuple_element1 tuple_element2 ...

[DataEntries] data for the cube
 long_name gams_name tuple_element1 tuple_element2 ...

[DimensionText] for generating .vde file (only for data in [DataEntries])
 gams_set tuple_element1 tuple_element2 ...

[DimensionTextAll] for generating .vde file (also for data not in [DataEntries])
 gams_set tuple_element1 tuple_element2 ...

[SubSets] for generating .vds file
 sub_name gams_name tuple_element1 tuple_element2 ...

[ParentDimension] defines parent-child structure
 parent_tab  child_tab1 child_tab2 ...

[ParentDimensionTextAll] .vde file definitions with parent-child structure
2d_gams_set  parent_tab child_tab
2d_gams_set  child_tab parent_tab

[ParentSubSets] .vds file definitions with parent-child structure
sub_name 2d_gams_set parent_tab child_tab
sub_name 2d_gams_set child_tab parent_tab

[Options]
TupleSeparator "string"  use a different separator symbol between tuple elements
ShowAllSeparators        don't squeeze unnecessary separators
RelaxDimensionAll        relax strict dimensionality checks in DimensionText(All) sections.
ValueDim n               if n=2 write PV/DV value pairs for VEDA
SetsAllowed dim1 dim2 .. write SetsAllowed specification line to VEDA .vd file
Scenario scenarioSet     specify the scenario set; a record with expl text goes to .vde
Format veda/csv          specify the format of the data files
Not-0 attribute ...      don't write records with zero values for these attributes

[SpecialValues]
EPS "string"             value to be used for EPS
INF "string"             value to be used for +INF
MINF "string"            value to be used for -INF
NA "string"              value to be used for NA
UNDEF "string"           value to be used for UNDEF

<myveda>

is usually the application name which will be displayed on the top of the VEDA splash screen. When a new VEDA database is created, a new folder with this name will appear:

...veda\database\mayveda_date_time.

Where data and time are the creation time stamp.

<tab_name>

corresponds to the tabs of your VEDA screen

Lines starting with * and empty lines are ignored. Blanks, commas and tabs are delimiters, blanks before and after delimiters are ignored. Quotes around data items are optional. The input data is NOT case sensitive.

Veda Data Definition file

Example of a Veda Data Definition file:

* Transport model

[DataBaseName]
myveda

[Dimensions]
* tab-name indices
Plants     i
Warehouses j
Links      ii jj

[DataEntries]
* veda_attribute gams_name tab1 tab2 ... for gams index 1, 2, ...
"x(i,j) duals" x.m      i  Warehouses
Shipments      x.l      i  j
SupplyPrice    supply.m i
DemandPrice    demand.m j
TransportCost  c        i  j
Distance       d        ii jj
Supply         a        i
Demand         b        j
TotalCost      z.l
SupplyNodes    i        i
DemandNodes    j        j
Rate           f

[DimensionText]
* gams_set tab
i  i

[DimensionTextAll]
* gams_set tab
j  j

[SubSets]
* sub_name gams_name tab
i1 ic  Plants  
i1 id  i       

Notes:

The long name from the [Dimensions] section can be used as a macro that expands to the tuples it defines. E.g. "Links" is identical to "ii jj".

In the [DataEntries] section a literal tuple element can be defined as /element/.

When ValueDim=2, the [DataEntries] section can contain X.LM entries, indicating both .L and .M needs to written as a pair.