toggle_dcline

toggle_dcline(mpc, on_off)

toggle_dcline() - Enable, disable or check status of DC line modeling.

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

Enables, disables or checks the status of a set of OPF userfcn
callbacks to implement DC lines as a pair of linked generators.
While it uses the OPF extension mechanism, this implementation
works for simple power flow as well as OPF problems.

These callbacks expect to find a 'dcline' field in the input MPC,
where MPC.dcline is an ndc x 17 matrix with columns as defined
in IDX_DCLINE, where ndc is the number of DC lines.

The 'int2ext' callback also packages up flow results and stores them
in appropriate columns of MPC.dcline.

NOTE: Because of the way this extension modifies the number of
rows in the gen and gencost matrices, caution must be taken
when using it with other extensions that deal with generators.

Examples:
    mpc = loadcase('t_case9_dcline');
    mpc = toggle_dcline(mpc, 'on');
    results1 = runpf(mpc);
    results2 = runopf(mpc);

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