I think you want to define your load profile something like this … profiles = struct( ... 'type', 'mpcData', ... 'table', CT_TAREALOAD, ... 'rows', [1:na], ... 'col', CT_LOAD_ALL_P, ... 'chgtype', CT_REP, ... 'values', [] ); profiles.values(:, 1, :) = area_load;
Hope this helps, Ray On Mar 9, 2020, at 8:00 PM, Steven G <steven.geng.2...@gmail.com<mailto:steven.geng.2...@gmail.com>> wrote: Dear Matpower Users, This post is a follow-up of my previous post: https://www.mail-archive.com/matpower-l@cornell.edu/msg07377.html I'm trying to solve SCUC for the 200-bus system (`case_ACTIVSg200`),and created the following example (code attached as .m file, and also pasted at the end). However, Matlab returns error message "Unrecognized function or variable 'PR_TAREALOAD'.", since the variable `PR_TAREALOAD` is not defined in the function `loadmd.m`. In addition, I'm aware of this way of defining profile.load is a bad idea, but I just haven't not figured out the "right way" of doing it using `apply_changes.m` or `apply_profile.m`. Thanks, Steven clear; clc; define_constants; casename = 'case_ACTIVSg200'; " OutmailID: 124442730, List: 'matpower-l', MemberID: 82861091 SCRIPT: "Raw Settings mpc = loadcase(casename); nb = size(mpc.bus, 1); nl = size(mpc.branch, 1); ng = size(mpc.gen, 1); nt = 24; % 24 hours na = 6; % 6 areas scenarios = scenarios_ACTIVSg200; % get a change table % PROFILES can take the form of % a struct with the following fields: % .wind: 3-dim array (NT x NJ_MAX x num wind sites) % .load: 3-dim array (NT x NJ_MAX x num load zones) load_data = scenarios(1:nt*na, end); % last column: loads of 6 areas area_load = reshape(load_data, na, nt)'; % nt-by-na matrix profiles.load = zeros(nt,1,na); profiles.load(:,1,:) = area_load; profiles.wind = [];" TCL MERGE ERROR ( 03/10/2020 16:13:06 ): "invalid command name "Raw" Construct MOST struct mdi = loadmd(mpc, nt, [], [], [], profiles); " OutmailID: 124442730, List: 'matpower-l', MemberID: 82861091 SCRIPT: "Solve SCUC mpopt = mpoption(mpopt, 'most.dc_model', 0);" TCL MERGE ERROR ( 03/10/2020 16:13:06 ): "invalid command name "Solve" Issues: % 1. Missing xgd data for the 200-bus synthetic system % 2. According to the comments in `loadmd.m`, profiles.load is from an % older version <Undefined_PR_TAREALOAD.m>