Optimization: principles and algorithms, by Michel Bierlaire
run1203tcg.m
Go to the documentation of this file.
1 %> \file
2 %> Runs example 12.3 for the truncated conjugate gradients method
3 %>
4 %> @ingroup Running
5 %> @ingroup chap12
6 %> @author Michel Bierlaire
7 %> @date Sat Mar 21 15:50:29 2015
8 
9 %> @note Calls \ref truncatedConjugateGradient
10 
11 xcurrent = [ 9 ; 1] ;
12 [f,g,H] = ex1101(xcurrent) ;
13 
14 delta = 4 ;
15 [dstar,type] = truncatedConjugateGradient(g,H,delta)
16 printf("Norm of dstar: %15.8f\n",norm(dstar)) ;
17 printf("Next iterate: (%15.8f, %15.8f)'\n",xcurrent + dstar) ;
18 
19 
20 
21 delta = 12 ;
22 [dstar,type] = truncatedConjugateGradient(g,H,delta)
23 printf("Norm of dstar: %15.8f\n",norm(dstar)) ;
24 printf("Next iterate: (%15.8f, %15.8f)'\n",xcurrent + dstar) ;
25 
26 
function ex1101(in x)
Example 11.1 in .
function truncatedConjugateGradient(in g, in H, in delta)
Given a current iterate , consider the trust region subproblem subject to Apply the truncated conju...
Copyright 2015-2018 Michel Bierlaire