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

Module ipoptopf_solver

source code

Solves AC optimal power flow using IPOPT.

Functions [hide private]
 
ipoptopf_solver(om, ppopt)
Solves AC optimal power flow using IPOPT.
source code
 
eval_f(x, user_data=None)
Calculates the objective value.
source code
 
eval_grad_f(x, user_data=None)
Calculates gradient for objective function.
source code
 
eval_g(x, user_data=None)
Calculates the constraint values and returns an array.
source code
 
eval_jac_g(x, flag, user_data=None)
Calculates the Jacobi matrix.
source code
 
eval_h(x, lagrange, obj_factor, flag, user_data=None)
Calculates the Hessian matrix (optional).
source code
Variables [hide private]
  __package__ = 'pypower'
Function Details [hide private]

ipoptopf_solver(om, ppopt)

source code 

Solves AC optimal power flow using IPOPT.

Inputs are an OPF model object and a PYPOWER options vector.

Outputs are a results dict, success flag and raw output dict.

results is a PYPOWER case dict (ppc) with the usual baseMVA, bus branch, gen, gencost fields, along with the following additional fields:

  • order see 'help ext2int' for details of this field
  • x final value of optimization variables (internal order)
  • f final objective function value
  • mu shadow prices on ...
    • var
      • l lower bounds on variables
      • u upper bounds on variables
    • nln
      • l lower bounds on nonlinear constraints
      • u upper bounds on nonlinear constraints
    • lin
      • l lower bounds on linear constraints
      • u upper bounds on linear constraints

success is True if solver converged successfully, False otherwise

raw is a raw output dict in form returned by MINOS

  • xr final value of optimization variables
  • pimul constraint multipliers
  • info solver specific termination code
  • output solver specific output information

See Also: opf, pips

Authors:
Ray Zimmerman (PSERC Cornell), Carlos E. Murillo-Sanchez (PSERC Cornell & Universidad Autonoma de Manizales), Richard Lincoln

eval_f(x, user_data=None)

source code 

Calculates the objective value.

Parameters:
  • x - input vector

eval_jac_g(x, flag, user_data=None)

source code 

Calculates the Jacobi matrix.

If the flag is true, returns a tuple (row, col) to indicate the sparse Jacobi matrix's structure. If the flag is false, returns the values of the Jacobi matrix with length nnzj.

eval_h(x, lagrange, obj_factor, flag, user_data=None)

source code 

Calculates the Hessian matrix (optional).

If omitted, set nnzh to 0 and Ipopt will use approximated Hessian which will make the convergence slower.