Info

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

I need help in these errors

1 回表示 (過去 30 日間)
loukmane el khaldi
loukmane el khaldi 2020 年 7 月 17 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
these errors were displayed while running this program
for n = 1:size(pos,1)
if isempty(nonlcon)
[pos(n,:), foo, exitflag(n)] =...
linprog([],Aineq,bineq,Aeq,beq,lb,ub,pos(n,:),LocalOptions); %#ok<*ASGLU>
else
[pos(n,:), foo, exitflag(n)] =...
fmincon(@void,pos(n,:),Aineq,bineq,Aeq,beq,lb,ub,nonlcon,LocalOptions);
end
ERROR
Error using linprog (line 181)
Invalid choice of Algorithm for LINPROG. Choose 'interior-point', 'dual-simplex' or 'interior-point-legacy'.
Error in pso>psogenseed (line 649)
linprog([],Aineq,bineq,Aeq,beq,lb,ub,pos(n,:),LocalOptions); %#ok<*ASGLU>
THANK YOU
  2 件のコメント
Walter Roberson
Walter Roberson 2020 年 7 月 17 日
What is in LocalOptions ?
I would note that the Algorithms available or linprog are not the same as the algorithms available for fmincon, so you cannot just use the same options structure for both.
I would also note that whether nonlcon is empty or not does not depend upon the outputs of the loop, so it is more efficient to make the test outside the for loop.
loukmane el khaldi
loukmane el khaldi 2020 年 7 月 17 日
What is in LocalOptions ?
LocalOptions = optimset('LargeScale','off',...
'Algorithm','active-set',...
'Display','off') ;
I will try to do the test outside the for loop.
Thank you Sir

回答 (0 件)

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by