Commit 3870cbf2 authored by Juha Kiviluoma's avatar Juha Kiviluoma
Browse files

Merge commit '3f0e463b'

# Conflicts:
#	CHANGELOG.md
#	README.md
parents 485eaf97 3f0e463b
{"type": "parameter_renamer", "name_map": {"boundaryValue": "ts_node", "capacityFactor": "ts_cf", "coefficient": "p_unitConstraintNode", "constant": "p_unitConstraint", "discountFactor": "p_s_discountFactor", "emission_content": "p_nEmission", "forwardReserve": "p_gnuRes2Res", "influx": "ts_influx", "priceChange": "ts_priceChange", "reserveDemand": "ts_reserveDemand", "storageValue": "p_storageValue", "value": "p_gnPolicy"}}
\ No newline at end of file
{"type": "entity_class_renamer", "name_map": {"boundarytypes": "param_gnBoundaryTypes", "effLevel__group__unit": "effLevelGroupUnit", "flow__unit": "flowUnit", "grid__node__group": "gnGroup", "grid__node__node__group": "gn2nGroup", "grid__node__sample__sample": "gnss_bound", "grid__node__unit__group": "gnuGroup", "restype__direction": "restypeDirection", "restype_released_for_realization": "restypeReleasedForRealization", "sample__group": "sGroup", "unit__group": "uGroup", "unit__sample__sample": "uss_bound", "unit__t__availability": "utAvailabilityLimits", "unit__unittype": "unitUnittype", "unit_aggregate__unit__efflevel": "unitUnitEffLevel"}}
\ No newline at end of file
This diff is collapsed.
......@@ -5,6 +5,9 @@
* Output file streams
file f_changes /'output\changes.inc'/;
f_changes.lw = 26; // Field width of set label output, default in GAMS is 12, increase as needed
f_changes.pw = 500; // Number of characters that may be placed on a single row of the page, default in GAMS is 255, increase as needed
put f_changes
* Do not allow investments in the child setups
......@@ -17,13 +20,22 @@ loop(unit${r_invest(unit)},
tmp = round(r_invest(unit), 0)
put "p_unit('", unit.tl, "', 'unitCount') = p_unit('", unit.tl, "', 'unitCount') + ", tmp, ";"/;
);
* Update maxGen and maxCons values in the child setups
* Update capacity values in the child setups
loop(gnu(grid, node, unit)${r_invest(unit)},
tmp = round(r_invest(unit), 0) * p_gnu(grid, node, unit, 'unitSizeGen');
put "p_gnu('", grid.tl, "', '", node.tl, "', '", unit.tl, "', 'maxGen') = p_gnu('", grid.tl, "', '", node.tl, "', '", unit.tl, "', 'maxGen') + ", tmp, ";"/;
tmp = round(r_invest(unit), 0) * p_gnu(grid, node, unit, 'unitSizeCons');
put "p_gnu('", grid.tl, "', '", node.tl, "', '", unit.tl, "', 'maxCons') = p_gnu('", grid.tl, "', '", node.tl, "', '", unit.tl, "', 'maxCons') + ", tmp, ";"/;
);
tmp = round(r_invest(unit), 0) * p_gnu(grid, node, unit, 'unitSize');
put "p_gnu('", grid.tl, "', '", node.tl, "', '", unit.tl, "', 'capacity') = p_gnu('", grid.tl, "', '", node.tl, "', '", unit.tl, "', 'capacity') + ", tmp, ";"/;);
* Example updates for storage units (commented out at the moment, use names etc. that work in your case)
*p_gnBoundaryPropertiesForStates('battery_grid', 'battery_node', 'upwardLimit', 'useConstant') = 1;
*p_gnBoundaryPropertiesForStates('battery_grid', 'battery_node', 'upwardLimit', 'multiplier') = 1;
*p_gnBoundaryPropertiesForStates('battery_grid', 'battery_node', 'upwardLimit', 'constant')
* = p_gnu('battery_grid', 'battery_node', 'battery_charge', 'upperLimitCapacityRatio') * p_gnu('battery_grid', 'battery_node', 'battery_charge', 'capacity');
*p_gnu('battery_grid', 'battery_node', 'battery_charge', 'upperLimitCapacityRatio') = 0;
*uGroup('battery_charge', 'battery_online_group1') = yes;
*uGroup('battery_discharge', 'battery_online_group1') = yes;
*p_groupPolicy('battery_online_group1', 'constrainedOnlineTotalMax') = p_unit('battery_charge', 'unitCount');
*p_groupPolicy3D('battery_online_group1', 'constrainedOnlineMultiplier', 'battery_charge') = 1;
*p_groupPolicy3D('battery_online_group1', 'constrainedOnlineMultiplier', 'battery_discharge') = 1;
* Do not allow investments in the child setups (commented out at the moment)
*loop(gn2n_directional(grid, node, node_),
......
......@@ -56,9 +56,29 @@ 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'.
--output_file=<filename.gdx>
Filename of the results file. Defaults to 'results.gdx'
References
----------
......@@ -72,12 +92,20 @@ References
==========================================================================
$offtext
* Check current GAMS version
$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%'
......@@ -90,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
......@@ -127,6 +157,12 @@ $include '%input_dir%/modelsInit.gms'
* === Simulation ==============================================================
// Macro for checking solve status (1 = normal completion)
$macro checkSolveStatus(mdl) \
if(mdl.solveStat > 1 and (mdl.modelStat <> 1 or mdl.modelStat <> 8), \
execError = execError + 1 \
)
$include 'inc/3a_periodicInit.gms' // Initialize modelling loop
loop(modelSolves(mSolve, tSolve)$(execError = 0),
solveCount = solveCount + 1;
......@@ -159,7 +195,9 @@ $include 'inc/4c_outputQuickFile.gms'
* Post-process results
$if exist '%input_dir%/4d_postProcess.gms' $include '%input_dir%/4d_postProcess.gms'
execute_unload '%output_dir%/results.gdx',
$if not set output_file $setglobal output_file 'results.gdx'
execute_unload '%output_dir%/%output_file%',
$$include 'defOutput/resultSymbols.inc'
;
......
......@@ -7,7 +7,9 @@ All notable changes to this project will be documented in this file.
## [1.3.3] - 2021-04-14
- Transfer can have additional 'variable' costs (costs per MWh transferred)
- Storages consider the duration of the reserve activation
- Reserve activation duration and reactivation time included (in state constraints)
- Raise execution error if solver did not finish normally
- Updated the selection of unit efficiency approximation levels
- Additional result outputs
## [1.3.2] - 2021-01-19
......@@ -18,10 +20,12 @@ All notable changes to this project will be documented in this file.
- Additional result outputs concerning emissions
## [1.3] - 2020-10-21
-
- Static inertia requirement can be fulfilled by both rotational inertia of machines and certain reserve products
- Dynamic generation portfolios aka pathway modelling aka multi-year simulations with discounted costs enabled
- Parameters p_gnPolicy and p_groupPolicy3D replaced with p_groupPolicyEmission and p_groupPolicyUnit
## [1.2.2] - 2020-06-09
-
- Clean up, minor bug fixes and more results outputs
## [1.2.1] - 2019-11-26
### Fixed
......@@ -60,6 +64,28 @@ All notable changes to this project will be documented in this file.
- Limiting the provision of online reserve based on the online variable
- Sample probability bug from scenario reduction (probability of single scenario above one)
## 1.1.5 - 2020-11-28
### Fixed
- Long-term scenario data when using only one scenario
- Bug with scenario smooting which caused wrong values on later than first solve
## 1.1.4 - 2019-11-02
### Fixed
- Sample probability bug from scenario reduction
## 1.1.3 - 2019-10-24
### Changed
- Scenario reduction is done based on total available energy
## 1.1.2 - 2019-10-23
### Changed
- Maintain original scenario labels after reduction
## [1.1] - 2019-04-17
### Added
- New model setting 't_perfectForesight' tells the number of time steps (from
......
......@@ -47,18 +47,18 @@ Model building /
* q_genRampChange
* q_rampUpLimit
* q_rampDownLimit
* q_outputRatioFixed
* q_outputRatioConstrained
q_conversionDirectInputOutput
* q_conversionSOS2InputIntermediate
* q_conversionSOS2Constraint
* q_conversionSOS2IntermediateOutput
* q_conversionIncHR
* q_conversionIncHRMaxGen
* q_conversionIncHRMaxOutput
* q_conversionIncHRBounds
* q_conversionIncHR_help1
* q_conversionIncHR_help2
* q_fuelUseLimit
* q_unitEqualityConstraint
* q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
q_transfer
......@@ -83,6 +83,7 @@ Model building /
* q_capacityMargin
* q_constrainedCapMultiUnit
* q_emissioncap
* q_energyMax
* q_energyShareMax
* q_energyShareMin
* q_ReserveShareMax
......
......@@ -49,13 +49,15 @@ if (mType('building'),
// Define time span of samples
msStart('building', 's000') = 1;
msEnd('building', 's000') = msStart('building', 's000') + mSettings('building', 't_horizon');
msEnd('building', 's000') = msStart('building', 's000') + mSettings('building', 't_end') + mSettings('building', 't_horizon');
// Define the probability (weight) of samples
p_msProbability('building', s) = 0;
p_msProbability('building', 's000') = 1;
p_msWeight('building', s) = 0;
p_msWeight('building', 's000') = 1;
p_msAnnuityWeight('building', s) = 0;
p_msAnnuityWeight('building', 's000') = 1;
* --- Define Time Step Intervals ----------------------------------------------
......
......@@ -47,18 +47,18 @@ Model invest /
q_rampDownLimit
q_rampUpDown
q_rampSlack
q_outputRatioFixed
q_outputRatioConstrained
q_conversionDirectInputOutput
q_conversionSOS2InputIntermediate
q_conversionSOS2Constraint
q_conversionSOS2IntermediateOutput
q_conversionIncHR
q_conversionIncHRMaxGen
q_conversionIncHRMaxOutput
q_conversionIncHRBounds
q_conversionIncHR_help1
q_conversionIncHR_help2
q_fuelUseLimit
q_unitEqualityConstraint
q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
q_transfer
......@@ -83,6 +83,7 @@ Model invest /
q_capacityMargin
q_constrainedCapMultiUnit
q_emissioncap
q_energyMax
q_energyShareMax
q_energyShareMin
q_ReserveShareMax
......
......@@ -49,6 +49,9 @@ if (mType('invest'),
ms_central('invest', s) = no;
// Define time span of samples
// For selecting the samples, see, for example, https://doi.org/10.1016/j.energy.2020.118585.
// The duration of the samples can be, for example, 1 day or 1 week (24 h or 168 h).
// The samples can have different durations.
msStart('invest', 's000') = 1;
msEnd('invest', 's000') = msStart('invest', 's000') + 168;
msStart('invest', 's001') = 1 + 18*168;
......@@ -56,15 +59,31 @@ if (mType('invest'),
msStart('invest', 's002') = 1 + 35*168;
msEnd('invest', 's002') = msStart('invest', 's002') + 168;
// Define the probability (weight) of samples
// Define the probability of samples
// Probabilities are 1 in deterministic model runs.
// It is also possible to include, for example, 3 samples from a cold year with a probability of 1/10
// and 3 samples from a normal year year with a probability of 9/10.
p_msProbability('invest', s) = 0;
p_msProbability('invest', 's000') = 1;
p_msProbability('invest', 's001') = 1;
p_msProbability('invest', 's002') = 1;
// Define the weight of samples
// Weights describe how many times the samples are repeated in order to get the (typically) annual results.
// For example, 3 samples with equal weights and with a duration of 1 week should be repeated 17.38 times in order
// to cover the 52.14 weeks of the year.
// Weights are used for scaling energy production and consumption results and for estimating node state evolution.
p_msWeight('invest', s) = 0;
p_msWeight('invest', 's000') = 8760/504;
p_msWeight('invest', 's001') = 8760/504;
p_msWeight('invest', 's002') = 8760/504;
p_msWeight('invest', 's000') = 8760/168/3;
p_msWeight('invest', 's001') = 8760/168/3;
p_msWeight('invest', 's002') = 8760/168/3;
// Define the weight of samples in the calculation of fixed costs
// The sum of p_msAnnuityWeight should be 1 over the samples belonging to the same year.
// The p_msAnnuityWeight parameter is used for describing which samples belong to the same year so that the model
// is able to calculate investment costs and fixed operation and maintenance costs once per year.
p_msAnnuityWeight('invest', s) = 0;
p_msAnnuityWeight('invest', 's000') = 1/3;
p_msAnnuityWeight('invest', 's001') = 1/3;
p_msAnnuityWeight('invest', 's002') = 1/3;
* --- Define Time Step Intervals ----------------------------------------------
......@@ -125,7 +144,7 @@ if (mType('invest'),
mSettingsEff('invest', 'level1') = inf;
// Define the horizon when start-up and shutdown trajectories are considered
mSettings('invest', 't_trajectoryHorizon') = 8760;
mSettings('invest', 't_trajectoryHorizon') = 0;
* --- Define output settings for results --------------------------------------
......@@ -142,8 +161,8 @@ if (mType('invest'),
* --- Control the solver ------------------------------------------------------
// Control the use of advanced basis
mSettings('invest', 'loadPoint') = 2; // 0 = no basis, 1 = latest solve, 2 = all solves, 3 = first solve
mSettings('invest', 'savePoint') = 2; // 0 = no basis, 1 = latest solve, 2 = all solves, 3 = first solve
mSettings('invest', 'loadPoint') = 0; // 0 = no basis, 1 = latest solve, 2 = all solves, 3 = first solve
mSettings('invest', 'savePoint') = 0; // 0 = no basis, 1 = latest solve, 2 = all solves, 3 = first solve
); // END if(mType)
......
......@@ -41,24 +41,24 @@ Model schedule /
q_onlineOnStartUp
q_offlineAfterShutDown
q_onlineMinUptime
* q_onlineCyclic
* q_onlineCyclic
q_genRamp
q_rampUpLimit
q_rampDownLimit
q_rampUpDown
q_rampSlack
q_outputRatioFixed
q_outputRatioConstrained
q_conversionDirectInputOutput
q_conversionSOS2InputIntermediate
q_conversionSOS2Constraint
q_conversionSOS2IntermediateOutput
q_conversionIncHR
q_conversionIncHRMaxGen
q_conversionIncHRMaxOutput
q_conversionIncHRBounds
q_conversionIncHR_help1
q_conversionIncHR_help2
q_fuelUseLimit
q_unitEqualityConstraint
q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
q_transfer
......@@ -80,9 +80,10 @@ Model schedule /
q_inertiaMin
q_instantaneousShareMax
q_constrainedOnlineMultiUnit
* q_capacityMargin
q_capacityMargin
* q_constrainedCapMultiUnit
* q_emissioncap
* q_energyMax
* q_energyShareMax
* q_energyShareMin
q_ReserveShareMax
......
......@@ -59,13 +59,15 @@ if (mType('schedule'),
// Define time span of samples
msStart('schedule', 's000') = 1;
msEnd('schedule', 's000') = msStart('schedule', 's000') + mSettings('schedule', 't_horizon');
msEnd('schedule', 's000') = msStart('schedule', 's000') + mSettings('schedule', 't_end') + mSettings('schedule', 't_horizon'); // May not work if using scenarios
// Define the probability (weight) of samples
p_msProbability('schedule', s) = 0;
p_msProbability('schedule', 's000') = 1;
p_msWeight('schedule', s) = 0;
p_msWeight('schedule', 's000') = 1;
p_msAnnuityWeight('schedule', s) = 0;
p_msAnnuityWeight('schedule', 's000') = 1;
// If using long-term samples, uncomment
//ms_central('schedule', 's001') = yes;
......@@ -130,7 +132,7 @@ if (mType('schedule'),
mTimeseries_loop_read('schedule', 'ts_cf') = no;
mTimeseries_loop_read('schedule', 'ts_reserveDemand') = no;
mTimeseries_loop_read('schedule', 'ts_node') = no;
mTimeseries_loop_read('schedule', 'ts_fuelPriceChange') = no;
mTimeseries_loop_read('schedule', 'ts_priceChange') = no;
mTimeseries_loop_read('schedule', 'ts_unavailability') = no;
// Define Realized and Central forecasts
......@@ -138,6 +140,9 @@ if (mType('schedule'),
mf_realization('schedule', 'f00') = yes;
mf_central('schedule', f) = no;
mf_central('schedule', 'f02') = yes;
// Define special forecast label that holds scenario data
//mf_scenario('schedule', 'scen') = yes;
// Define forecast probabilities (weights)
p_mfProbability('schedule', f) = 0;
......
......@@ -46,16 +46,15 @@ p_gnn
p_gnu
p_groupReserves
p_gnuReserves
p_gnPolicy
p_groupPolicy
p_groupPolicy3D
p_fuelEmission
p_uFuel
p_unitFuelEmissionCost
p_groupPolicyUnit
p_groupPolicyEmission
p_nEmission
p_unitEmissionCost
p_effUnit
p_effGroupUnit
p_uNonoperational
p_uStartup
p_uStartupfuel
p_u_maxOutputInLastRunUpInterval
p_u_runUpTimeIntervals
dt_toStartup
......@@ -74,7 +73,6 @@ v_gen_inc
v_genRamp
v_transfer
v_state
v_fuelUse
v_sos2
v_spill
v_online_LP
......@@ -123,18 +121,18 @@ v_help_inc
q_rampDownLimit
q_rampUpDown
q_rampSlack
q_outputRatioFixed
q_outputRatioConstrained
q_conversionDirectInputOutput
q_conversionSOS2InputIntermediate
q_conversionSOS2Constraint
q_conversionSOS2IntermediateOutput
q_conversionIncHR
q_conversionIncHRMaxGen
q_conversionIncHRMaxOutput
q_conversionIncHRBounds
q_conversionIncHR_help1
q_conversionIncHR_help2
q_fuelUseLimit
q_unitEqualityConstraint
q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
q_transfer
......@@ -142,6 +140,8 @@ v_help_inc
q_transferLeftwardLimit
q_resTransferLimitRightward
q_resTransferLimitLeftward
q_reserveProvisionRightward
q_reserveProvisionLeftward
// State Variables
q_stateSlack
......@@ -159,6 +159,7 @@ v_help_inc
q_emissioncap
q_energyShareMax
q_energyShareMin
q_ReserveShareMax
* Dummy variables
vq_gen
......
......@@ -19,6 +19,9 @@ $offtext
* --- Results Symbols Included in Output --------------------------------------
* =============================================================================
* --- Symbols related to the simulation setup ---------------------------------
t_realized = t
* --- Cost Result Symbols -----------------------------------------------------
// Total Objective Function
......@@ -36,6 +39,8 @@ r_uTotalStartupCost
r_gnStateSlackCost
r_gnTotalStateSlackCost
r_gnStorageValueChange
r_gnnVariableTransCost
r_gnnTotalVariableTransCost
// Investment and Fixed Operation and Maintenance Cost Components
r_gnuFOMCost
......@@ -70,6 +75,8 @@ r_stateSlack
// Energy transfer and spill variable results
r_transfer
r_transferRightward
r_transferLeftward
r_spill
// Interesting node related results
......@@ -124,6 +131,17 @@ r_uTotalOnlinePerUnit
r_uTotalStartup
r_uTotalShutdown
* --- Emissions Results -----------------------------------------------
// Unit level emissions
r_emissions
// Emission sums
r_nuTotalEmissions
r_nTotalEmissions
r_uTotalEmissions
r_totalEmissions
* --- Reserve Provision Result Symbols ----------------------------------------
// Reserve provision results required for model structure !!!!!!!!!!!!!!!!!!!!!
......@@ -145,6 +163,11 @@ r_resDemandLargestInfeedUnit
r_invest
r_investTransfer
* --- Sum results for groups --------------------------------------------------
// gnTotalgen in units that belong to gnuGroups over the simulation
r_gnTotalGenGnuGroup
* --- Dummy and Diagnostic Variable Result Symbols ----------------------------
// Results regarding solution feasibility
......
This diff is collapsed.
......@@ -18,17 +18,18 @@ $offtext
Sets
* --- Geography ---------------------------------------------------------------
grid "Forms of energy endogenously presented in the model" / empty /
node "Nodes where different types of energy are converted"
node "Nodes maintain the energy balance or track exogenous commodities"
* --- Fuels & resources -------------------------------------------------------
* --- Commodities & resources -------------------------------------------------------
emission "Emissions"
fuel "Fuels"
commodity(node) "Commodities that can be bought or sold exogenous to model"
flow "Flow based energy resources (time series)"
* --- Energy generation and consumption ---------------------------------------
unit "Set of generators, storages and loads"
unittype "Unit technology types"
unit_flow(unit) "Unit that depend directly on variable energy flows (RoR, solar PV, etc.)"
unit_fuel(unit) "Units using a commercial fuel"
unit_commodity(unit) "Units using an exogenous commodity with a price"
unit_fail(unit) "Units that might fail"
unit_minLoad(unit) "Units that have unit commitment restrictions (e.g. minimum power level)"
unit_online(unit) "Units that have an online variable in the first active effLevel"
......@@ -40,12 +41,13 @@ Sets
unit_slope(unit) "Units with piecewise linear efficiency constraints"
unit_noSlope(unit) "Units without piecewise linear efficiency constraints"
unitAggregator_unit(unit, unit) "Aggregate unit linked to aggregated units"
unitUnitEffLevel(unit, unit, EffLevel) "Aggregator unit linke to aggreted units with a definition when to start the aggregation"
flowUnit(flow, *) "Units or storages linked to a certain energy flow time series"
unitUnittype(unit, *) "Link generation technologies to types"
unitUnitEffLevel(unit, unit, EffLevel) "Aggregator unit linked to aggreted units with a definition when to start the aggregation"
flowUnit(flow, unit) "Units linked to a certain energy flow time series"
unitUnittype(unit, unittype) "Link generation technologies to types"
unitStarttype(unit, starttype) "Units with special startup properties"
uFuel(unit, param_fuel, fuel) "Units linked with fuels"
unittype "Unit technology types"
un_commodity(unit, node) "Units linked with commodities"
un_commodity_in(unit, node) "Units linked with input commodities"
un_commodity_out(unit, node) "Units linked with output commodities"
unit_investLP(unit) "Units with continuous investments allowed"
unit_investMIP(unit) "Units with integer investments allowed"
unit_timeseries(unit) "Units with time series enabled"
......@@ -63,6 +65,7 @@ Sets
gn2n_directional(grid, node, node) "Transfer links with positive rightward transfer and negative leftward transfer"
gn2n_directional_investLP(grid, node, node) "Transfer links with with continuous investments allowed"
gn2n_directional_investMIP(grid, node, node) "Transfer links with with integer investments allowed"
gn2n_timeseries(grid, node, node, param_gnn) "Transfer links with time series enabled for certain parameters"
gnu(grid, node, unit) "Units in specific nodes of particular energy grids"
gnu_input(grid, node, unit) "Forms of energy the unit uses as endogenous inputs"
gnu_output(grid, node, unit) "Forms of energy the unit uses as endogenous outputs"
......@@ -72,8 +75,6 @@ Sets
gnn_state(grid, node, node) "Nodes with state variables interconnected via diffusion"
gnn_boundState(grid, node, node) "Nodes with state variables bound by other nodes"
gn2gnu(grid, node, grid, node, unit) "Conversions between energy grids by specific units"
gngnu_fixedOutputRatio(grid, node, grid, node, unit) "Units with a fixed ratio between two different grids of output (e.g. backpressure)"
gngnu_constrainedOutputRatio(grid, node, grid, node, unit) "Units with a constrained ratio between two different grids of output (e.g. extraction)"
* --- Reserve types -----------------------------------------------------------
restype "Reserve types"
......@@ -87,6 +88,7 @@ Sets
restypeReleasedForRealization(restype) "Reserve types that are released for the realized time intervals"
offlineRes (restype) "Reserve types where offline reserve provision possible"
offlineResUnit (unit) "Units where offline reserve provision possible"
restype_inertia(restype) "Reserve types where the requirement can also be fulfilled with the inertia of synchronous machines"
* --- Sets to define time, forecasts and samples ------------------------------
$$include '%input_dir%/timeAndSamples.inc'
......@@ -95,6 +97,7 @@ Sets
t_current(t) "Set of time steps within the current solve horizon"
t_active(t) "Set of active t:s within the current solve horizon, including necessary history"
t_invest(t) "Time steps when investments can be made"
t_realized(t) "Set of realized time steps in the simulation"
tt(t) "Temporary subset for time steps used for calculations"
tt_(t) "Another temporary subset for time steps used for calculations"
tt_block(counter, t) "Temporary time step subset for storing the time interval blocks"
......@@ -136,7 +139,7 @@ $if defined scenario
gn_forecasts(*, node, timeseries) "Which grid/flow, node and timeseries use short-term forecasts"
gn_scenarios(*, node, timeseries) "Which grid/flow, node and timeseries have data for long-term scenarios"
* --- Sets used for the changing unit aggregation and efficiency approximations
* --- Sets used for the changing unit aggregation and efficiency approximations as well as unit lifetimes
uft(unit, f, t) "Active units on intervals, enables aggregation of units for later intervals"
uft_online(unit, f, t) "Units with any online and startup variables on intervals"
uft_onlineLP(unit, f, t) "Units with LP online and startup variables on intervals"
......@@ -156,16 +159,18 @@ $if defined scenario
effGroupSelector(effSelector, effSelector) "Efficiency selectors included in efficiency groups, e.g. Lambda02 contains Lambda01 and Lambda02."
effLevelGroupUnit(effLevel, effSelector, unit) "What efficiency selectors are in use for each unit at each efficiency representation level"
effGroupSelectorUnit(effSelector, unit, effSelector) "Group name for efficiency selector set, e.g. Lambda02 contains Lambda01 and Lambda02"
mSettingsReservesInUse(mType, *, up_down) "Reserves that are used in each model type"
mSettingsReservesInUse(mType, restype, up_down) "Reserves that are used in each model type"
unitCounter(unit, counter) "Counter used for restricting excessive looping over the counter set when defining unit startup/shutdown/online time restrictions"
runUpCounter(unit, counter) "Counter used for unit run-up intervals"
shutdownCounter(unit, counter) "Counter used for unit shutdown intervals"
utAvailabilityLimits(unit, t, availabilityLimits) "Time step when the unit becomes available/unavailable, e.g. because of technical lifetime"
* --- Sets used for grouping of units, transfer links, nodes, etc. ------------
uGroup(unit, group) "Units in particular groups"
gnuGroup(grid, node, unit, group) "Combination of grids, nodes and units in particular groups"
gn2nGroup(grid, node, node, group) "Transfer links in particular groups"
gnGroup(grid, node, group) "Combination of grids and nodes in particular groups"
sGroup(s, group) "Samples in particular groups"
* --- Set of timeseries that will be read from files between solves -----------
mTimeseries_loop_read(mType, timeseries) "Those time series that will be read between solves"
......@@ -196,7 +201,7 @@ alias(op, op_, op__);
alias(hrop, hrop_, hrop__);
alias(eff, eff_, eff__);
alias(hr, hr_, hr__);
alias(fuel, fuel_);
alias(commodity, commodity_);
alias(effLevel, effLevel_);
alias(restype, restype_);
alias(group, group_);
......
......@@ -43,28 +43,33 @@ Scalars
firstResultsOutputSolve /1/;
;
* --- Power plant and fuel data -----------------------------------------------
* --- Power plant and commodity data -----------------------------------------------