IDX_PROFILE Defines constants used by Profiles. [PR_REP, PR_REL, PR_ADD, PR_TCONT, PR_TYPES, PR_TMPCD,... PR_TXGD, PR_TCTD, PR_TSTGD, PR_CHGTYPES] = idx_profile; Indicates and defines numeric and string id's for the types of profiles that can be created to modify input data for MOST across time and scenarios. Some types may require that a table is further specified, i.e., a specific table of data whose content is to be modified by the profile. Rows (rows) and columns (col) fields of each profile further specify which entries of the data in question is to be modified by the profile. The change type field (chgtype) indicates how the change is applied, and finally, the values field (values) contains the new values to be used. type: string field of each profile struct where the id of the type of the profile is stored. Possible values are: string 'mpcData' indicates changes on fields of mpc (e.g. bus or gen tables) string 'xGenData' indicates changes on xgd fields (e.g. offers or commitment vars) string 'ContingencyData' indicates changes on the set of contingencies to be applied string 'StorageData' indicates changes on the storage struct table: scalar or string field of each profile struct where the id/name of the table/field that needs to be modified is stored. Possible values are: - if type is 'mpcData' you may modify the following tables (specified with a scalar): scalar CT_TBUS change in bus table scalar CT_TGEN change in gen table scalar CT_TBRCH change in branch table scalar CT_TAREABUS area-wide change in bus table scalar CT_TAREAGEN area-wide change in gen table scalar CT_TAREABRCH area-wide change in branch table scalar CT_TLOAD load modification (bus and/or gen tables) scalar CT_TAREALOAD area-wide change in load (bus/gen tables) scalar CT_TGENCOST change in gencost table scalar CT_TAREAGENCOST area-wide change in gencost table - if type is 'xGenData' you may modify the following fields: string 'CommitSched' string 'InitialPg' string 'RampWearCostCoeff' string 'PositiveActiveReservePrice' string 'PositiveActiveReserveQuantity' string 'NegativeActiveReservePrice' string 'NegativeActiveReserveQuantity' string 'PositiveActiveDeltaPrice' string 'NegativeActiveDeltaPrice' string 'PositiveLoadFollowReservePrice' string 'PositiveLoadFollowReserveQuantity' string 'NegativeLoadFollowReservePrice' string 'NegativeLoadFollowReserveQuantity' - if type is 'ContingencyData' you may modify the following tables: scalar PR_TCONT indicates a modification of the subset of contingencies (of the master table of contingencies) to be applied at each time period and/or scenario. - if type is 'StorageData' you may modify the following fields: string 'MinStorageLevel' string 'MaxStorageLevel' string 'OutEff' string 'InEff' string 'LossFactor' string 'rho' rows: numeric vector field of each profile struct where the row numbers (1st-dim) of the array to be modified are stored. Row numbers usually represent specifically which gens, branches, buses, contingencies (by the labels), or area will be affected by the modification across time or across scenarios. A value of "0" in this field has the special meaning of "apply to all rows". For an area-wide type of change, the area number is stored here instead. col: scalar field of each profile struct where the id of the parameter to be modified is stored. This id may indicate a column number or some other parameter depending on the type and the table/field. Possible values are: - if type is 'mpcData' the parameters you may modify depend on the table chosen, see IDX_CT on CT_COL for details. - if type is 'xGenData', 'ContingencyData', or 'StorageData', then col is completely ignored. chgtype: scalar field of each profile struct where the id of the type of change to be made is stored. Possible values are: scalar PR_REP replaces old values by new 'values' scalar PR_REL multiplies old value by factors in 'vales' scalar PR_ADD adds entries in 'values' field to old value values: numeric array field of each profile struct where the new values/factors, i.e., the profile itself, is stored. This array must have 3 dimensions in a pre-defined order: [nt nj_max n] (i) dimension corresponding to time periods (ii) dimension corresponding to scenarios (iii) dimension corresponding to elements indicated by 'rows' A singleton dimension in 'values' not matching with nt==1, nj_max==1 or length(profile.rows)==1 is interpreted as "apply to all" whenever the parameter being modified allows such an expansion. These "expansions" occur within loadmd().
0001 function [PR_REP, PR_REL, PR_ADD, PR_TCONT, PR_TYPES, PR_TMPCD,... 0002 PR_TXGD, PR_TCTD, PR_TSTGD, PR_CHGTYPES] = idx_profile 0003 %IDX_PROFILE Defines constants used by Profiles. 0004 % 0005 % [PR_REP, PR_REL, PR_ADD, PR_TCONT, PR_TYPES, PR_TMPCD,... 0006 % PR_TXGD, PR_TCTD, PR_TSTGD, PR_CHGTYPES] = idx_profile; 0007 % 0008 % Indicates and defines numeric and string id's for the types of profiles 0009 % that can be created to modify input data for MOST across time and 0010 % scenarios. Some types may require that a table is further specified, 0011 % i.e., a specific table of data whose content is to be modified by the 0012 % profile. Rows (rows) and columns (col) fields of each profile further 0013 % specify which entries of the data in question is to be modified by the 0014 % profile. The change type field (chgtype) indicates how the change is 0015 % applied, and finally, the values field (values) contains the new values 0016 % to be used. 0017 % 0018 % type: string field of each profile struct where the id of the type of 0019 % the profile is stored. Possible values are: 0020 % string 'mpcData' indicates changes on fields of mpc 0021 % (e.g. bus or gen tables) 0022 % string 'xGenData' indicates changes on xgd fields 0023 % (e.g. offers or commitment vars) 0024 % string 'ContingencyData' indicates changes on the set of 0025 % contingencies to be applied 0026 % string 'StorageData' indicates changes on the storage struct 0027 % 0028 % table: scalar or string field of each profile struct where the id/name 0029 % of the table/field that needs to be modified is stored. 0030 % Possible values are: 0031 % - if type is 'mpcData' you may modify the following tables 0032 % (specified with a scalar): 0033 % scalar CT_TBUS change in bus table 0034 % scalar CT_TGEN change in gen table 0035 % scalar CT_TBRCH change in branch table 0036 % scalar CT_TAREABUS area-wide change in bus table 0037 % scalar CT_TAREAGEN area-wide change in gen table 0038 % scalar CT_TAREABRCH area-wide change in branch table 0039 % scalar CT_TLOAD load modification (bus and/or gen tables) 0040 % scalar CT_TAREALOAD area-wide change in load (bus/gen tables) 0041 % scalar CT_TGENCOST change in gencost table 0042 % scalar CT_TAREAGENCOST area-wide change in gencost table 0043 % - if type is 'xGenData' you may modify the following fields: 0044 % string 'CommitSched' 0045 % string 'InitialPg' 0046 % string 'RampWearCostCoeff' 0047 % string 'PositiveActiveReservePrice' 0048 % string 'PositiveActiveReserveQuantity' 0049 % string 'NegativeActiveReservePrice' 0050 % string 'NegativeActiveReserveQuantity' 0051 % string 'PositiveActiveDeltaPrice' 0052 % string 'NegativeActiveDeltaPrice' 0053 % string 'PositiveLoadFollowReservePrice' 0054 % string 'PositiveLoadFollowReserveQuantity' 0055 % string 'NegativeLoadFollowReservePrice' 0056 % string 'NegativeLoadFollowReserveQuantity' 0057 % - if type is 'ContingencyData' you may modify the following 0058 % tables: 0059 % scalar PR_TCONT indicates a modification of the subset of 0060 % contingencies (of the master table of contingencies) to be 0061 % applied at each time period and/or scenario. 0062 % - if type is 'StorageData' you may modify the following fields: 0063 % string 'MinStorageLevel' 0064 % string 'MaxStorageLevel' 0065 % string 'OutEff' 0066 % string 'InEff' 0067 % string 'LossFactor' 0068 % string 'rho' 0069 % 0070 % rows: numeric vector field of each profile struct where the row 0071 % numbers (1st-dim) of the array to be modified are stored. Row 0072 % numbers usually represent specifically which gens, branches, 0073 % buses, contingencies (by the labels), or area will be affected 0074 % by the modification across time or across scenarios. A value of 0075 % "0" in this field has the special meaning of "apply to all 0076 % rows". For an area-wide type of change, the area number is 0077 % stored here instead. 0078 % 0079 % col: scalar field of each profile struct where the id of the 0080 % parameter to be modified is stored. This id may indicate a 0081 % column number or some other parameter depending 0082 % on the type and the table/field. Possible values are: 0083 % - if type is 'mpcData' the parameters you may modify depend on 0084 % the table chosen, see IDX_CT on CT_COL for details. 0085 % - if type is 'xGenData', 'ContingencyData', or 'StorageData', 0086 % then col is completely ignored. 0087 % 0088 % chgtype: scalar field of each profile struct where the id of the type of 0089 % change to be made is stored. Possible values are: 0090 % scalar PR_REP replaces old values by new 'values' 0091 % scalar PR_REL multiplies old value by factors in 'vales' 0092 % scalar PR_ADD adds entries in 'values' field to old value 0093 % 0094 % values: numeric array field of each profile struct where the new 0095 % values/factors, i.e., the profile itself, is stored. This array 0096 % must have 3 dimensions in a pre-defined order: [nt nj_max n] 0097 % (i) dimension corresponding to time periods 0098 % (ii) dimension corresponding to scenarios 0099 % (iii) dimension corresponding to elements indicated by 'rows' 0100 % A singleton dimension in 'values' not matching with nt==1, 0101 % nj_max==1 or length(profile.rows)==1 is interpreted as "apply 0102 % to all" whenever the parameter being modified allows such an 0103 % expansion. These "expansions" occur within loadmd(). 0104 0105 % MOST 0106 % Copyright (c) 2013-2016, Power Systems Engineering Research Center (PSERC) 0107 % by Daniel Munoz-Alvarez and Ray Zimmerman, PSERC Cornell 0108 % 0109 % This file is part of MOST. 0110 % Covered by the 3-clause BSD License (see LICENSE file for details). 0111 % See https://github.com/MATPOWER/most for more info. 0112 0113 %% 0114 [CT_LABEL, CT_PROB, CT_TABLE, CT_TBUS, CT_TGEN, CT_TBRCH, ... 0115 CT_TAREABUS, CT_TAREAGEN, CT_TAREABRCH, CT_ROW, CT_COL, CT_CHGTYPE, ... 0116 CT_REP, CT_REL, CT_ADD, CT_NEWVAL, CT_TLOAD, CT_TAREALOAD, ... 0117 CT_LOAD_ALL_PQ, CT_LOAD_FIX_PQ, CT_LOAD_DIS_PQ, CT_LOAD_ALL_P, ... 0118 CT_LOAD_FIX_P, CT_LOAD_DIS_P, CT_TGENCOST, CT_TAREAGENCOST, ... 0119 CT_MODCOST_F, CT_MODCOST_X] = idx_ct; 0120 0121 %% types of profiles 0122 0123 PR_TYPES = {... %% cell array of types 0124 'mpcData',... %% changes to mpc 0125 'xGenData',... %% changes to xgd 0126 'ContingencyData',... %% changes to ct_subset 0127 'StorageData',... %% changes to Storage 0128 }; 0129 0130 %% labels for modifiable tables 0131 % - tables for type 'mpcData' 0132 PR_TMPCD = [ ... %% vector of tables for 'mpcData' 0133 CT_TBUS, ... 0134 CT_TGEN, ... 0135 CT_TBRCH, ... 0136 CT_TAREABUS, ... 0137 CT_TAREAGEN, ... 0138 CT_TAREABRCH, ... 0139 CT_TLOAD, ... 0140 CT_TAREALOAD, ... 0141 CT_TGENCOST, ... 0142 CT_TAREAGENCOST ... 0143 ]; 0144 0145 % - tables for type xGenData 0146 PR_TXGD = { ... %% cell array of fields for xGenData 0147 'CommitSched',... 0148 'InitialPg',... 0149 'RampWearCostCoeff',... 0150 'PositiveActiveReservePrice',... 0151 'PositiveActiveReserveQuantity',... 0152 'NegativeActiveReservePrice',... 0153 'NegativeActiveReserveQuantity',... 0154 'PositiveActiveDeltaPrice',... 0155 'NegativeActiveDeltaPrice',... 0156 'PositiveLoadFollowReservePrice',... 0157 'PositiveLoadFollowReserveQuantity',... 0158 'NegativeLoadFollowReservePrice',... 0159 'NegativeLoadFollowReserveQuantity',... 0160 'CommitKey',... 0161 'InitialState',... 0162 'MinUp',... 0163 'MinDown',... 0164 }; 0165 0166 % - tables for type 'ContingencyData' 0167 PR_TCONT = 1; %% ct_subset of contingencies 0168 PR_TCTD = [ ... %% vector of tables for 'ContingencyData' 0169 PR_TCONT 0170 ]; 0171 0172 % - tables for type storage 0173 PR_TSTGD = { ... %% cell array of fields for 'StorageData' 0174 'MinStorageLevel',... 0175 'MaxStorageLevel',... 0176 'OutEff',... 0177 'InEff',... 0178 'LossFactor',... 0179 'rho',... 0180 }; 0181 0182 %% named values for chgtype entry 0183 PR_REP = 1; %% replace old values with new ones in field 'values' 0184 PR_REL = 2; %% multiply old values by factors in field 'values' 0185 PR_ADD = 3; %% add value in field 'values' to old values 0186 PR_CHGTYPES = [ ... %% vector of chgtypes 0187 PR_REP,... 0188 PR_REL,... 0189 PR_ADD,... 0190 ];