Commit 94ee5169 authored by Topi Rasku's avatar Topi Rasku
Browse files

More outputs & cleanup.

parent ed20372b
......@@ -24,6 +24,15 @@ $offtext
// Total Objective Function
r_totalObj
// Unit Operational Cost Components
r_gnuVOM
r_uFuelEmissionCost
r_uStartupCost
// Nodal Cost Components
r_gnStateSlackCost
r_gnStorageValueChange
// Realized System Costs
r_gnRealizedCost
r_gnTotalRealizedCost
......@@ -120,6 +129,7 @@ r_solveStatus
d_cop
d_eff
d_capacityFactor
d_nodeState
// Metadata and settings
metadata
......
......@@ -121,7 +121,7 @@ Parameters
ts_cf_(flow, node, f, t)
ts_reserveDemand_(restype, up_down, node, f, t)
ts_nodeState_(grid, node, param_gnBoundaryTypes, f, t)
ts_fuelPrice_(fuel, t)
ts_fuelPrice_(fuel, t)
// Temporary data time series for updating forecasts and reserve demand
ts_forecast(flow, node, t, f, t)
......
......@@ -26,6 +26,18 @@ Parameters
// Total Objective Function
r_totalObj "Total operating cost over the simulation (€)" / 0 /
// Unit Operational Cost Components
r_gnuVOM(grid, node, unit, f, t) "Variable O&M costs for energy outputs (MEUR)"
r_gnuTotalVOM(grid, node, unit) "Total gnu VOM costs over the simulation (MEUR)"
r_uFuelEmissionCost(fuel, unit, f, t) "Unit fuel & emission costs for normal operation (MEUR)"
r_uTotalFuelEmissionCost(fuel, unit) "Total unit fuel & emission costs over the simulation for normal operation (MEUR)"
r_uStartupCost(unit, f, t) "Unit startup VOM, fuel, & emission costs (MEUR)"
r_uTotalStartupCost(unit) "Total unit startup costs over the simulation (MEUR)"
// Nodal Cost Components
r_gnStateSlackCost(grid, node, f, t) "Costs for states requiring slack (MEUR)"
r_gnStorageValueChange(grid, node) "Change in storage values over the simulation (MEUR)"
// 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)"
......@@ -118,21 +130,7 @@ Parameters
r_nTotalqResDemand(restype, up_down, node) "Total dummy reserve provisions in n over the simulation"
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)"
* r_elec_type(unittype, t) "Average electricity generation rate of generator type (MW)"
* r_demand(grid, node, t) "Average energy demand (MW)"
* r_capacity_type(unittype) "Available generation capacity by type (MW)"
* r_elecConsumption(unit, t) "Average electricity consumption rate during hour (MW)"
* r_storageValue(node, t) "Storage value (€/MWh)"
* r_storageControl(node, t) "Storage control during hour (MWh)"
* 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 (€)"
;
$offtext
; // END PARAMETER DECLARATION
Scalar r_realizedLast "Order of last realised time step";
......@@ -156,4 +154,5 @@ Parameters
d_cop(unit, f, t) "Coefficients of performance of conversion units"
d_eff(unit, f, t) "Efficiency of generation units using fuel"
d_capacityFactor(flow, node, f, t) "Diagnostic capacity factors (accounting for GAMS plotting error)"
d_nodeState(grid, node, param_gnBoundaryTypes, f, t) "Diagnostic temperature forecasts (accounting for GAMS plotting error)"
;
......@@ -111,10 +111,21 @@ r_qResDemand(restypeDirectionNode(restype, up_down, node), ft_realized(f, t))
* --- Diagnostics Results -----------------------------------------------------
// Capacity factors for examining forecast errors
d_capacityFactor(flow, node, f_solve(f), t_active(t))${ sum(flowUnit(flow, unit), nu(node, unit)) }
d_capacityFactor(flowNode(flow, node), f_solve(f), t_active(t))${ sum(flowUnit(flow, unit), nu(node, unit)) }
= ts_cf_(flow, node, f, t)
+ ts_cf(flow, node, f, t)${ not ts_cf_(flow, node, f, t) }
- 1e-3${ not ts_cf_(flow, node, f, t) and not ts_cf(flow, node, f, t) }
- 1e-3${ not ts_cf_(flow, node, f, t)
and not ts_cf(flow, node, f, t)
}
;
// Temperature forecast for examining the error
d_nodeState(gn_state(grid, node), param_gnBoundaryTypes, f_solve(f), t_active(t))${ p_gnBoundaryPropertiesForStates(grid, node, param_gnBoundaryTypes, 'useTimeseries') }
= ts_nodeState_(grid, node, param_gnBoundaryTypes, f, t)
+ ts_nodeState(grid, node, param_gnBoundaryTypes, f, t)${ not ts_nodeState_(grid, node, param_gnBoundaryTypes, f, t) }
- 1e-3${ not ts_nodeState_(grid, node, param_gnBoundaryTypes, f, t)
and not ts_nodeState_(grid, node, param_gnBoundaryTypes, f, t)
}
;
* --- Model Solve & Status ----------------------------------------------------
......
......@@ -22,6 +22,71 @@ $offtext
// Need to loop over the model dimension, as this file is no longer contained in the modelSolves loop...
loop(m,
* --- Realized Individual Costs ----------------------------------------------
// Variable O&M costs
r_gnuVOM(gnu_output(grid, node, unit), ft_realizedNoReset(f,t))
= 1e-6 // Scaling to MEUR
* p_stepLengthNoReset(m, f, t)
* r_gen(grid, node, unit, f, t)
* p_unit(unit, 'omCosts');
// Fuel and emission costs during normal operation
r_uFuelEmissionCost(fuel, unit_fuel(unit), ft_realizedNoReset(f,t))${ uFuel(unit, 'main', fuel) }
= 1e-6 // Scaling to MEUR
* p_stepLengthNoReset(m, f, t)
* r_fuelUse(fuel, unit, f, t)
* [ // Fuel price
+ ts_fuelPrice(fuel, t)
// Emission costs
+ sum(emission, p_unitFuelEmissionCost(unit, fuel, emission))
];
// Unit startup costs
r_uStartupCost(unit, ft_realizedNoReset(f,t))${ sum(starttype, unitStarttype(unit, starttype)) }
= 1e-6 // Scaling to MEUR
* sum(unitStarttype(unit, starttype),
+ r_startup(unit, starttype, f, t)
* [ // Startup VOM
+ p_uStartup(unit, starttype, 'cost', 'unit')
// Startup fuel consumption and emissions
+ sum(uFuel(unit, 'startup', fuel),
+ p_uStartup(unit, starttype, 'consumption', 'unit')
* [ // Fuel price
+ ts_fuelPrice(fuel, t)
// Emission costs
+ sum(emission, // Emission taxes
+ p_unitFuelEmissionCost(unit, fuel, emission)
) // END sum(emission)
] // END * p_uStartup
) // END sum(uFuel)
] // END * r_startup
); // END sum(unitStarttype)
// Node state slack costs
r_gnStateSlackCost(gn_stateSlack(grid, node), ft_realizedNoReset(f,t))
= 1e-6 // Scaling to MEUR
* p_stepLengthNoReset(m, f, t)
* sum(slack${ p_gnBoundaryPropertiesForStates(grid, node, slack, 'slackCost') },
+ r_stateSlack(grid, node, slack, f, t)
* p_gnBoundaryPropertiesForStates(grid, node, slack, 'slackCost')
); // END sum(slack)
// Storage Value Change
r_gnStorageValueChange(gn_state(grid, node))${ sum(t_full(t), p_storageValue(grid, node, t)) }
= 1e-6
* [
+ sum(ft_realizedNoReset(f,t)${ ord(t) = mSettings(m, 't_end') + 1 },
+ p_storageValue(grid, node, t)
* r_state(grid, node, f, t)
) // END sum(ft_realizedNoReset)
- sum(ft_realizedNoReset(f,t)${ ord(t) = mSettings(m, 't_start') + 1 }, // INITIAL v_state NOT INCLUDED IN THE RESULTS
+ p_storageValue(grid, node, t)
* r_state(grid, node, f, t)
) // END sum(ft_realizedNoReset)
]; // END * 1e-6
* --- Realized Nodal System Costs ---------------------------------------------
r_gnRealizedCost(gn(grid, node), ft_realizedNoReset(f, t))
......
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