2d_constraints.gms 175 KB
Newer Older
3001
3002
3003
3004
                            ${ uft_onlineLP(unit_fuel, f, t) }
                        + v_startup_MIP(unit_fuel, starttype, s, f, t)
                            ${ uft_onlineMIP(unit_fuel, f, t) }
                        ]
3005
                        * sum(uFuel(unit_fuel, 'startup', fuel),
3006
                            + p_uStartup(unit_fuel, starttype, 'consumption')
3007
                                * p_uFuel(unit_fuel, 'startup', fuel, 'fixedFuelFraction')
3008
                                * p_fuelEmission(fuel, emission) / 1e3
3009
                                * sum(gnu_output(grid, node, unit_fuel)${gnGroup(grid, node, group)},
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
                                    + p_gnu(grid, node, unit_fuel, 'unitSizeGen')
                                    ) // END sum(gnu_output)
                                / sum(gnu_output(grid_, node_, unit_fuel),
                                    + p_gnu(grid_, node_, unit_fuel, 'unitSizeGen')
                                    ) // END sum(gnu_output)
                            ) // END sum(uFuel)
                    ) // END sum(starttype)
                ) // sum(uft_online)
            ] // END * p_sft_Probability
        ) // END sum(msft)

3021
    =L=
3022
3023

    // Permitted nodal emission cap
3024
    + p_groupPolicy3D(group, 'emissionCap', emission)
3025
;
3026
3027
3028

*--- Maximum Energy Share -----------------------------------------------------

3029
3030
3031
q_energyShareMax(group)
    ${  p_groupPolicy(group, 'energyShareMax')
        } ..
3032
3033

    + sum(msft(m, s, f, t),
3034
        + p_msft_Probability(m,s,f,t)
3035
3036
3037
            * p_stepLength(m, f, t)
            * [
                // Generation of units in the group
3038
                + sum(gnu_output(grid, node, unit)${    gnuGroup(grid, node, unit, group)
3039
                                                        and p_gnu(grid, node, unit, 'unitSizeGen')
3040
                                                        and gnGroup(grid, node, group)
3041
                                                        and gnuft(grid, node, unit, f, t)
3042
                                                        },
3043
                    + v_gen(grid, node, unit, s, f, t)
3044
3045
3046
                    ) // END sum(gnu)

                // External power inflow/outflow and consumption of units times the maximum share
3047
                - p_groupPolicy(group, 'energyShareMax')
3048
                  * [
3049
                    - sum(gnGroup(grid, node, group),
3050
                        + ts_influx_(grid, node, f, t, s)
3051
                        ) // END sum(gnGroup)
3052
                    - sum(gnu_input(grid, node, unit)${ p_gnu(grid, node, unit, 'unitSizeCons')
3053
                                                        and gnGroup(grid, node, group)
3054
                                                        and gnuft(grid, node, unit, f, t)
3055
                                                        },
3056
                        + v_gen(grid, node, unit, s, f, t)
3057
                        ) // END sum(gnu_input)
3058
                    ] // END * p_groupPolicy
3059
3060
3061
3062
3063
                ] // END * p_stepLength
        ) // END sum(msft)

    =L=

3064
3065
    0
;
3066
3067
3068

*--- Minimum Energy Share -----------------------------------------------------

3069
3070
3071
q_energyShareMin(group)
    ${  p_groupPolicy(group, 'energyShareMin')
        } ..
