Hi,Can anyone help me with the error message described below? Thanks!
I want to use Matpower to simulate a small market (using the 6 bus system, 
case6ww.m). The key features of the system are: the generators are at bus 
#1,#2,#3,all the load are at bus #4,#5,#6.
I'm using the ./extras/smartmarket/ code. Some details:1. DC Power Flow2. 
auction type = 0: discriminativeIf I set the loads at bus #4,#5,#6 as 1MW. 
There will be some error messages:
Index exceeds matrix dimensions.
Error in opf_setup (line 133)Pg   = gen(:, PG) / baseMVA;
Error in opf (line 219)om = opf_setup(mpc, mpopt);
Error in uopf (line 127)[results, success] = opf(mpc, mpopt);
Error in smartmkt (line 87)[r, success] = uopf(mpc2, mpopt);
Error in runmarket (line 141)[co, cb, r, dispatch, success] = smartmkt(mpc, 
offers,bids, mkt, mpopt);
Error in testMain (line 28)[mpc_out, co, cb, f, dispatch, success, et] 
=runmarket(mpc, offers, bids, mkt, mpoption);
My code is attached. You can put it into the folder ./extras/smartmarket/ and 
run it to test.
Thanks!
Best,Xinbo Geng


                                          
clear all;close all;
clc;
n_bus = 6;
[PQ, PV, REF, NONE, BUS_I, BUS_TYPE, PD, QD, GS, BS, BUS_AREA, VM, ...
    VA, BASE_KV, ZONE, VMAX, VMIN, LAM_P, LAM_Q, MU_VMAX, MU_VMIN] = idx_bus;

mkt.OPF = 'DC';
mkt.auction_type = 0;

% mpc = loadcase('t_auction_case');

mpc = loadcase('case6ww');

offers.P.qty = [ ...
200;
150;
180];
offers.P.prc = [ ...
213;
200;
240];


bids = [];
format shortg;
mpc.bus(:,PD) = [0;0;0;1;1;1];
% mpc.bus(:,QD) = [0;0;0;0;0;0];
[mpc_out, co, cb, f, dispatch, success, et] = runmarket(mpc, offers, bids, mkt, 
mpoption);
%     [mpc_out, co, cb, f, dispatch, success, et] = runmarket(mpc, offers, 
bids, mkt, 
mpoption,['C:\Users\ECEN\Documents\Bitbucket\PCAonLMP\Results\OPF_Output\AllLMP\case_6_',num2str(i),'_interval_',num2str(c),'.txt']);

Reply via email to