Commit 0168eb4e authored by Niina Helistö's avatar Niina Helistö
Browse files

First attempt to remove commodity set and replace it with a parameter telling...

First attempt to remove commodity set and replace it with a parameter telling if ts_priceChange should be used

Issue #161
parent 48286a82
......@@ -58,7 +58,6 @@ Model building /
* q_conversionIncHR_help2
* q_unitEqualityConstraint
* q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
q_transfer
......
......@@ -58,7 +58,6 @@ Model invest /
q_conversionIncHR_help2
q_unitEqualityConstraint
q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
q_transfer
......
......@@ -58,7 +58,6 @@ Model schedule /
q_conversionIncHR_help2
q_unitEqualityConstraint
q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
q_transfer
......
......@@ -132,7 +132,6 @@ v_help_inc
q_conversionIncHR_help2
q_unitEqualityConstraint
q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
q_transfer
......
......@@ -95,7 +95,6 @@ r_gnnDiffusion
r_gen
// Fuel use results
r_fuelUse
r_genFuel
r_genUnittype
r_gnTotalGenFuel
......@@ -142,10 +141,16 @@ r_uTotalShutdown
// Unit level emissions from normal operation
r_emissions
// Unit level emissions from outputs, not considered in the equations
r_emissionsFromOutput
// Unit level emissions from start-ups
r_emissionsStartup
// Emission sums from normal operation
// Emission sums
r_nuTotalEmissionsOperation
r_nuTotalEmissionsFromOutput
r_nuTotalEmissionsStartup
r_nuTotalEmissions
r_nTotalEmissions
r_uTotalEmissions
......
......@@ -226,6 +226,7 @@ param_gn "Possible parameters for grid, node" /
* forecastLength "Length of forecasts in use for the node (hours). After this, the node will use the central forecast." // NOT IMPLEMENTED
capacityMargin "Capacity margin used in invest mode (MW)"
storageValueUseTimeSeries "A flag to determine whether to use time series form `storageValue`"
useCommodityPrice "A flag to decide whether ts_priceChange is to be used"
/
param_gnBoundaryTypes "Types of boundaries that can be set for a node with a state variable" /
......
......@@ -22,14 +22,12 @@ Sets
* --- Commodities & resources -------------------------------------------------------
emission "Emissions"
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_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"
......@@ -45,9 +43,6 @@ Sets
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"
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"
......@@ -208,7 +203,6 @@ alias(op, op_, op__);
alias(hrop, hrop_, hrop__);
alias(eff, eff_, eff__);
alias(hr, hr_, hr__);
alias(commodity, commodity_);
alias(effLevel, effLevel_);
alias(restype, restype_);
alias(group, group_);
......
......@@ -29,8 +29,8 @@ Parameters
// Unit Operational Cost Components
r_gnuVOMCost(grid, node, unit, f, t) "Variable O&M costs for energy outputs (MEUR)"
r_gnuTotalVOMCost(grid, node, unit) "Total gnu VOM costs over the simulation (MEUR)"
r_uFuelEmissionCost(node, unit, f, t) "Unit fuel & emission costs for normal operation (MEUR)"
r_uTotalFuelEmissionCost(commodity, unit) "Total unit fuel & emission costs over the simulation for normal operation (MEUR)"
r_uFuelEmissionCost(grid, node, unit, f, t) "Unit fuel & emission costs for normal operation (MEUR)"
r_uTotalFuelEmissionCost(grid, node, 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_uShutdownCost(unit, f, t) "Unit startup VOM, fuel, & emission costs (MEUR)"
r_uTotalStartupCost(unit) "Total unit startup costs over the simulation (MEUR)"
......@@ -102,13 +102,12 @@ Parameters
r_gen_gnUnittype(grid, node, unittype) "Energy generation for each unittype in each node (MWh)"
// Fuel use results
r_fuelUse(node, unit, f, t) "Fuel use of units"
r_genFuel(grid, node, *, f, t) "Energy generation/consumption based on fuels / flows (MW)"
r_genUnittype(grid, node, unittype, f, t) "Energy generation/consumption for each unittype (MW)"
r_gnTotalGenFuel(grid, node, commodity) "Total energy generation in gn per fuel over the simulation (MWh)"
r_gnTotalGenFuelShare(grid, node, commodity) "Total energy generation fuel consumption gn/g share"
r_gTotalGenFuel(grid, commodity) "Total energy generation in g per fuel over the simulation (MWh)"
r_totalGenFuel(commodity) "Total overall energy generation/consumption per fuel over the simulation (MWh)"
r_gnTotalGenFuel(grid, node, node) "Total energy generation in gn per input over the simulation (MWh)"
r_gnTotalGenFuelShare(grid, node, node) "Total energy generation input consumption gn/g share"
r_gTotalGenFuel(grid, node) "Total energy generation in g per input over the simulation (MWh)"
r_totalGenFuel(node) "Total overall energy generation/consumption per input over the simulation (MWh)"
// Interesting energy generation results
r_gnuTotalGen(grid, node, unit) "Total energy generation in gnu over the simulation (MWh)"
......@@ -133,13 +132,19 @@ Parameters
* --- Emissions Results -------------------------------------------------------
// Unit level emissions from normal operation
r_emissions (node, emission, unit, f, t) "Emissions from units (tCO2)"
r_emissions(grid, node, emission, unit, f, t) "Emissions from units (tCO2)"
// Unit level emissions from outputs, not considered in the equations
r_emissionsFromOutput(grid, node, emission, unit, f, t) "Emissions from outputs (tCO2)"
// Unit level emissions from start-ups
r_emissionsStartup(node, emission, unit, f, t) "Emissions from units in start-ups (tCO2)"
// Emission sums from normal operation
r_nuTotalEmissions (node, unit, emission) "node unit total emissions (tCO2)"
// Emission sums
r_nuTotalEmissionsOperation(node, unit, emission) "node unit total emissions in normal operation (tCO2)"
r_nuTotalEmissionsFromOutput(node, unit, emission) "node unit total emissions from output (tCO2)"
r_nuTotalEmissionsStartup(node, unit, emission) "node unit total emissions in start-ups (tCO2)"
r_nuTotalEmissions(node, unit, emission) "node unit total emissions (tCO2)"
r_nTotalEmissions(node, emission) "node total emissions (tCO2)"
r_uTotalEmissions(unit, emission) "unit total emissions (tCO2)"
r_totalEmissions (emission) "Total emissions (tCO2)"
......
......@@ -41,7 +41,6 @@ $loaddc unittype
$loaddc unit
$loaddc unitUnittype
$loaddc unit_fail
$loaddc commodity
$loaddc unitUnitEffLevel
$loaddc effLevelGroupUnit
$loaddc group
......@@ -177,11 +176,6 @@ unit_minload(unit)${ p_unit(unit, 'op00') > 0 // If the first defined operati
// Units with flows/commodities
unit_flow(unit)${ sum(flow, flowUnit(flow, unit)) }
= yes;
un_commodity(unit, commodity)$sum(grid, gnu(grid, commodity, unit)) = yes;
un_commodity_in(unit, commodity)$sum(grid, gnu_input(grid, commodity, unit)) = yes;
un_commodity_out(unit, commodity)$sum(grid, gnu_output(grid, commodity, unit)) = yes;
unit_commodity(unit)${ sum(node, un_commodity(unit, node)) }
= yes;
// Units with investment variables
unit_investLP(unit)${ not p_unit(unit, 'investMIP')
......@@ -306,18 +300,18 @@ loop(utAvailabilityLimits(unit, t, availabilityLimits),
// Use time series for commodity prices depending on 'ts_priceChange'
// Determine if commodity prices require a time series representation or not
loop(commodity,
loop(node$sum(grid, p_gn(grid, node, 'useCommodityPrice')),
// Find the steps with changing fuel prices
option clear = tt;
tt(t)${ ts_priceChange(commodity, t) } = yes;
tt(t)${ ts_priceChange(node, t) } = yes;
// If only up to a single value
if(sum(tt, 1) <= 1,
p_price(commodity, 'useConstant') = 1; // Use a constant for commodity prices
p_price(commodity, 'price') = sum(tt, ts_priceChange(commodity, tt)) // Determine the price as the only value in the time series
p_price(node, 'useConstant') = 1; // Use a constant for commodity prices
p_price(node, 'price') = sum(tt, ts_priceChange(node, tt)) // Determine the price as the only value in the time series
// If multiple values found, use time series
else
p_price(commodity, 'useTimeSeries') = 1;
p_price(node, 'useTimeSeries') = 1;
); // END if(sum(tt))
); // END loop(fuel)
......
......@@ -86,18 +86,6 @@ $ifthen exist '%input_dir%/unit_fail3.gdx'
$$gdxin
$endif
$ifthen exist '%input_dir%/commodity2.gdx'
$$gdxin '%input_dir%/commodity2.gdx'
$$loaddcm commodity
$$gdxin
$endif
$ifthen exist '%input_dir%/commodity3.gdx'
$$gdxin '%input_dir%/commodity3.gdx'
$$loaddcm commodity
$$gdxin
$endif
$ifthen exist '%input_dir%/unitUnitEffLevel2.gdx'
$$gdxin '%input_dir%/unitUnitEffLevel2.gdx'
$$loaddcm unitUnitEffLevel
......
......@@ -91,7 +91,6 @@ equations
q_conversionIncHR_help2(grid, node, s, hr, effSelector, unit, f, t) "Helper equation 2 to ensure that the first heat rate segments are used first"
q_unitEqualityConstraint(s, eq_constraint, unit, f, t) "Fixing the ratio between inputs and/or outputs"
q_unitGreaterThanConstraint(s, gt_constraint, unit, f, t) "Lower limit for the ratio between inputs and/or outputs"
* q_commodityUseLimit(s, commodity, unit, f, t) "Commodity use cannot exceed limits"
// Energy Transfer
q_transfer(grid, node, node, s, f, t) "Rightward and leftward transfer must match the total transfer"
......
......@@ -2002,7 +2002,7 @@ q_conversionSOS2IntermediateOutput(s_active(s), suft(effLambda(effGroup), unit,
) // END sum(gnu_output)
;
* --- Commodity Use Limitation -----------------------------------------------------
* --- Fixed ratio of inputs or outputs ----------------------------------------
q_unitEqualityConstraint(s_active(s), eq_constraint, uft(unit, f, t))
${ sft(s, f, t)
......@@ -2028,7 +2028,7 @@ q_unitEqualityConstraint(s_active(s), eq_constraint, uft(unit, f, t))
]
;
* --- Commodity Use Limitation -----------------------------------------------------
* --- Constrained ratio of inputs or outputs ----------------------------------
q_unitGreaterThanConstraint(s_active(s), gt_constraint, uft(unit, f, t))
${ sft(s, f, t)
......
......@@ -631,18 +631,18 @@ loop(m,
* --- Calculating fuel price time series --------------------------------------
tmp_ = smin(t_full(t),ord(t));
loop(commodity$p_price(commodity, 'useTimeSeries'),
loop(node$p_price(node, 'useTimeSeries'),
// Determine the time steps where the prices change
Option clear = tt;
tt(t)$ts_priceChange(commodity,t) = yes;
tt(t)$ts_priceChange(node,t) = yes;
tmp = sum(tt(t)$(ord(t) < tmp_),
ts_priceChange(commodity, t)
ts_priceChange(node, t)
);
loop(t_full(t),
tmp = tmp + ts_priceChange(commodity, t);
ts_price(commodity, t) = tmp;
tmp = tmp + ts_priceChange(node, t);
ts_price(node, t) = tmp;
);
); // END loop(commodity)
); // END loop(node)
* --- Slack Direction ---------------------------------------------------------
......
......@@ -99,7 +99,6 @@ Option clear = q_conversionIncHR_help1;
Option clear = q_conversionIncHR_help2;
Option clear = q_unitEqualityConstraint;
Option clear = q_unitGreaterThanConstraint;
*Option clear = q_commodityUseLimit;
// Energy Transfer
Option clear = q_transfer;
......
......@@ -423,13 +423,13 @@ $offtext
+ p_price(node, 'price')$p_price(node, 'useConstant')
+ sum(tt_aggcircular(t, t_), ts_price(node, t_))$p_price(node, 'useTimeSeries')
/ mInterval(mSolve, 'stepsPerInterval', counter)
)$un_commodity_in(unit, node)
)$gnu_input(grid, node, unit)
// output node cost (if price > 0 --> ts_vomCost_ < 0, i.e. considered as revenue)
- (
+ p_price(node, 'price')$p_price(node, 'useConstant')
+ sum(tt_aggcircular(t, t_), ts_price(node, t_))$p_price(node, 'useTimeSeries')
/ mInterval(mSolve, 'stepsPerInterval', counter)
)$un_commodity_out(unit, node)
)$gnu_output(grid, node, unit)
// emission cost
+ sum(emission$p_unitEmissionCost(unit, node, emission), // Emission taxes
+ p_unitEmissionCost(unit, node, emission)
......
......@@ -117,10 +117,6 @@ loop(s_realized(s),
r_gen(gnuft(grid, node, unit, f, startp(t)))$sft_realized(s, f, t)
= v_gen.l(grid, node, unit, s, f, t)
;
// Fuel use of units
r_fuelUse(node, uft(unit_commodity, f, startp(t)))$(un_commodity(unit_commodity, node)$sft_realized(s, f, t))
= - sum(gnu(grid, node, unit_commodity), v_gen.l(grid, node, unit_commodity, s, f, t))
;
// Transfer of energy between nodes
r_transfer(gn2n(grid, from_node, to_node), f, startp(t))$sft_realized(s, f, t)
= v_transfer.l(grid, from_node, to_node, s, f, t)
......
......@@ -37,14 +37,19 @@ loop(m,
* p_gnu(grid, node, unit, 'vomCosts');
// Fuel and emission costs during normal operation
r_uFuelEmissionCost(commodity, unit_commodity(unit), ft_realizedNoReset(f,startp(t)))$un_commodity(unit, commodity)
// Note that this result calculation uses ts_price directly while the
// objective function uses ts_price average over the interval. There can
// be differences if realized intervals contain several time steps.
r_uFuelEmissionCost(gnu(grid, node, unit), ft_realizedNoReset(f,startp(t)))
= 1e-6 // Scaling to MEUR
* p_stepLengthNoReset(m, f, t)
* r_fuelUse(commodity, unit, f, t)
* [ + p_price(commodity, 'price')$p_price(commodity, 'useConstant')
+ ts_price(commodity, t)$p_price(commodity, 'useTimeSeries')
* abs(r_gen(grid, node, unit, f, t))
* [ + p_price(node, 'price')${p_price(node, 'useConstant') and gnu_input(grid, node, unit)}
+ ts_price(node, t)${p_price(node, 'useTimeSeries') and gnu_input(grid, node, unit)}
- p_price(node, 'price')${p_price(node, 'useConstant') and gnu_output(grid, node, unit)}
- ts_price(node, t)${p_price(node, 'useTimeSeries') and gnu_output(grid, node, unit)}
// Emission costs
+ sum(emission, p_unitEmissionCost(unit, commodity, emission))
+ sum(emission, p_unitEmissionCost(unit, node, emission))
];
// Unit startup costs
......@@ -160,9 +165,9 @@ loop(m,
;
// Total fuel & emission costs
r_uTotalFuelEmissionCost(commodity, unit)$un_commodity(unit, commodity)
r_uTotalFuelEmissionCost(gnu(grid, node, unit))
= sum(ft_realizedNoReset(f,startp(t)),
+ r_uFuelEmissionCost(commodity, unit, f, t)
+ r_uFuelEmissionCost(grid, node, unit, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s) * p_msWeight(m, s) * p_s_discountFactor(s))
);
......@@ -239,7 +244,7 @@ loop(m,
) // END sum(gnu_output)
*
{
+ sum(un_commodity(unit, commodity), r_uFuelEmissionCost(commodity, unit, f, t))
+ sum(gnu_input(grid_, node_, unit), r_uFuelEmissionCost(grid_, node_, unit, f, t))
+ r_uStartupCost(unit, f, t)
}
)
......@@ -282,8 +287,8 @@ loop(m,
);
// Energy generation by fuels
r_genFuel(gn(grid, node), commodity, ft_realizedNoReset(f, startp(t)))$sum(gnu_input(grid_, commodity, unit)$gnu_output(grid, node, unit),r_gen(grid_, commodity, unit, f, t))
= sum(gnu_output(grid, node, unit)$sum(gnu_input(grid_, commodity, unit), 1),
r_genFuel(gn(grid, node), node_, ft_realizedNoReset(f, startp(t)))$sum(gnu_input(grid_, node_, unit)$gnu_output(grid, node, unit),r_gen(grid_, node_, unit, f, t))
= sum(gnu_output(grid, node, unit)$sum(gnu_input(grid_, node_, unit), 1),
+ r_gen(grid, node, unit, f, t)
);
// The calculation with multiple inputs needs to be fixed below (right share for different commodities - now units with multiple input commodities will get the same amount allocated which will then be too big
......@@ -302,9 +307,9 @@ loop(m,
); // END sum(unit)
// Total generation on each node by fuels
r_gnTotalGenFuel(gn(grid, node), commodity)
r_gnTotalGenFuel(gn(grid, node), node_)
= sum(ft_realizedNoReset(f, startp(t)),
+ r_genFuel(grid, node, commodity, f, t)
+ r_genFuel(grid, node, node_, f, t)
* p_stepLengthNoReset(m, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s) * p_msWeight(m, s))
); // END sum(ft_realizedNoReset)
......@@ -327,11 +332,23 @@ loop(m,
* --- Emission Results --------------------------------------------------------
// Emissions of units (only for commodities, not including startup fuels)
r_emissions(commodity, emission, unit, ft_realizedNoReset(f,startp(t)))$un_commodity(unit, commodity)
// Emissions of units (not including start-up fuels)
// Only taking into account emissions from input because emissions from output
// do not cause costs and are not considered in emission cap
r_emissions(grid, node, emission, unit, ft_realizedNoReset(f,startp(t)))
$gnu_input(grid, node, unit)
= + p_stepLengthNoReset(m, f, t)
* r_fuelUse(commodity, unit, f, t)
* p_nEmission(commodity, emission)
* abs(r_gen(grid, node, unit, f, t))
* p_nEmission(node, emission)
/ 1e3 // NOTE!!! Conversion to t/MWh from kg/MWh in data
;
// Emissions from unit outputs
r_emissionsFromOutput(grid, node, emission, unit, ft_realizedNoReset(f,startp(t)))
$gnu_output(grid, node, unit)
= + p_stepLengthNoReset(m, f, t)
* r_gen(grid, node, unit, f, t)
* p_nEmission(node, emission)
/ 1e3 // NOTE!!! Conversion to t/MWh from kg/MWh in data
;
......@@ -347,25 +364,46 @@ loop(m,
/ 1e3 // NOTE!!! Conversion to t/MWh from kg/MWh in data
); // END sum(starttype)
// Emission sums from normal operation input
r_nuTotalEmissionsOperation(node, unit, emission)$nu(node, unit)
= sum(ft_realizedNoReset(f, startp(t)),
+ sum(gn(grid, node), r_emissions(grid, node, emission, unit, f, t))
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s) * p_msWeight(m, s))
)
;
// Emission sums from unit outputs
r_nuTotalEmissionsFromOutput(node, unit, emission)$nu(node, unit)
= sum(ft_realizedNoReset(f, startp(t)),
+ sum(gn(grid, node), r_emissionsFromOutput(grid, node, emission, unit, f, t))
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s) * p_msWeight(m, s))
)
;
// Emission sums (only for commodities, not including startup fuels)
r_nuTotalEmissions (commodity, unit, emission)
// Emission sums from start-ups
r_nuTotalEmissionsStartup(node, unit, emission)$nu_startup(node, unit)
= sum(ft_realizedNoReset(f, startp(t)),
+ r_emissions(commodity, emission, unit, f, t)
+ r_emissionsStartup(node, emission, unit, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s) * p_msWeight(m, s))
)
;
r_nTotalEmissions(commodity, emission)
= sum(unit, r_nuTotalEmissions (commodity, unit, emission))
// Emission sums (normal operation input and start-ups)
r_nuTotalEmissions(node, unit, emission)
= r_nuTotalEmissionsOperation(node, unit, emission)
+ r_nuTotalEmissionsStartup(node, unit, emission)
;
r_nTotalEmissions(node, emission)
= sum(unit, r_nuTotalEmissions (node, unit, emission))
;
r_uTotalEmissions(unit, emission)
= sum(commodity, r_nuTotalEmissions (commodity, unit, emission))
= sum(node, r_nuTotalEmissions (node, unit, emission))
;
r_totalEmissions (emission)
= sum(commodity, r_nTotalEmissions(commodity, emission))
= sum(node, r_nTotalEmissions(node, emission))
;
* --- Total Unit Online Results -----------------------------------------------
......@@ -488,16 +526,16 @@ r_gnTotalConsumptionShare(gn(grid, node))${ r_gTotalConsumption(grid) > 0 }
* --- Total Fuel Consumption Results ------------------------------------------
// Total fuel consumption in grids over the simulation
r_gTotalGenFuel(grid, commodity)
= sum(gn(grid, node), r_gnTotalGenFuel(grid, node, commodity));
r_gTotalGenFuel(grid, node_)
= sum(gn(grid, node), r_gnTotalGenFuel(grid, node, node_));
// Total fuel consumption over the simulation
r_totalGenFuel(commodity)
= sum(gn(grid, node), r_gnTotalGenFuel(grid, node, commodity));
r_totalGenFuel(node_)
= sum(gn(grid, node), r_gnTotalGenFuel(grid, node, node_));
// Total fuel consumption gn/g shares
r_gnTotalGenFuelShare(gn(grid, node), commodity)${ r_gnTotalGen(grid, node) }
= r_gnTotalGenFuel(grid, node, commodity)
r_gnTotalGenFuelShare(gn(grid, node), node_)${ r_gnTotalGen(grid, node) }
= r_gnTotalGenFuel(grid, node, node_)
/ r_gnTotalGen(grid, node);
* --- Total Spilled Energy Results --------------------------------------------
......@@ -672,15 +710,15 @@ d_cop(unit, ft_realizedNoReset(f, startp(t)))$sum(gnu_input(grid, node, unit), 1
]
+ Eps; // Eps to correct GAMS plotting (zeroes are not skipped)
// Estimated efficiency, calculated from commodity based inputs
d_eff(unit_commodity(unit), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
// Estimated efficiency, calculated from inputs
d_eff(unit(unit), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= sum(gnu_output(grid, node, unit),
+ r_gen(grid, node, unit, f, t)
) // END sum(gnu_output)
/ [ sum(gnu_input(grid, node, unit)$un_commodity(unit, node),
+ r_fuelUse(node, unit, f, t)
/ [ sum(gnu_input(grid, node, unit),
+ abs(r_gen(grid, node, unit, f, t))
) // END sum(gnu_input)
+ 1${not sum(gnu_input(grid, node, unit)$un_commodity(unit, node), r_fuelUse(node, unit, f, t))}
+ 1${not sum(gnu_input(grid, node, unit), abs(r_gen(node, unit, f, t)))}
]
+ Eps; // Eps to correct GAMS plotting (zeroes are not skipped)
$endif.diag
......
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