3072
3073

    + sum(msft(m, s, f, t),
3074
        + p_msft_Probability(m,s,f,t)
3075
3076
3077
            * p_stepLength(m, f, t)
            * [
                // Generation of units in the group
3078
                + sum(gnu_output(grid, node, unit)${    gnuGroup(grid, node, unit, group)
3079
                                                        and p_gnu(grid, node, unit, 'unitSizeGen')
3080
                                                        and gnGroup(grid, node, group)
3081
                                                        and gnuft(grid, node, unit, f, t)
3082
                                                        },
3083
                    + v_gen(grid, node, unit, s, f, t)
3084
3085
3086
                    ) // END sum(gnu)

                // External power inflow/outflow and consumption of units times the maximum share
3087
                - p_groupPolicy(group, 'energyShareMin')
3088
                  * [
3089
                    - sum(gnGroup(grid, node, group),
3090
                        + ts_influx_(grid, node, f, t, s)
3091
                        ) // END sum(gnGroup)
3092
                    - sum(gnu_input(grid, node, unit)${ p_gnu(grid, node, unit, 'unitSizeCons')
3093
                                                        and gnGroup(grid, node, group)
3094
                                                        and gnuft(grid, node, unit, f, t)
3095
                                                        },
3096
                        + v_gen(grid, node, unit, s, f, t)
3097
                        ) // END sum(gnu_input)
3098
                    ] // END * p_groupPolicy
3099
3100
3101
3102
3103
                ] // END * p_stepLength
        ) // END sum(msft)

    =G=

3104
3105
    0
;
3106
3107


3108
3109
3110
3111
3112
*--- Minimum Consumption ----------------------------------------------------------

q_minCons(group, gnu(grid, node, unit), sft(s, f, t))${  p_groupPolicy(group, 'minCons')
                                                         and p_gnu(grid, node, unit, 'unitSizeCons')
                                                         and gnuGroup(grid, node, unit, group)
3113
                                                         and gnuft(grid, node, unit, f, t)
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
                                                         } ..
     // Consumption of units
     - sum(gnu_input(grid, node, unit)${ p_gnu(grid, node, unit, 'unitSizeCons')
                                         and gnuGroup(grid, node, unit, group)
                                         },
        [
        + v_gen(grid, node, unit, s, f, t)
        ]
        /[
        + p_gnu(grid, node, unit, 'unitSizeCons')
        ]
    ) // END sum(gnu)

     // unit online state * minimum consumption
     + sum(gnuGroup(grid, node, unit, group)${ p_gnu(grid, node, unit, 'unitSizeCons')
                                               },
         - p_groupPolicy(group, 'minCons')
             * [
               + v_online_LP(unit, s, f+df_central(f,t), t)${uft_onlineLP(unit, f, t)}
               + v_online_MIP(unit, s, f+df_central(f,t), t)${uft_onlineMIP(unit, f, t)}
               ]
     )

    =G=

    0
;

3142
*--- Maximum Share of Reserve Provision ---------------------------------------
3143

3144
3145
q_ReserveShareMax(group, restypeDirectionGroup(restype, up_down, group_), sft(s, f, t))
    ${  ord(t) < tSolveFirst + p_groupReserves(group_, restype, 'reserve_length')
3146
3147
        and not [ restypeReleasedForRealization(restype)
                  and sft_realized(s, f, t)]
3148
        and p_groupReserves4D(group, restype, up_down, group_, 'ReserveShareMax')
3149
3150
        }..

3151
    // Reserve provision from units in 'group'
3152
    + sum(gnuft(grid, node, unit, f, t)${ gnuRescapable(restype, up_down, grid, node, unit)
3153
3154
                                          and gnuGroup(grid, node, unit, group)
                                          },
3155
        + v_reserve(restype, up_down, grid, node, unit, s, f+df_reserves(grid, node, restype, f, t), t)
3156
            * [ // Account for reliability of reserves
3157
3158
                + 1${sft_realized(s, f+df_reserves(grid, node, restype, f, t), t)} // reserveReliability limits the reliability of reserves locked ahead of time.
                + p_gnuReserves(grid, node, unit, restype, 'reserveReliability')${not sft_realized(s, f+df_reserves(grid, node, restype, f, t), t)}
3159
3160
3161
                ] // END * v_reserve
        ) // END sum(nuft)

3162
3163

    // Reserve provision from other reserve categories when they can be shared
3164
    + sum((gnuft(grid, node, unit, f, t), restype_)${ p_gnuRes2Res(grid, node, unit, restype_, up_down, restype)
3165
3166
                                                      and gnuGroup(grid, node, unit, group)
                                                      },
3167
3168
        + v_reserve(restype_, up_down, grid, node, unit, s, f+df_reserves(grid, node, restype_, f, t), t)
            * p_gnuRes2Res(grid, node, unit, restype_, up_down, restype)
3169
            * [ // Account for reliability of reserves
3170
3171
3172
                + 1${sft_realized(s, f+df_reserves(grid, node, restype, f, t), t)} // reserveReliability limits the reliability of reserves locked ahead of time.
                + p_gnuReserves(grid, node, unit, restype, 'reserveReliability')${not sft_realized(s, f+df_reserves(grid, node, restype, f, t), t)}
                    * p_gnuReserves(grid, node, unit, restype_, 'reserveReliability')
3173
3174
3175
                ] // END * v_reserve
        ) // END sum(nuft)

