Unable to perform assignment because the size of the left side is 1-by-2 and the size of the right side is 1-by-3. Error in pso_process_svc (line 31)

I am running a simulation on the location and sizing of svc on ieee 57 using pso algorithm.
It keeps displaying this error'
'Unable to perform assignment because the size of the left side is 1-by-2 and the size of the right side is 1-by-3.
Error in pso_process_svc (line 31)
data_initial_pso_pop(indexloop,:) = DGsize_first_para;
Error in TOP_PSO (line 74)
[finalres,FINAL_SVC_LOCATION_SIZE,prop_best_datapso]=pso_process_svc(nbus,int_pop_size,...
please I need help in debugging this problem

 Accepted Answer

Looks like the function limit_chk_process2 returns a 1x3 vector, but you are expecting it to return a 1x2 vector.

8 Comments

These are both my line, bus and generator data.
How do I go about achieving this. its important to me
On line 9 of limit_chk_process2.m, it looks like
upper_cond=datain>upper_lmt;
should probably be
upper_cond=datain1>upper_lmt;
load_flow_newton_raphson_basecase is missing.
Further please supply reasonable values here:
pop=input('Enter the population value:--');
iter=input('Enter the iteration value:--');
Next time please try to run the code before posting it here to see whether all necessary functions and data are included.
@Ndubuisi: Why did you paste all that code? Just uploading the m-files, like you did before, is sufficient. I've removed the code from your comment because we already have all the same code in the m-files you've uploaded.
If you want someone to be able to run the code, you need to upload the missing m-files including load_flow_newton_raphson_basecase.m and possibly others.
If you hope for someone to be able to reproduce the error you ran into, please specify what values of pop and iter you enter when prompted by the code at the beginning of TOP_PSO.m:
pop=input('Enter the population value:--');
iter=input('Enter the iteration value:--');
Did you try making the edit I suggested on line 9 of limit_chk_process2.m?
Thank you so much sir. it solved the problem. Thank you also for the advice.
The result am getting is not what am expecting though. I used 10 pop and 10 iter
i also need to optimize the ieee 57 bus with GA and ACO but I dont know how to go about it
"Thank you so much sir. it solved the problem."
You're welcome! If that error is fixed, please "Accept" the answer. Thanks!
"i also need to optimize the ieee 57 bus with GA and ACO"
It's probably best to ask a new question about that so more people see it. Try to be as specific as possible in your question.

Sign in to comment.

More Answers (0)

Tags

Asked:

on 30 Apr 2024

Commented:

on 30 Apr 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!