Commit a7391406 authored by Topi Rasku's avatar Topi Rasku
Browse files

Readability improvements to 1a_definitions, as well as implementing the...

Readability improvements to 1a_definitions, as well as implementing the distinction between directOnLP and directOnMIP.
parent 0e7a5b2b
......@@ -15,83 +15,138 @@ You should have received a copy of the GNU Lesser General Public License
along with Backbone. If not, see <http://www.gnu.org/licenses/>.
$offtext
* --- Model parameters, features and switches ---------------------------------
Sets // Model related selections
mType "model types in the Backbone"
/invest, storage, schedule, realtime, building, schedule_dispatch/
mSetting "setting categories for models"
/t_start, t_jump, t_horizon, t_forecastStart, t_forecastLength, t_forecastJump, t_end, t_reserveLength, samples, forecasts, readForecastsInTheLoop, intervalEnd, intervalLength, IntervalInHours, t_aggregate/
counter "general counter set"
/c000*c999/
* =============================================================================
* --- Model Related Set Definitions -------------------------------------------
* =============================================================================
Sets
* --- Model Related Selections ------------------------------------------------
solveInfoAttributes
mType "model types in the Backbone" /
building,
invest,
schedule
/
modelStat
solveStat
totalTime
iterations
nodes
numEqu
numDVar
numVar
numNZ
sumInfes
objEst
objVal
mSetting "setting categories for models" /
// General Time Structure
t_start, // First time step for the start of simulation
t_jump, // Number of time steps realized with each solve
t_horizon, // Length of the simulation horizon (central forecast)
t_end, // Last time step of the simulation
intervalEnd, // End index of a time step interval
intervalLength, // Number of time steps aggregated within interval
IntervalInHours, // Length of one time step in hours
// Samples and Forecasts
samples, // Number of active samples
forecasts, // Number of active forecasts
t_forecastStart, // Time step for first reading the forecasts (not necessarily t_start)
t_forecastLength, // Length of forecasts in time steps
t_forecastJump, // Number of time steps between each update of the forecasts
readForecastsInTheLoop, // Flag for updating forecasts in the solve loop
// Features
t_reserveLength, // Length of reserve provision horizon in time steps
t_aggregate // Unit aggregation threshold time index
/
// Efficiency approximation related sets
op "Operating points in the efficiency curves, also functions as index for data points"
/op00*op12/ // IMPORTANT! Has to equal the same param_unit!
eff "Effiency for the corresponding operating point ('op') in the efficiency curves, also used for data indexing"
/eff00*eff12/ // IMPORTANT! Has to equal the same param_unit!
lambda "Lambda approximation indeces"
/lambda01*lambda12/ // IMPORTANT! Has to equal effLambda!
// Solve info
solveInfoAttributes "Information about model solves" /
modelStat
solveStat
totalTime
iterations
nodes
numEqu
numDVar
numVar
numNZ
sumInfes
objEst
objVal
/
// !!! REDUNDANT SETS PENDING REMOVAL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
solve_info "Containers for solve information" /
modelStat "Status of the model after solve"
solveStat "Status of the solve"
totalTime "Total solve time"
iterations "Number of iteration"
nodes "Number of nodes in the solve"
numEqu "Number of equations in the problem"
numDVar "Number of D variables in the problem"
numVar "Number of variables in the problem"
numNZ "Number of non-zeros in the problem"
sumInfes "Sum of infeasibilities"
objEst "Estimate for the best possible objective value"
objVal "Objectiv value"
/
* --- Efficiency Approximation Related Sets -----------------------------------
// Efficiency Levels and Categories
effLevel "Pre-defined levels for efficiency representation that can start from t_solve + x"
/ level1*level9 /
effSelector "Select equations and lambdas/slope for efficiency calculations"
/ directOff, directOn, lambda01*lambda12 /
/ directOff, directOnLP, directOnMIP, lambda01*lambda12 /
effDirect(effSelector) "Using direct input to output equation"
/ directOff, directOn /
/ directOff, directOnLP, directOnMIP /
effDirectOff(effSelector) "Using direct input to output equation without online variable, i.e. constant efficiency"
/ directOff /
effDirectOn(effSelector) "Using direct input to output equation with online variable"
/ directOn /
/ directOnLP, directOnMIP /
effLambda(effSelector) "Lambdas in use for part-load efficiency representation"
/ lambda01*lambda12 /
effOnline(effSelector) "Efficiency selectors that use online variables"
/ directOn, lambda01*lambda12 / // IMPORTANT! Online variables are generated based on this, so keep it up to date!
effLevel "Pre-defined levels for efficiency representation that can start from t_solve + x"
/ level1*level9 /
/ directOnLP, directOnMIP, lambda01*lambda12 / // IMPORTANT! Online variables are generated based on this, so keep it up to date!
// Variable direction related sets
// Efficiency Approximation related Counters
op "Operating points in the efficiency curves, also functions as index for data points"
/op00*op12/ // IMPORTANT! Has to equal the same param_unit!
eff "Effiency for the corresponding operating point ('op') in the efficiency curves, also used for data indexing"
/eff00*eff12/ // IMPORTANT! Has to equal the same param_unit!
lambda "Lambda approximation indeces"
/lambda01*lambda12/ // IMPORTANT! Has to equal effLambda!
* --- General and Directional Sets --------------------------------------------
// General Counter
counter "general counter set"
/c000*c999/
// Directional Sets
up_down "Direction set used by some variables, e.g. reserve provisions and generation ramps"
/ up, down /
inc_dec "Increase or decrease in dummy, or slack variables"
/ increase, decrease /
/ increase, decrease /
min_max "Minimum and maximum"
/ min, max /
;
Sets //Reserve type sets
restype "Reserve types"
/ primary "Automatic frequency containment reserves"
secondary "Fast frequency restoration reserves"
tertiary "Replacement reserves"
* --- Model Feature Sets ------------------------------------------------------
// Reserve Provision Related Sets
restype "Reserve types" /
primary "Automatic frequency containment reserves"
secondary "Fast frequency restoration reserves"
tertiary "Replacement reserves"
/
restypeDirection(restype, up_down) "Different combinations of reserve types and directions"
/ primary.up
primary.down
secondary.up
secondary.down
tertiary.up
tertiary.down
restypeDirection(restype, up_down) "Different combinations of reserve types and directions" /
primary.up
primary.down
secondary.up
secondary.down
tertiary.up
tertiary.down
/
;
Sets //Startup related sets
starttype "Startup types"
/ hot "Hot start"
warm "Warm start"
cold "Cold start"
// Unit Startup Related Sets
starttype "Startup types" /
hot "Hot start"
warm "Warm start"
cold "Cold start"
/
starttypeConstrained(starttype) "Startup types with constrained maximum non-opearational time"
/ hot, warm /
......@@ -99,40 +154,44 @@ Sets //Startup related sets
/ cost, consumption /
unit_capacity "Unit or capacity based parameter"
/ unit, capacity /
;
* Numeric parameters
// Other Features
feature "Set of optional model features" /
findStorageStart "Solve for optimal storage start levels"
storageValue "Use storage value instead of fixed control"
storageEnd "Expected storage end levels greater than starting levels"
addOn "Use StoSSch as a storage add-on to a larger model"
extraRes "Use extra tertiary reserves for error in elec. load during time step"
rampSched "Use power based scheduling"
/
; // END Sets
* =============================================================================
* --- Model Parameter Definitions ---------------------------------------------
* =============================================================================
* --- Numeric Model Parameters ------------------------------------------------
// General model parameter arrays
Parameter
settings(mSetting)
mSettings(mType, mSetting)
mSettingsEff(mtype, effLevel)
mInterval(mType, mSetting, counter)
t_skip_counter
* settings(mSetting)
mSettings(mType, mSetting) "Model settings array"
mSettingsEff(mtype, effLevel) "Model efficiency approximation array"
mInterval(mType, mSetting, counter) "Model interval array"
t_skip_counter "Numerical counter for solve time steps"
;
// Include additional parameters if found
Parameter params(*) /
$if exist 'params.inc' $include 'params.inc'
/;
* Model features
Set feature "Set of optional model features" /
findStorageStart "Solve for optimal storage start levels"
storageValue "Use storage value instead of fixed control"
storageEnd "Expected storage end levels greater than starting levels"
addOn "Use StoSSch as a storage add-on to a larger model"
extraRes "Use extra tertiary reserves for error in elec. load during time step"
rampSched "Use power based scheduling"
/;
// Activate model features if found
Set active(feature) "Set membership tells active model features" /
$if exist 'features.inc' $include 'features.inc'
/;
* --- Parse command line options and store values -----------------------------
* Features
// Parse command line options and store values for features
$if set findStorageStart active('findStorageStart') = %findStorageStart%;
$if set storageValue active('storageValue') = %storageValue%;
$if set storageEnd active('storageEnd') = %storageEnd%;
......@@ -140,10 +199,14 @@ $if set addOn active('addOn') = %addOn%;
$if set extraRes active('extraRes') = %extraRes%;
$if set rampSched active('rampSched') = %rampSched%;
* =============================================================================
* --- Parameter Set Definitions -----------------------------------------------
* =============================================================================
* --- Set definitions for parameters -----------------------------------------------------
Sets
* --- Parameter Data Related Sets ---------------------------------------------
param_gn "Possible parameters for grid, node" /
selfDischargeLoss "Self discharge rate of the node [MW/v_state]"
energyStoredPerUnitOfState "A possible unit conversion if v_state uses something else than MWh"
......@@ -177,19 +240,6 @@ param_gnBoundaryProperties "Properties that can be set for the different boundar
multiplier "A multiplier to change the value (either constant or time series), default 1"
/
slack(param_gnBoundaryTypes) "Categories for slack variables"
/ upwardSlack01*upwardSlack20, downwardSlack01*downwardSlack20 /
upwardSlack(slack) "Set of upward slacks"
/ upwardSlack01*upwardSlack20 /
downwardSlack(slack) "Set of downward slacks"
/ downwardSlack01*downwardSlack20 /
stateLimits(param_gnBoundaryTypes) "set of upward and downward state limits"
/ upwardLimit, downwardLimit /
spillLimits(param_gnBoundaryTypes) "set of upward and downward state limits"
/ maxSpill, minSpill /
useConstantOrTimeSeries(param_gnBoundaryProperties) "useTimeSeries and useConstant property together"
/ useTimeSeries, useConstant /
param_gnn "Set of possible data parameters for grid, node, node (nodal interconnections)" /
transferCap "Transfer capacity limits"
transferCapBidirectional "Total bidirectional transfer capacity limit"
......@@ -292,18 +342,21 @@ param_gnugnu "Set of possible data parameters for grid, node, unit, grid, node,
capacityRatio "Fixed ratio of the capacity of the first unit to the second"
/
solve_info "Containers for solve information" /
modelStat "Status of the model after solve"
solveStat "Status of the solve"
totalTime "Total solve time"
iterations "Number of iteration"
nodes "Number of nodes in the solve"
numEqu "Number of equations in the problem"
numDVar "Number of D variables in the problem"
numVar "Number of variables in the problem"
numNZ "Number of non-zeros in the problem"
sumInfes "Sum of infeasibilities"
objEst "Estimate for the best possible objective value"
objVal "Objectiv value"
/
; // End parameter set declarations
* --- Counters and Directional Sets -------------------------------------------
// Slack categories
slack(param_gnBoundaryTypes) "Categories for slack variables"
/ upwardSlack01*upwardSlack20, downwardSlack01*downwardSlack20 /
upwardSlack(slack) "Set of upward slacks"
/ upwardSlack01*upwardSlack20 /
downwardSlack(slack) "Set of downward slacks"
/ downwardSlack01*downwardSlack20 /
// Flags for boundaries
stateLimits(param_gnBoundaryTypes) "set of upward and downward state limits"
/ upwardLimit, downwardLimit /
spillLimits(param_gnBoundaryTypes) "set of upward and downward state limits"
/ maxSpill, minSpill /
useConstantOrTimeSeries(param_gnBoundaryProperties) "useTimeSeries and useConstant property together"
/ useTimeSeries, useConstant /
; // END parameter set declarations
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