Commit 571a40d4 authored by jussi ikäheimo's avatar jussi ikäheimo
Browse files

Merge commit '68d895b1' into storagemapping

parents 251a0ff4 68d895b1
......@@ -56,6 +56,23 @@ GAMS command line arguments
--input_dir=<path>
Directory to read input from. Defaults to './input'.
--input_file_gdx=<filename.gdx>
Filename of the GDX input file. Defaults to 'inputData.gdx'.
--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=<filename>
Filename of the Excel input file. If this filename is given, the GDX input
file is generated from this file using Gdxxrw.
--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>
Directory to write output to. Defaults to './output'.
......@@ -81,9 +98,14 @@ $ife %system.gamsversion%<240 $abort GAMS distribution 24.0 or later required!
* Set default debugging level
$if not set debug $setglobal debug 0
* Default values for input and output dir
* Default values for input and output dir as well as input data GDX file and index sheet when importing data from Excel file
* When reading an Excel file, you can opt to read the file only if the Gdxxrw detects changes by using 'checkDate' for
* 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 output_dir $setglobal output_dir 'output'
$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_checkdate $setglobal input_excel_checkdate ''
* Make sure output dir exists
$if not dexist %output_dir% $call 'mkdir %output_dir%'
......@@ -96,8 +118,10 @@ $onempty // Allow empty data definitions
* Output file streams
Files log /''/, gdx /''/, f_info /'%output_dir%/info.txt'/;
* Include options file to control the solver
$include '%input_dir%/1_options.gms';
* Include options file to control the solver (if it does not exist, uses defaults)
$ifthen exist '%input_dir%/1_options.gms'
$$include '%input_dir%/1_options.gms';
$endif
* === Libraries ===============================================================
$libinclude scenred2
......
......@@ -19,67 +19,77 @@ $offtext
* --- Load Input Data ---------------------------------------------------------
* =============================================================================
$ifthen exist '%input_dir%/inputData.gdx'
$$gdxin '%input_dir%/inputData.gdx'
$$loaddcm grid
$$loaddc node
$$loaddc flow
$$loaddc unittype
$$loaddc unit
$$loaddc unitUnittype
$$loaddc unit_fail
$$loaddc commodity
$$loaddc unitUnitEffLevel
$$loaddc effLevelGroupUnit
$$loaddc group
$$loaddc p_gn
$$loaddc p_gnn
$$loaddc ts_gnn
$$loaddc p_gnu_io
$$loaddc p_gnuBoundaryProperties
$$loaddc p_unit
$$loaddc ts_unit
$$loaddc p_unitConstraint
$$loaddc p_unitConstraintNode
$$loaddc restype
$$loaddc restypeDirection
$$loaddc restypeReleasedForRealization
$$loaddc restype_inertia
$$loaddc p_groupReserves
$$loaddc p_groupReserves3D
$$loaddc p_groupReserves4D
$$loaddc p_gnuReserves
$$loaddc p_gnnReserves
$$loaddc p_gnuRes2Res
$$loaddc ts_reserveDemand
$$loaddc p_gnBoundaryPropertiesForStates
$$loaddc p_uStartupfuel
$$loaddc flowUnit
$$loaddc emission
$$loaddc p_nEmission
$$loaddc ts_cf
* $$loaddc p_price // Disabled for convenience, see line 278-> ("Determine Fuel Price Representation")
$$loaddc ts_priceChange
$$loaddc ts_influx
$$loaddc ts_node
* $$loaddc p_s_discountFactor
$$loaddc t_invest
$$loaddc utAvailabilityLimits
$$loaddc p_storageValue
$$loaddc ts_storageValue
$$loaddc uGroup
$$loaddc gnuGroup
$$loaddc gn2nGroup
$$loaddc gnGroup
$$loaddc sGroup
$$loaddc p_groupPolicy
$$loaddc p_groupPolicyUnit
$$loaddc p_groupPolicyEmission
$$loaddc gnss_bound
$$loaddc uss_bound
$$gdxin
* 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').
$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!
* --input_file_gdx=nameOfInputFile.gdx for input_file_gdx in input_dir
$ifthen exist '%input_dir%/%input_file_gdx%'
$$gdxin '%input_dir%/%input_file_gdx%'
* --input_file_gdx=ABSOLUTE/PATH/nameOfInputFile.gdx for input_file_gdx not in input_dir
$elseif exist '%input_file_gdx%'
$$gdxin '%input_file_gdx%'
$endif
$$loaddcm grid
$$loaddc node
$$loaddc flow
$$loaddc unittype
$$loaddc unit
$$loaddc unitUnittype
$$loaddc unit_fail
$$loaddc commodity
$$loaddc unitUnitEffLevel
$$loaddc effLevelGroupUnit
$$loaddc group
$$loaddc p_gn
$$loaddc p_gnn
$$loaddc ts_gnn
$$loaddc p_gnu_io
$$loaddc p_gnuBoundaryProperties
$$loaddc p_unit
$$loaddc ts_unit
$$loaddc p_unitConstraint
$$loaddc p_unitConstraintNode
$$loaddc restype
$$loaddc restypeDirection
$$loaddc restypeReleasedForRealization
$$loaddc restype_inertia
$$loaddc p_groupReserves
$$loaddc p_groupReserves3D
$$loaddc p_groupReserves4D
$$loaddc p_gnuReserves
$$loaddc p_gnnReserves
$$loaddc p_gnuRes2Res
$$loaddc ts_reserveDemand
$$loaddc p_gnBoundaryPropertiesForStates
$$loaddc p_uStartupfuel
$$loaddc flowUnit
$$loaddc emission
$$loaddc p_nEmission
$$loaddc ts_cf
*$$loaddc p_price // Disabled for convenience, see line 278-> ("Determine Fuel Price Representation")
$$loaddc ts_priceChange
$$loaddc ts_influx
$$loaddc ts_node
$$loaddc p_s_discountFactor
$$loaddc t_invest
$$loaddc utAvailabilityLimits
$$loaddc p_storageValue
$$loaddc ts_storageValue
$$loaddc uGroup
$$loaddc gnuGroup
$$loaddc gn2nGroup
$$loaddc gnGroup
$$loaddc sGroup
$$loaddc p_groupPolicy
$$loaddc p_groupPolicyUnit
$$loaddc p_groupPolicyEmission
$$loaddc gnss_bound
$$loaddc uss_bound
$$gdxin
* Read changes to inputdata through gdx files (e.g. node2.gdx, unit2.gdx, unit3.gdx) - allows scenarios through Sceleton Titan Excel files.
$include 'inc/1e_scenChanges.gms'
......
Markdown is supported
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