MATLAB Answers

fmincon converges to solution using interior-point but not using sqp

1 view (last 30 days)
Deepa Maheshvare
Deepa Maheshvare on 31 Mar 2020
Hi All,
I am solving an optimization problem using fmincon. The solver converges to a solution using interior-point algorithm but fails when I use sqp.
line 9 in the file attached:
opts_fmin = optimoptions('fmincon','Display','iter', 'Algorithm', 'sqp-legacy'); %interior-point
Could someone help me in understanding why this happens?
The error that I get is in the computation of objective function after 70 iterations
Matrix dimensions must agree.
Error in cse_03_19_20/objfun (line 39)
f = sum((phi(:) - phi_tilde(:)).^2);
Error in evalObjAndConstr
Error in sqpLineSearch
MATLAB version used: 2020a

  5 Comments

Show 2 older comments
Deepa Maheshvare
Deepa Maheshvare on 1 Apr 2020
Hi Matt,
Thanks for your response.
These are the values at the iteration where it fails
Dhat (control variables) =
1.0e+03 *
5.6138
4.5535
4.3230
5.7495
5.3165
0.8918
-2.8790
-7.3537
-4.5619
size(phi) =
51 10
phi_tilde =
1.0e+265 *
0.0000 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 0.0000 -0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 0.0000 -0.0000
0.0000 0.0000 0.0001 0.0003 0.0018 0.0106 0.3104 -2.0263 2.7934 -2.1806
size(phi_tilde) =
4 10
Deepa Maheshvare
Deepa Maheshvare on 1 Apr 2020
Would it help if I specify bounds on the control variables ? I want these values to be >0 , but I don't reaaly have upper bounds.

Sign in to comment.

Answers (0)

Sign in to answer this question.


Translated by