MATLAB Examples

runSvanbergSQP.m script to run SQP for Svanberg's 5-segment beam.

AOE 5064 Homework #3, Problem 5a: SQP for Svanberg beam

Nsegments=5;
Xinitial=5;
X0=repmat(Xinitial,Nsegments,1); vlb=zeros(Nsegments,1);
options=optimset('fmincon');
options.Display='iter';
options.MaxIter=30;
options.TolX=.1;
options.TolFun=.001;
options.TolCon=.001;
[x,output]=sqp(@fSvanbergBeam,X0,options,vlb,[],@gSvanbergBeam);
disp('Final Design Variables, X')
disp(x)
 
                                       Termination Criteria
                                      0.001         0.001       0.1
                                -----------------------------------
f-CNT         FUNC      STEP NAC     max{g}  j        KTO    max(S)
    1         1.56         0   6          0  1    0.00841     0.061
    2       1.5516         1   6   0.000166  1      0.041     0.304
    3       1.5106         1   6    0.00414  1      0.165      1.31
    4       1.3483         1   6        0.1  1       0.13     0.207
    5       1.3934         1   6    0.00827  1     0.0331     0.457
    6        1.364         1   6     0.0116  1     0.0507      0.99
    7       1.3186         1   6     0.0873  1     0.0538     0.355
    8       1.3377         1   6      0.025  1     0.0194    0.0605
    9       1.3463         1   6   0.000845  1    0.00222     0.096
   10       1.3444         1   6   0.000941  1    0.00496     0.169
   11       1.3398         1   6    0.00507  1     0.0024    0.0999
   12       1.3401         1   6    0.00126  1   0.000801    0.0874
   13       1.3398         1   6   0.000882  1   0.000753   0.00428
Optimization Terminated Successfully from sqp
 
Final Design Variables, X
    6.0756
    5.2553
    4.4505
    3.5446
    2.1457