Setting αk,1, αmax, c1, c2 and lmax; |
Initializing αk,0 = 0, l = 1; |
repeat |
if ϕ (αk,l) > ϕ 0 + c1αk,lϕ′ (0) or [ϕ(αk,l) ≥ ϕ(αk,l−1) and l > 1] |
Choose the αk,* with dichotomy within (αk,l−1, αk,l) to fulfil the conditions (13) and (15), then break; |
elseif |ϕ′(αk,l)| ≤ −c2ϕ′(0) |
αk,* = αk,l, then break; |
elseif ϕ′(αk,l) ≥ 0 |
Choose the αk,* with dichotomy within (αk,l−1, αk,l) to fulfil the conditions (13) and (15), then break; |
else |
αk,l+1 = αk,l * 1.1; |
l + +; |
If l > lmax or αk,l > αmax
|
error(‘Initial step length is not suitable!’) |
end |
end |
end(repeat) |