Many many thanks sir.
Seems to be working now.
Thank you very very much!

:)
Best regards,
M.S.
On Apr 27, 2014, at 03:11 AM, "tao.huang" <[email protected]> wrote:

Sorry, I didn't check the manuel and think carefully, it should be BR_STATUS.
There is still a mistake in the line, pls try this:
mpc.branch(nb , [F_BUS:RATE_A, STATUS])=[13 8 0.06 0.18 0.02 65 1];
 
 
From: [email protected] 
[mailto:[email protected]] On Behalf Of Michael 
Stergides
Sent: Sunday, April 27, 2014 12:00 PM
To: MATPOWER discussion forum
Subject: Re: Branch Addition
 
Greetings.
It shows a dimension mismatch again.
It also shows an error on this line:
mpc.branch(nb , F_BUS:RATE_A, STATUS)=[13 8 0.06 0.18 0.02 65 1];
I changed the STATUS bit to BR_STATUS because this is how it's shown in the 
manual, but it still gives me an error.
Not really sure what to do now...
 
I cannot understand how to manipulate how many columns my new row (i.e. new 
branch) is going to have. 
Thank you very much for the quick response.
Hope for some more elaboration.
 

On Apr 26, 2014, at 08:07 AM, "tao.huang" <[email protected]> wrote:

 
The safest way to avoid dimension mismatch is to initialize the newly added 
row. For example:
 
define_constants;
mpc = loadcase('case30');
size(mpc.branch,1);
nb = size(mpc.branch,1) + 1;
mpc.branch(nb, size(mpc.branch,2)) =0; %% in this way even you extended the 
columns of the matrix somewhere, it will guarantee the same dimentison.
mpc.branch(nb , F_BUS:RATE_A, STATUS)=[13 8 0.06 0.18 0.02 65 1];
mpc.branchcost(42, MODEL)=2;
runopf(mpc);

 
From: [email protected] 
[mailto:[email protected]] On Behalf Of MICHAIL 
STERGIDIS
Sent: Saturday, April 26, 2014 4:38 PM
To: MATPOWER discussion forum
Subject: Re: Branch Addition
 
Thanks for the response.
I tried to change that but it shows an error of dimension mismatch.
I find that peculiar since all the other lines on the branch matrix have these 
dimensions.
Any clues as to how I change that?
 
 
On Apr 26, 2014, at 4:44 PM, Huang Tao <[email protected]> wrote:
 

status of the branch is still 0.
在 2014-4-26 下午3:25,"MICHAIL STERGIDIS" <[email protected]>写道:
Dear all,
in order to reduce congestion on a line, my project demands an additional line 
with another bus.
Specifically, I want to add a line between busses 13 and 8 on the case 30 file.
In doing so, I should be able to reduce the amount of load the line has which 
is related to the rateA figure.
I have managed to make a bug-free bit of code so the opf runs and shows the 
matrix with the particular data, however when I run it the line I have added 
shows no power flow.
My code is the following:

define_constants;
mpc = loadcase('case30');
size(mpc.branch,1);
nb = size(mpc.branch,1) + 1;
mpc.branch(nb , F_BUS:RATE_A)=[13 8 0.06 0.18 0.02 65];
mpc.branchcost(42, MODEL)=2;
runopf(mpc);

I would really appreciate a helping hand as I am quite stuck,
thank you all very much in advance.

Best regards,
Michael Stergides

 

Reply via email to