Optimization: principles and algorithms, by Michel Bierlaire
run2002.m
Go to the documentation of this file.
1 %> \file
2 %> Runs example 20.2 with the local SQP algorithm of \cite Bier15-book (Tables 20.1, 20.2, 20.3, 20.4)
3 %>
4 %> @note Calls \ref localSqp
5 %>
6 %> @remark The solver of the quadratic problem used in this code is not the same as the one used to generate the results of the book. Therefore, the results of Tables 20.3 and 20.4 are not exactly the same.
7 %>
8 %> @ingroup Running
9 %> @ingroup chap20
10 %> @author Michel Bierlaire
11 %> @date Thu Mar 26 13:46:47 2015
12 
13 x0 = [1 ; -1] ;
14 lambda0 = 1 ;
15 eps = 1.0e-8 ;
16 [solution,lambda] = localSqp('ex2002',x0,lambda0,eps,1000)
17 
18 x0 = [-1.5 ; 2] ;
19 lambda0 = 1 ;
20 eps = 1.0e-7 ;
21 [solution,lambda] = localSqp('ex2002',x0,lambda0,eps,1000)
22 
23 x0 = [-0.1 ; 1] ;
24 lambda0 = 1 ;
25 eps = 1.0e-8 ;
26 [solution,lambda] = localSqp('ex2002',x0,lambda0,eps,1000)
27 
28 x0 = [0.1 ; 1] ;
29 lambda0 = 1 ;
30 eps = 1.0e-8 ;
31 [solution,lambda] = localSqp('ex2002',x0,lambda0,eps,1000)
32 
33 
34 
35 
function localSqp(in problem, in x0, in lambda0, in eps, in maxiter)
Applies the local SQP method to solve subject to where and .
function ex2002(in x, in index)
Copyright 2015-2016 Michel Bierlaire