how do i increase the maximum number of iterations for linprog?
1 回表示 (過去 30 日間)
古いコメントを表示
Since it says to increase options.MaxIter. I did:
OPTIONS=optimset('MaxIter',10000);
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA]=linprog(c,A,b,Aeq,beq,LB,UB,OPTIONS)
Then i get erros message as:
Error using linprog (line 144)
LINPROG requires the following inputs to be of data type double: 'X0'.
Error in main_compositeSystem (line 134)
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA]=linprog(c,A,b,Aeq,beq,LB,UB,OPTIONS);%,OPTIONS.MaxIter);
Turns out, linprog doesnot allow to set options??
0 件のコメント
回答 (1 件)
John D'Errico
2017 年 6 月 25 日
編集済み: John D'Errico
2017 年 6 月 25 日
Linprog DOES allow you to set options if you pass them in properly.
READ THE ERROR MESSAGE.
linprog has a problem with the variable X0, or what you passed in as X0.
The argument list for linprog expects X0 as the next argument after UB to be X0.
You passed in a structure in that argument.
If you don't intend to pass in a variable, such as X0, then pass in an empty array [] as a placeholder.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!