Package pypower :: Module runopf_w_res
[hide private]
[frames] | no frames]

Module runopf_w_res

source code

Runs an optimal power flow with fixed zonal reserves.

Functions [hide private]
 
runopf_w_res(*args)
Runs an optimal power flow with fixed zonal reserves.
source code
Variables [hide private]
  __package__ = 'pypower'
Function Details [hide private]

runopf_w_res(*args)

source code 

Runs an optimal power flow with fixed zonal reserves.

Runs an optimal power flow with the addition of reserve requirements specified as a set of fixed zonal reserves. See runopf for a description of the input and output arguments, which are the same, with the exception that the case file or dict casedata must define a 'reserves' field, which is a dict 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.

In addition to the normal OPF output, the results dict contains a new 'reserves' field with the following fields, in addition to those provided in the input:

  • 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 t.t_case30_userfcns for an example case file with fixed reserves, and toggle_reserves for the implementation.

Calling syntax options:

   results = runopf_w_res(casedata)
   results = runopf_w_res(casedata, ppopt)
   results = runopf_w_res(casedata, ppopt, fname)
   results = runopf_w_res(casedata, [popt, fname, solvedcase)
   results, success = runopf_w_res(...)

Example:

   results = runopf_w_res('t_case30_userfcns')

See Also: runopf, toggle_reserves, t.t_case30_userfcns

Authors:
Ray Zimmerman (PSERC Cornell), Richard Lincoln