Commit 2c5e6ed6 authored by Niina Helistö's avatar Niina Helistö
Browse files

1) Updating 1e_scenChanges.gms according to the new inputs, 2) adding a new...

1) Updating 1e_scenChanges.gms according to the new inputs, 2) adding a new constraint q_unitGreaterThanConstraint, and 3) fixing a few constraints to work with the invest model as well.
parent 0ed1c708
......@@ -57,6 +57,7 @@ Model building /
* q_conversionIncHR_help1
* q_conversionIncHR_help2
* q_unitEqualityConstraint
* q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
......
......@@ -57,6 +57,7 @@ Model invest /
q_conversionIncHR_help1
q_conversionIncHR_help2
q_unitEqualityConstraint
q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
......
......@@ -56,7 +56,8 @@ Model schedule /
q_conversionIncHRBounds
q_conversionIncHR_help1
q_conversionIncHR_help2
* q_unitEqualityConstraint
q_unitEqualityConstraint
q_unitGreaterThanConstraint
* q_commodityUseLimit
// Energy Transfer
......
......@@ -86,15 +86,15 @@ $ifthen exist '%input_dir%/unit_fail3.gdx'
$$gdxin
$endif
$ifthen exist '%input_dir%/fuel2.gdx'
$$gdxin '%input_dir%/fuel2.gdx'
$$loaddcm fuel
$ifthen exist '%input_dir%/commodity2.gdx'
$$gdxin '%input_dir%/commodity2.gdx'
$$loaddcm commodity
$$gdxin
$endif
$ifthen exist '%input_dir%/fuel3.gdx'
$$gdxin '%input_dir%/fuel3.gdx'
$$loaddcm fuel
$ifthen exist '%input_dir%/commodity3.gdx'
$$gdxin '%input_dir%/commodity3.gdx'
$$loaddcm commodity
$$gdxin
$endif
......@@ -110,18 +110,6 @@ $ifthen exist '%input_dir%/unitUnitEffLevel3.gdx'
$$gdxin
$endif
$ifthen exist '%input_dir%/uFuel2.gdx'
$$gdxin '%input_dir%/uFuel2.gdx'
$$loaddcm uFuel
$$gdxin
$endif
$ifthen exist '%input_dir%/uFuel3.gdx'
$$gdxin '%input_dir%/uFuel3.gdx'
$$loaddcm uFuel
$$gdxin
$endif
$ifthen exist '%input_dir%/effLevelGroupUnit2.gdx'
$$gdxin '%input_dir%/effLevelGroupUnit2.gdx'
$$loaddcm effLevelGroupUnit
......@@ -170,15 +158,15 @@ $ifthen exist '%input_dir%/p_gnn3.gdx'
$$gdxin
$endif
$ifthen exist '%input_dir%/p_gnu2.gdx'
$$gdxin '%input_dir%/p_gnu2.gdx'
$$loaddcm p_gnu
$ifthen exist '%input_dir%/p_gnu_io2.gdx'
$$gdxin '%input_dir%/p_gnu_io2.gdx'
$$loaddcm p_gnu_io
$$gdxin
$endif
$ifthen exist '%input_dir%/p_gnu3.gdx'
$$gdxin '%input_dir%/p_gnu3.gdx'
$$loaddcm p_gnu
$ifthen exist '%input_dir%/p_gnu_io3.gdx'
$$gdxin '%input_dir%/p_gnu_io3.gdx'
$$loaddcm p_gnu_io
$$gdxin
$endif
......@@ -362,15 +350,15 @@ $ifthen exist '%input_dir%/p_gnPolicy3.gdx'
$$gdxin
$endif
$ifthen exist '%input_dir%/p_uFuel2.gdx'
$$gdxin '%input_dir%/p_uFuel2.gdx'
$$loaddcm p_uFuel
$ifthen exist '%input_dir%/p_uStartupFuel2.gdx'
$$gdxin '%input_dir%/p_uStartupFuel2.gdx'
$$loaddcm p_uStartupFuel
$$gdxin
$endif
$ifthen exist '%input_dir%/p_uFuel3.gdx'
$$gdxin '%input_dir%/p_uFuel3.gdx'
$$loaddcm p_uFuel
$ifthen exist '%input_dir%/p_uStartupFuel3.gdx'
$$gdxin '%input_dir%/p_uStartupFuel3.gdx'
$$loaddcm p_uStartupFuel
$$gdxin
$endif
......@@ -386,27 +374,27 @@ $ifthen exist '%input_dir%/flowUnit3.gdx'
$$gdxin
$endif
$ifthen exist '%input_dir%/gngnu_fixedOutputRatio2.gdx'
$$gdxin '%input_dir%/gngnu_fixedOutputRatio2.gdx'
$$loaddcm gngnu_fixedOutputRatio
$ifthen exist '%input_dir%/p_unitConstraint2.gdx'
$$gdxin '%input_dir%/p_unitConstraint2.gdx'
$$loaddcm p_unitConstraint
$$gdxin
$endif
$ifthen exist '%input_dir%/gngnu_fixedOutputRatio3.gdx'
$$gdxin '%input_dir%/gngnu_fixedOutputRatio3.gdx'
$$loaddcm gngnu_fixedOutputRatio
$ifthen exist '%input_dir%/p_unitConstraint3.gdx'
$$gdxin '%input_dir%/p_unitConstraint3.gdx'
$$loaddcm p_unitConstraint
$$gdxin
$endif
$ifthen exist '%input_dir%/gngnu_constrainedOutputRatio2.gdx'
$$gdxin '%input_dir%/gngnu_constrainedOutputRatio2.gdx'
$$loaddcm gngnu_constrainedOutputRatio
$ifthen exist '%input_dir%/p_unitConstraintNode2.gdx'
$$gdxin '%input_dir%/p_unitConstraintNode2.gdx'
$$loaddcm p_unitConstraintNode
$$gdxin
$endif
$ifthen exist '%input_dir%/gngnu_constrainedOutputRatio3.gdx'
$$gdxin '%input_dir%/gngnu_constrainedOutputRatio3.gdx'
$$loaddcm gngnu_constrainedOutputRatio
$ifthen exist '%input_dir%/p_unitConstraintNode3.gdx'
$$gdxin '%input_dir%/p_unitConstraintNode3.gdx'
$$loaddcm p_unitConstraintNode
$$gdxin
$endif
......
......@@ -87,6 +87,7 @@ equations
q_conversionIncHR_help1(grid, node, s, hr, effSelector, unit, f, t) "Helper equation 1 to ensure that the first heat rate segments are used first"
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
......
......@@ -447,7 +447,7 @@ q_resDemandLargestInfeedTransfer(restypeDirectionGroup(restype, up_down, group),
q_maxDownward(gnu(grid, node, unit), msft(m, s, f, t))
${ gnuft(grid, node, unit, f, t)
and p_gnu(grid, node, unit, 'capacity')
and (p_gnu(grid, node, unit, 'capacity') or p_gnu(grid, node, unit, 'unitSize'))
and {
[ ord(t) < tSolveFirst + smax(restype, p_gnReserves(grid, node, restype, 'reserve_length')) // Unit is either providing
and sum(restype, gnuRescapable(restype, 'down', grid, node, unit)) // downward reserves
......@@ -555,7 +555,7 @@ q_maxDownward(gnu(grid, node, unit), msft(m, s, f, t))
q_maxDownwardOfflineReserve(gnu(grid, node, unit), msft(m, s, f, t))
${ gnuft(grid, node, unit, f, t)
and p_gnu(grid, node, unit, 'capacity')
and (p_gnu(grid, node, unit, 'capacity') or p_gnu(grid, node, unit, 'unitSize'))
and {
[ ord(t) < tSolveFirst + smax(restype, p_gnReserves(grid, node, restype, 'reserve_length')) // Unit is providing
and sum(restype, gnuRescapable(restype, 'down', grid, node, unit)) // downward reserves
......@@ -608,7 +608,7 @@ q_maxDownwardOfflineReserve(gnu(grid, node, unit), msft(m, s, f, t))
q_maxUpward(gnu(grid, node, unit), msft(m, s, f, t))
${ gnuft(grid, node, unit, f, t)
and p_gnu(grid, node, unit, 'capacity')
and (p_gnu(grid, node, unit, 'capacity') or p_gnu(grid, node, unit, 'unitSize'))
and {
[ ord(t) < tSolveFirst + smax(restype, p_gnReserves(grid, node, restype, 'reserve_length')) // Unit is either providing
and sum(restype, gnuRescapable(restype, 'up', grid, node, unit)) // upward reserves
......@@ -711,7 +711,7 @@ q_maxUpward(gnu(grid, node, unit), msft(m, s, f, t))
q_maxUpwardOfflineReserve(gnu(grid, node, unit), msft(m, s, f, t))
${ gnuft(grid, node, unit, f, t)
and p_gnu(grid, node, unit, 'capacity')
and (p_gnu(grid, node, unit, 'capacity') or p_gnu(grid, node, unit, 'unitSize'))
and {
[ ord(t) < tSolveFirst + smax(restype, p_gnReserves(grid, node, restype, 'reserve_length')) // Unit is providing
and sum(restype, gnuRescapable(restype, 'up', grid, node, unit)) // upward reserves
......@@ -2005,6 +2005,24 @@ q_unitEqualityConstraint(s_active(s), eq_constraint, uft(unit, f, t))
+ p_unitConstraint(unit, eq_constraint)
;
* --- Commodity Use Limitation -----------------------------------------------------
q_unitGreaterThanConstraint(s_active(s), gt_constraint, uft(unit, f, t))
${ sft(s, f, t)
and sum(node$p_unitConstraintNode(unit, gt_constraint, node), 1)
} ..
// Inputs and/or outputs multiplied by their coefficient
+ sum(gnu(grid, node, unit)$p_unitConstraintNode(unit, gt_constraint, node),
+ v_gen(grid, node, unit, s, f, t) * p_unitConstraintNode(unit, gt_constraint, node)
)
=G=
// Constant multiplied by capacity
+ p_unitConstraint(unit, gt_constraint)
;
* --- Total Transfer Limits ---------------------------------------------------
q_transfer(gn2n_directional(grid, node, node_), sft(s, 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