toggle_iflims

toggle_iflims(mpc, on_off)

toggle_iflims() - Enable, disable or check status of set of interface flow limits.

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

Enables, disables or checks the status of a set of OPF userfcn
callbacks to implement interface flow limits based on a DC flow model.

These callbacks expect to find an 'if' field in the input MPC, where
MPC.if is a struct with the following fields:
    map     n x 2, defines each interface in terms of a set of
            branch indices and directions. Interface I is defined
            by the set of rows whose 1st col is equal to I. The
            2nd column is a branch index multiplied by 1 or -1
            respectively for lines whose orientation is the same
            as or opposite to that of the interface.
    lims    nif x 3, defines the DC model flow limits in MW
            for specified interfaces. The first column is the index
            of the interface, the 2nd and 3rd columns specify
            the lower and upper limits on the (DC model) flow
            across the interface, respectively. Normally, the lower
            limit is negative, indicating a flow in the opposite
            direction.

The 'int2ext' callback also packages up results and stores them in
the following output fields of results.if:
    P       - nif x 1, actual flow across each interface in MW
    mu.l    - nif x 1, shadow price on lower flow limit, ($/MW)
    mu.u    - nif x 1, shadow price on upper flow limit, ($/MW)

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