フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

GA does not solve problems with integer and equality constraints.

1 回表示 (過去 30 日間)
Khlifi Wahid
Khlifi Wahid 2024 年 3 月 3 日
閉鎖済み: Walter Roberson 2024 年 3 月 3 日
[ploss,v]=power_flow1()
ncap=4;
min=0.1;
max=1;
for i=1:2*ncap
k=mod(i,2);
if k==0
lb(i,1)=min;
ub(i,1)=max;
else
lb(i,1)=2;
ub(i,1)=33;
end
end
Vmin=0.95;
Vmax=1.05
options = gaoptimset;
options = gaoptimset('PopulationSize', 50,'Generations', 500,'StallGenLimit',100,'TimeLimit', 500,'StallTimeLimit', 50,'PlotFcn',@gaplotbestf);
constraints = @(capplcsz_opt) constraint_GA(capplcsz_opt, Vmax, Vmin);
[capplcsz_opt,fval,exitflag]=ga(@power_flow_cap,2*ncap,[],[],[],[],lb,ub,constraints,[1 3 5 7],options);
capplcsz_opt([1 3 5 7])
[ Ploss,Busvoltage]=power_flow_cap(capplcsz_opt)
When I test this code which is shown below. I got an error of " GA does not solve problems with integer and equality constraints." what should I change to solve this problem.
  2 件のコメント
Torsten
Torsten 2024 年 3 月 3 日
We can neither run your code nor do we have a mathematical description of your problem. So how should we give advice ?

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by