Commit 68d895b1 authored by Niina Helistö's avatar Niina Helistö
Browse files

Updates related to #146: Adding documentation and fixing command line argument naming.

parent 0120e11f
...@@ -58,13 +58,20 @@ GAMS command line arguments ...@@ -58,13 +58,20 @@ GAMS command line arguments
--input_file_gdx=<filename.gdx> --input_file_gdx=<filename.gdx>
Filename of the GDX input file. Defaults to 'inputData.gdx'. Filename of the GDX input file. Defaults to 'inputData.gdx'.
--input_file_gdx=<path> including the filename also works. --input_file_gdx=<path> including the filename also works (when used with
input_file_excel, the file is always stored in input_dir).
--input_file_excel=<path> --input_file_excel=<filename>
Filename of the Excel input file including the path. Filename of the Excel input file. If this filename is given, the GDX input
When using this, make sure you have created 1_input_preparation.gms in the file is generated from this file using Gdxxrw.
input directory and included the necessary lines there. See example from
1_input_preparation_temp.gms. --input_excel_index=<spreadsheet name>
Used with input_file_excel: the spreadsheet where the options and symbols
are read. Defaults to 'INDEX'.
--input_excel_checkdate=checkDate
Used with input_file_excel: write GDX file only if the input file is more
recent than the GDX file. Disabled by default.
--output_dir=<path> --output_dir=<path>
Directory to write output to. Defaults to './output'. Directory to write output to. Defaults to './output'.
...@@ -96,7 +103,7 @@ $if not set debug $setglobal debug 0 ...@@ -96,7 +103,7 @@ $if not set debug $setglobal debug 0
* input_excel_checkdate. It is off by default, since there has been some problems with it. * input_excel_checkdate. It is off by default, since there has been some problems with it.
$if not set input_dir $setglobal input_dir 'input' $if not set input_dir $setglobal input_dir 'input'
$if not set output_dir $setglobal output_dir 'output' $if not set output_dir $setglobal output_dir 'output'
$if not set input_data_gdx $setglobal input_data_gdx 'inputData.gdx' $if not set input_file_gdx $setglobal input_file_gdx 'inputData.gdx'
$if not set input_excel_index $setglobal input_excel_index 'INDEX' $if not set input_excel_index $setglobal input_excel_index 'INDEX'
$if not set input_excel_checkdate $setglobal input_excel_checkdate '' $if not set input_excel_checkdate $setglobal input_excel_checkdate ''
......
...@@ -21,7 +21,7 @@ $offtext ...@@ -21,7 +21,7 @@ $offtext
* If input_file excel has been set in the command line arguments, then Gdxxrw will be run to convert the Excel into a GDX file * If input_file excel has been set in the command line arguments, then Gdxxrw will be run to convert the Excel into a GDX file
* using the sheet defined by input_excel_index command line argument (default: 'INDEX'). * using the sheet defined by input_excel_index command line argument (default: 'INDEX').
$if set input_file_excel $call 'gdxxrw Input="%input_dir%/%input_file_excel%" Output="%input_dir%/%input_data_gdx%" Index=%input_excel_index%! %input_excel_checkdate%' $if set input_file_excel $call 'gdxxrw Input="%input_dir%/%input_file_excel%" Output="%input_dir%/%input_file_gdx%" Index=%input_excel_index%! %input_excel_checkdate%'
$ife %system.errorlevel%>0 $abort gdxxrw failed! $ife %system.errorlevel%>0 $abort gdxxrw failed!
* --input_file_gdx=nameOfInputFile.gdx for input_file_gdx in input_dir * --input_file_gdx=nameOfInputFile.gdx for input_file_gdx in input_dir
...@@ -30,9 +30,6 @@ $ifthen exist '%input_dir%/%input_file_gdx%' ...@@ -30,9 +30,6 @@ $ifthen exist '%input_dir%/%input_file_gdx%'
* --input_file_gdx=ABSOLUTE/PATH/nameOfInputFile.gdx for input_file_gdx not in input_dir * --input_file_gdx=ABSOLUTE/PATH/nameOfInputFile.gdx for input_file_gdx not in input_dir
$elseif exist '%input_file_gdx%' $elseif exist '%input_file_gdx%'
$$gdxin '%input_file_gdx%' $$gdxin '%input_file_gdx%'
* default, e.g. for using --input_file_excel and gdxxrw
$elseif exist '%input_dir%/inputData.gdx'
$$gdxin '%input_dir%/inputData.gdx'
$endif $endif
$$loaddcm grid $$loaddcm grid
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment