addwind

addwind(wind, mpc, xgd)

addwind() - Adds wind generators and corresponding xGenData to existing data.

[IDX, NEW_MPC] = ADDWIND(WIND, MPC)
[IDX, NEW_MPC, NEW_XGD] = ADDWIND(WIND, MPC)
[IDX, NEW_MPC, NEW_XGD] = ADDWIND(WIND, MPC, XGD)

Given a WindUnitData structure, or the name of a file containing such
a structure, this function adds the specified wind generators to an
existing MATPOWER case and xGenData struct.

Inputs:
    WIND : a WindUnitData struct or the name of an M-file
                or MAT-file that returns one, with the following fields
        .gen     : rows to be appended to the GEN matrix from MPC
        .gencost : (optional) rows to be added to the GENCOST matrix
                   from MPC, default is zero cost
        .xgd_table : xGenData table struct or filename providing data for
                     the wind units being added. See LOADXGENDATA for
                     more information on the xGenData table format.
    MPC : MATPOWER case struct to which wind generators will be added
    XGD : (optional) xGenData struct corresponding to the generators
          already in MPC, to which the new xGenData for the wind units
          will be added.

Output:
    IDX : Generator indices of newly added wind units.
    NEW_MPC : MPC with wind units appended to MPC.GEN and MPC.GENCOST
              MPC.GENFUEL (= 'wind').
    NEW_XGD : XGD with xGenData for new wind units appended.

See also loadxgendata().