3176
3177
    =L=

3178
    + p_groupReserves4D(group, restype, up_down, group_, 'ReserveShareMax')
3179
        * [
3180
    // Reserve provision by units to the nodes in 'group_'
3181
            + sum(gnuft(grid, node, unit, f, t)${ gnuRescapable(restype, up_down, grid, node, unit)
3182
3183
                                                  and gnGroup(grid, node, group_)
                                                  },
3184
                + v_reserve(restype, up_down, grid, node, unit, s, f+df_reserves(grid, node, restype, f, t), t)
3185
                    * [ // Account for reliability of reserves
3186
3187
                        + 1${sft_realized(s, f+df_reserves(grid, node, restype, f, t), t)} // reserveReliability limits the reliability of reserves locked ahead of time.
                        + p_gnuReserves(grid, node, unit, restype, 'reserveReliability')${not sft_realized(s, f+df_reserves(grid, node, restype, f, t), t)}
3188
                        ] // END * v_reserve
3189
3190
3191
                  ) // END sum(nuft)

    // Reserve provision from other reserve categories when they can be shared
3192
            + sum((gnuft(grid, node, unit, f, t), restype_)${ p_gnuRes2Res(grid, node, unit, restype_, up_down, restype)
3193
3194
                                                              and gnGroup(grid, node, group_)
                                                              },
3195
3196
                + v_reserve(restype_, up_down, grid, node, unit, s, f+df_reserves(grid, node, restype_, f, t), t)
                    * p_gnuRes2Res(grid, node, unit, restype_, up_down, restype)
3197
                    * [ // Account for reliability of reserves
3198
3199
3200
                        + 1${sft_realized(s, f+df_reserves(grid, node, restype, f, t), t)} // reserveReliability limits the reliability of reserves locked ahead of time.
                        + p_gnuReserves(grid, node, unit, restype, 'reserveReliability')${not sft_realized(s, f+df_reserves(grid, node, restype, f, t), t)}
                            * p_gnuReserves(grid, node, unit, restype_, 'reserveReliability')
3201
                        ] // END * v_reserve
3202
3203
                  ) // END sum(nuft)

3204
3205
3206
    // Reserve provision to 'group_' via transfer links
            + sum(gn2n_directional(grid, node_, node)${ gnGroup(grid, node, group_)
                                                        and not gnGroup(grid, node_, group_)
3207
                                                        and restypeDirectionGridNodeNode(restype, up_down, grid, node_, node)
3208
3209
                                                        },
                + (1 - p_gnn(grid, node_, node, 'transferLoss') )
3210
                    * v_resTransferRightward(restype, up_down, grid, node_, node, s, f+df_reserves(grid, node_, restype, f, t), t) // Reserves from another node - reduces the need for reserves in the node
3211
3212
3213
                ) // END sum(gn2n_directional)
            + sum(gn2n_directional(grid, node, node_)${ gnGroup(grid, node, group_)
                                                        and not gnGroup(grid, node_, group_)
3214
                                                        and restypeDirectionGridNodeNode(restype, up_down, grid, node_, node)
3215
3216
                                                        },
                + (1 - p_gnn(grid, node, node_, 'transferLoss') )
3217
                    * v_resTransferLeftward(restype, up_down, grid, node, node_, s, f+df_reserves(grid, node_, restype, f, t), t) // Reserves from another node - reduces the need for reserves in the node
3218
                ) // END sum(gn2n_directional)
3219
3220
3221

          ] // END * p_groupPolicy
;
3222

3223
3224
$ifthen exist '%input_dir%/additional_constraints.inc'
   $$include '%input_dir%/additional_constraints.inc'
3225
$endif