opf_vlim_fcn

opf_vlim_fcn(x, mpc, idx, mpopt)

opf_vlim_fcn() - Evaluates voltage magnitudes and their gradients.

[Vlims, dVlims] = OPF_VLIM_FCN(X, MPC, IDX, MPOPT)

Computes the voltage magnitudes using real and imaginary part of complex voltage for
AC optimal power flow. Computes constraint vectors and their gradients.

Inputs:
  X : optimization vector
  MPC : MATPOWER case struct
  IDX : index of buses whose voltage magnitudes should be fixed
  MPOPT : MATPOWER options struct

Outputs:
  VLIMS  : vector of voltage magnitudes
  DVLIMS : (optional) magnitude gradients

Examples:
    Vlims = opf_vlim_fcn(x, mpc, mpopt);
    [Vlims, dVlims] = opf_vlim_fcn(x, mpc, idx, mpopt);

See also opf_vlim_hess().