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

Implementing new result arrays and reorganizing the result files to be more readable.

parent 1284a0e6
......@@ -15,64 +15,106 @@ 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
* --- Results required for the model structure --------------------------------
* =============================================================================
* --- Results Symbols Included in Output --------------------------------------
* =============================================================================
r_state // Conserves state variable values between solves
r_online // Conserves online variable values between solves
r_reserve // Conserves locked reserve variables between solves
r_resTransferRightward // Conserves locked reserve transfer variables between solves
r_resTransferLeftward // Conserves locked reserve transfer variables between solves
r_gen // Conserves locked generation variables between solves
r_startup // Conserves locked startup variables between solves
r_shutdown // Conserves locked shutdown variables between solves
* --- Cost Result Symbols -----------------------------------------------------
* --- Other desired results ---------------------------------------------------
// Total Objective Function
r_totalObj
// Interesting variable and equation values
r_fuelUse
r_genFuel
// Realized System Costs
r_gnRealizedCost
r_gnTotalRealizedCost
r_gnTotalRealizedCostShare
r_gTotalRealizedCost
r_totalRealizedCost
* --- Node Result Symbols -----------------------------------------------------
// State variable results, required for model structure !!!!!!!!!!!!!!!!!!!!!!!
r_state
// Energy transfer and spill variable results
r_transfer
r_spill
// Interesting node related results
r_balanceMarginal
r_resDemandMarginal
r_gnnTotalTransfer
r_gnTotalSpill
r_gnTotalSpillShare
r_gTotalSpill
// Results requiring calculations
r_gnConsumption
r_gnRealizedCost
* --- Energy Generation/Consumption Result Symbols ----------------------------
// Total result arrays
r_totalObj
r_gnuTotalGen
r_gnTotalGen
r_gTotalGen
// Results required for model structure !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
r_gen
// Fuel use results
r_fuelUse
r_genFuel
r_gnTotalGenFuel
r_gnTotalGenFuelShare
r_gTotalGenFuel
r_totalGenFuel
r_gnnTotalTransfer
r_gnTotalSpill
r_gTotalSpill
// Interesting energy generation results
r_gnuTotalGen
r_gnuTotalGenShare
r_gnTotalGen
r_gnTotalGenShare
r_gTotalGen
// Approximate utilization rates
r_gnuUtilizationRate
// Interesting energy consumption results
r_gnConsumption
r_gnTotalConsumption
r_gnTotalConsumptionShare
r_gTotalConsumption
r_gnTotalRealizedCost
r_gTotalRealizedCost
r_totalRealizedCost
r_nuTotalReserve
r_nTotalReserve
* --- Unit Online State Result Symbols ----------------------------------------
// Online results required for model structure !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
r_online
r_startup
r_shutdown
// Interesting unit online results
r_uTotalOnline
r_uTotalOnlinePerUnit
r_gnuUtilizationRate
* --- Reserve Provision Result Symbols ----------------------------------------
// Reserve provision results required for model structure !!!!!!!!!!!!!!!!!!!!!
r_reserve
r_resTransferRightward
r_resTransferLeftward
// Interesting reserve results
r_resDemandMarginal
r_nuTotalReserve
r_nuTotalReserveShare
r_nTotalReserve
* --- Dummy and Diagnostic Variable Result Symbols ----------------------------
// Results regarding solution feasibility
r_qGen
r_qResDemand
r_solveStatus
// Diagnostics
d_cop
d_eff
d_capacityFactor
// Dummy variables for solution feasibility reasons
r_qGen
r_qResDemand
// Solve/model information
r_solveStatus
// Metadata and settings
metadata
mSettings
// OLD RESULTS, mostly here for inspiration
*r_elec_type
......@@ -85,8 +127,3 @@ r_solveStatus
*r_storageControl
*r_elecPrice
*r_cost
// Metadata and settings
metadata
mSettings
......@@ -15,52 +15,101 @@ 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
* --- Result arrays -----------------------------------------------------------
* =============================================================================
* --- Model Results Arrays ----------------------------------------------------
* =============================================================================
Parameters
// Variables required for model structure
* --- Cost Results ------------------------------------------------------------
// Total Objective Function
r_totalObj "Total operating cost over the simulation (€)" / 0 /
// Realized System Costs
r_gnRealizedCost(grid, node, f, t) "Realized system costs in gn for each t (MEUR)"
r_gnTotalRealizedCost(grid, node) "Total realized system costs in gn over the simulation (MEUR)"
r_gnTotalRealizedCostShare(grid, node) "Total realized system cost gn/g shares over the simulation"
r_gTotalRealizedCost(grid) "Total realized system costs in g over the simulation (MEUR)"
r_totalRealizedCost "Total realized system costs over the simulation (MEUR)" / 0 /
* --- Node Results ------------------------------------------------------------
// State variable results, required for model structure
r_state(grid, node, f, t) "Node state at timestep t"
r_online(unit, f, t) "Units online"
r_reserve(restype, up_down, node, unit, f, t) "Unit capacity reserved for providing reserve of specific type (MW)"
r_resTransferRightward(restype, up_down, node, node, f, t) "Electricity transmission capacity from the first node to the second node reserved for providing reserves (MW)"
r_resTransferLeftward(restype, up_down, node, node, f, t) "Electricity transmission capacity from the second node to the first node reserved for providing reserves (MW)"
r_gen(grid, node, unit, f, t) "Energy generation for a unit (MW)"
r_startup(unit, starttype, f, t) "Units started up"
r_shutdown(unit, f, t) "Units shut down"
// Variables and equations of interest
r_fuelUse(fuel, unit, f, t) "Fuel use of units"
r_genFuel(grid, node, fuel, f, t) "Energy generation/consumption based on fuels / flows (MW)"
// Energy transfer and spill variable results
r_transfer(grid, from_node, to_node, f, t) "Energy transfer (MW)"
r_spill(grid, node, f, t) "Spill of energy from storage node during time period (MWh)"
// Interesting node related results
r_balanceMarginal(grid, node, f, t) "Marginal values of the q_balance equation"
r_resDemandMarginal(restype, up_down, node, f, t) "Marginal values of the q_resDemand equation"
r_gnnTotalTransfer(grid, node, node) "Total amount of energy transferred between gnn over the simulation (MWh)"
r_gnTotalSpill(grid, node) "Total spilled energy from gn over the simulation (MWh)"
r_gnTotalSpillShare(grid, node) "Total spilled energy gn/g share"
r_gTotalSpill(grid) "Total spilled energy from gn over the simulation (MWh)"
// Total variable value arrays
r_totalObj "Total operating cost over the simulation (€)" / 0 /
r_uTotalOnline(unit) "Total online sub-unit-hours of units over the simulation"
r_gnuTotalGen(grid, node, unit) "Total energy generation/consumption in gnu over the simulation (MWh)"
r_gnTotalGen(grid, node) "Total energy generation/consumption in gn over the simulation (MWh)"
r_gTotalGen(grid) "Total energy generation/consumption in g over the simulation (MWh)"
r_nuTotalReserve(restype, up_down, node, unit) "Total nu reserve provision over the simulation (MW*h)"
r_nTotalReserve(restype, up_down, node) "Total reserve provisions in nodes over the simulation (MW*h)"
r_gnTotalGenFuel(grid, node, fuel) "Total energy generation/consumption in gn per fuel over the simulation (MWh)"
r_gTotalGenFuel(grid, fuel) "Total energy generation/consumption in g per fuel over the simulation (MWh)"
* --- Energy Generation/Consumption Results -----------------------------------
// Results required for model structure
r_gen(grid, node, unit, f, t) "Energy generation for a unit (MW)"
// Fuel use results
r_fuelUse(fuel, unit, f, t) "Fuel use of units"
r_genFuel(grid, node, fuel, f, t) "Energy generation/consumption based on fuels / flows (MW)"
r_gnTotalGenFuel(grid, node, fuel) "Total energy generation in gn per fuel over the simulation (MWh)"
r_gnTotalGenFuelShare(grid, node, fuel) "Total energy generation fuel consumption gn/g share"
r_gTotalGenFuel(grid, fuel) "Total energy generation in g per fuel over the simulation (MWh)"
r_totalGenFuel(fuel) "Total overall energy generation/consumption per fuel over the simulation (MWh)"
r_gnnTotalTransfer(grid, node, node) "Total amount of energy transferred between gnn over the simulation (MWh)"
r_gnTotalSpill(grid, node) "Total spilled enegy from gn over the simulation (MWh)"
r_gTotalSpill(grid) "Total spilled enegy from gn over the simulation (MWh)"
// Interesting results requiring further calculations
// Interesting energy generation results
r_gnuTotalGen(grid, node, unit) "Total energy generation in gnu over the simulation (MWh)"
r_gnuTotalGenShare(grid, node, unit) "Total energy generation gnu/gn share"
r_gnTotalGen(grid, node) "Total energy generation in gn over the simulation (MWh)"
r_gnTotalGenShare(grid, node) "Total energy generation gn/g share"
r_gTotalGen(grid) "Total energy generation in g over the simulation (MWh)"
// Approximate utilization rates
r_gnuUtilizationRate(grid, node, unit) "Approximate utilization rates of gnus over the simulation"
// Interesting energy consumption results
r_gnConsumption(grid, node, f, t) "Consumption of energy in gn for each t (MWh)"
r_gnTotalConsumption(grid, node) "Total consumption of energy in gn over the simulation (MWh)"
r_gnTotalConsumptionShare(grid, node) "Total consumption gn/g share"
r_gTotalConsumption(grid) "Total consumption of energy in g over the simulation (MWh)"
r_gnRealizedCost(grid, node, f, t) "Realized system costs in gn for each t (MEUR)"
r_gnTotalRealizedCost(grid, node) "Total realized system costs in gn over the simulation (MEUR)"
r_gTotalRealizedCost(grid) "Total realized system costs in g over the simulation (MEUR)"
r_totalRealizedCost "Total realized system costs over the simulation (MEUR)" / 0 /
* --- Unit Online State Results -----------------------------------------------
// Online results required for model structure
r_online(unit, f, t) "Units online"
r_startup(unit, starttype, f, t) "Units started up"
r_shutdown(unit, f, t) "Units shut down"
// Interesting unit online results
r_uTotalOnline(unit) "Total online sub-unit-hours of units over the simulation"
r_uTotalOnlinePerUnit(unit) "Total unit online hours per sub-unit over the simulation"
r_gnuUtilizationRate(grid, node, unit) "Approximate utilization rates of gnus over the simulation"
* --- Reserve Provision Results -----------------------------------------------
// Reserve provision results required for model structure
r_reserve(restype, up_down, node, unit, f, t) "Unit capacity reserved for providing reserve of specific type (MW)"
r_resTransferRightward(restype, up_down, node, node, f, t) "Electricity transmission capacity from the first node to the second node reserved for providing reserves (MW)"
r_resTransferLeftward(restype, up_down, node, node, f, t) "Electricity transmission capacity from the second node to the first node reserved for providing reserves (MW)"
// Interesting reserve results
r_resDemandMarginal(restype, up_down, node, f, t) "Marginal values of the q_resDemand equation"
r_nuTotalReserve(restype, up_down, node, unit) "Total nu reserve provision over the simulation (MW*h)"
r_nuTotalReserveShare(restype, up_down, node, unit) "Total nu/n reserve provision share over the simulation"
r_nTotalReserve(restype, up_down, node) "Total reserve provisions in nodes over the simulation (MW*h)"
* --- Dummy Variable Results --------------------------------------------------
// Results regarding solution feasibility
r_qGen(inc_dec, grid, node, f, t) "Dummy energy generation (increase) or consumption (generation decrease) to ensure equation feasibility (MW)"
r_qResDemand(restype, up_down, node, f, t) "Dummy to decrease demand for a reserve (MW)"
r_solveStatus(t, solve_info) "Information about the solve"
$ontext
// Old results arrays
* r_genNodeType(grid, node, unitType, t) "Energy generation/consumption based on unittypes (MW)"
* r_genType(grid, unitType, t) "Energy generation/consumption based on unittypes (MW)"
......@@ -73,15 +122,13 @@ Parameters
* r_energyPrice(grid, node, t) "Marginal cost of energy generation (MWh)"
* r_cost(t) "Total operating cost for each hour, without value of state or online changes (€)"
// Dummy variable arrays for solution feasibility
r_qGen(inc_dec, grid, node, f, t) "Dummy energy generation (increase) or consumption (generation decrease) to ensure equation feasibility (MW)"
r_qResDemand(restype, up_down, node, f, t) "Dummy to decrease demand for a reserve (MW)"
r_solveStatus(t, solve_info) "Information about the solve"
;
$offtext
Scalar r_realizedLast "Order of last realised time step";
// Initialize a few of the results arrays, required by model structure.
* --- Initialize a few of the results arrays, required by model structure -----
Option clear = r_state;
Option clear = r_online;
Option clear = r_reserve;
......@@ -92,7 +139,10 @@ Option clear = r_realizedLast;
Option clear = r_startup;
Option clear = r_shutdown;
* --- Diagnostics Results -----------------------------------------------------
* =============================================================================
* --- Diagnostics Results Arrays ----------------------------------------------
* =============================================================================
Parameters
d_cop(unit, f, t) "Coefficients of performance of conversion units"
d_eff(unit, f, t) "Efficiency of generation units using fuel"
......
......@@ -19,19 +19,20 @@ $offtext
* --- Time independent results ------------------------------------------------
* =============================================================================
* --- Calculate time series results based on realized values ------------------
r_gnConsumption(gn(grid, node), ft_realizedNoReset(f, t))
= min(ts_influx(grid, node, f, t), 0) // Not necessarily a good idea, as ts_influx contains energy gains as well...
+ sum(gnu_input(grid, node, unit),
+ r_gen(grid, node, unit, f, t)
) // END sum(gnu_input)
;
* --- Calculate total results -------------------------------------------------
* --- Calculate time step length dependent results ----------------------------
// Need to loop over the model dimension, as this file is no longer contained in the modelSolves loop...
loop(m,
// Realized energy consumption !!! NOTE !!! This is a bit of an approximation at the moment
r_gnConsumption(gn(grid, node), ft_realizedNoReset(f, t))
= p_stepLengthNoReset(m, f, t)
* [
+ min(ts_influx(grid, node, f, t), 0) // Not necessarily a good idea, as ts_influx contains energy gains as well...
+ sum(gnu_input(grid, node, unit),
+ r_gen(grid, node, unit, f, t)
) // END sum(gnu_input)
];
// Total generation on each node
r_gnuTotalGen(gnu_output(grid, node, unit))
= sum(ft_realizedNoReset(f, t),
......@@ -84,47 +85,100 @@ loop(m,
); // END loop(m)
* --- Total Generation Results ------------------------------------------------
// Total generation in gn
r_gnTotalGen(gn(grid, node))
= sum(gnu_output(grid, node, unit), r_gnuTotalGen(grid, node, unit)); // END sum(gnu_output)
= sum(gnu_output(grid, node, unit), r_gnuTotalGen(grid, node, unit));
// Total generation in g
r_gTotalGen(grid)
= sum(gn(grid, node), r_gnTotalGen(grid, node));
// Total generation gnu/gn shares
r_gnuTotalGenShare(gnu_output(grid, node, unit))${ r_gnTotalGen(grid, node) }
= r_gnuTotalGen(grid, node, unit)
/ r_gnTotalGen(grid, node);
// Total generation gn/g shares
r_gnTotalGenShare(gn(grid, node))${ r_gTotalGen(grid) }
= r_gnTotalGen(grid, node)
/ r_gTotalGen(grid);
* --- Total Energy Consumption Results ----------------------------------------
// Total consumption on each gn over the simulation
r_gnTotalConsumption(gn(grid, node))
= sum(ft_realizedNoReset(f, t), r_gnConsumption(grid, node, f ,t));
// Total consumption in each grid over the simulation
r_gTotalConsumption(grid)
= sum(gn(grid, node), r_gnTotalConsumption(grid, node));
// Total consumption gn/g share
r_gnTotalConsumptionShare(gn(grid, node))${ r_gTotalConsumption(grid) }
= r_gnTotalConsumption(grid, node)
/ r_gTotalConsumption(grid);
* --- Total Fuel Consumption Results ------------------------------------------
// Total fuel consumption in grids over the simulation
r_gTotalGenFuel(grid, fuel)
= sum(gn(grid, node), r_gnTotalGenFuel(grid, node, fuel));
// Total fuel consumption over the simulation
r_totalGenFuel(fuel)
= sum(gn(grid, node), r_gnTotalGenFuel(grid, node, fuel));
// Total fuel consumption gn/g shares
r_gnTotalGenFuelShare(gn(grid, node), fuel)${ r_gTotalGenFuel(grid, fuel) }
= r_gnTotalGenFuel(grid, node, fuel)
/ r_gTotalGenFuel(grid, fuel);
* --- Total Spilled Energy Results --------------------------------------------
// Total spilled energy in each grid over the simulation
r_gTotalSpill(grid)
= sum(gn(grid, node_spill(node)), r_gnTotalSpill(grid, node));
// Total spilled energy gn/g share
r_gnTotalSpillShare(gn(grid, node_spill))${ r_gTotalSpill(grid) }
= r_gnTotalSpill(grid, node_spill)
/ r_gTotalSpill(grid);
* --- Total Costs Results -----------------------------------------------------
// Total realized costs on each gn over the simulation
r_gnTotalRealizedCost(gn(grid, node))
= sum(ft_realizedNoReset(f, t), r_gnRealizedCost(grid, node, f ,t));
// Total realized costs on each grid over the simulation
r_gTotalRealizedCost(grid)
= sum(gn(grid, node), r_gnTotalRealizedCost(grid, node));
// Total realized costs gn/g share
r_gnTotalRealizedCostShare(gn(grid, node))${ r_gTotalRealizedCost(grid) }
= r_gnTotalRealizedCost(grid, node)
/ r_gTotalRealizedCost(grid);
// Total realized costs over the simulation
r_totalRealizedCost
= sum(gn(grid, node), r_gnTotalRealizedCost(grid, node));
* --- Total Reserve Provision Results -----------------------------------------
// Total reserve provision in nodes over the simulation
r_nTotalReserve(restypeDirectionNode(restype, up_down, node))
= sum(nuRescapable(restype, up_down, node, unit), r_nuTotalReserve(restype, up_down, node, unit));
r_nuTotalReserveShare(nuRescapable(restype, up_down, node, unit))${ r_nTotalReserve(restype, up_down, node) }
= r_nuTotalReserve(restype, up_down, node, unit)
/ r_nTotalReserve(restype, up_down, node);
* --- Total Unit Online State Results -----------------------------------------
// Total unit online hours per sub-unit over the simulation
r_uTotalOnlinePerUnit(unit)
r_uTotalOnlinePerUnit(unit)${ p_unit(unit, 'unitCount') }
= r_uTotalOnline(unit)
/ p_unit(unit, 'unitCount');
......
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