toggle_reserves

toggle_reserves(mpc, on_off)

toggle_reserves() - Enable, disable or check status of fixed reserve requirements.

MPC = TOGGLE_RESERVES(MPC, 'on')
MPC = TOGGLE_RESERVES(MPC, 'off')
T_F = TOGGLE_RESERVES(MPC, 'status')

Enables, disables or checks the status of a set of OPF userfcn
callbacks to implement co-optimization of reserves with fixed zonal
reserve requirements.

These callbacks expect to find a 'reserves' field in the input MPC,
where MPC.reserves is a struct with the following fields:
    zones   nrz x ng, zone(i, j) = 1, if gen j belongs to zone i
                                   0, otherwise
    req     nrz x 1, zonal reserve requirement in MW
    cost    (ng or ngr) x 1, cost of reserves in $/MW
    qty     (ng or ngr) x 1, max quantity of reserves in MW (optional)
where nrz is the number of reserve zones and ngr is the number of
generators belonging to at least one reserve zone and ng is the total
number of generators.

The 'int2ext' callback also packages up results and stores them in
the following output fields of results.reserves:
    R       - ng x 1, reserves provided by each gen in MW
    Rmin    - ng x 1, lower limit on reserves provided by each gen, (MW)
    Rmax    - ng x 1, upper limit on reserves provided by each gen, (MW)
    mu.l    - ng x 1, shadow price on reserve lower limit, ($/MW)
    mu.u    - ng x 1, shadow price on reserve upper limit, ($/MW)
    mu.Pmax - ng x 1, shadow price on Pg + R <= Pmax constraint, ($/MW)
    prc     - ng x 1, reserve price for each gen equal to maximum of the
                      shadow prices on the zonal requirement constraint
                      for each zone the generator belongs to

See also runopf_w_res(), add_userfcn(), remove_userfcn(), run_userfcn(), t_case30_userfcns().