• Keine Ergebnisse gefunden

Optimization Programming 1

N/A
N/A
Protected

Academic year: 2021

Aktie "Optimization Programming 1"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Universität Konstanz

Fachbereich Mathematik und Statistik Prof. Dr. Stefan Volkwein

Martin Gubisch, Roberta Mancini, Stefan Trenz

AAAA

AA QQ

QQ

25th April 2011

Optimization Programming 1

Part 1(Armijo step size algorithm)

Implement the Armijo step size algorithm from the lecture using Matlab. Generate a file armijo.m for the function

function t = armijo(fhandle, x0, d, t0, alpha, beta)

with fhandlethe handle to a function, initial point x0, descent direction d, initial step sizet0 and parameters alphaandbetaas known from the lecture. The program should return a step sizet, that complies with the Armijo condition.

Test your program by using the Rosenbrock function

f(x) = 100(x2−x21)2+ (1−x1)2

with x= (x1, x2)T ∈R2 and the following parameters:

(a) x0=[1.7;1.5],d=[-1;0], t0=4,alpha=0.1 and beta=0.5 (b) x0=[0;0],d=[1;0], t0=1,alpha=0.1 and beta=0.5.

Define them in single function files (e.g. rosenbrock.m) and call them from a short

“main program”.

Tip:Here it is useful to return the value of the derivative in addition to the function value.

Part 2(General descent method)

Implement now the general descent method (Algorithmus 3.4) with direction

dk:=− ∇f(xk) k∇f(xk)k using the Armijo step size strategy.

(2)

Generate a file gradmethod.mfor the function

function X = gradmethod(fhandle, x0, epsilon, t0, alpha, beta).

with initial point x0, parameter epsilon for the termination condition k∇f(xk)k < , and parameters t0, alpha and beta for the Armijo rule.

The program should return a matrix M = [x0; x1; x2; ...] containing the whole iterations.

Test your program by using the following functions:

a) function f(x) = cos(x) with x0 =1.1656, epsilon=1.0e-3, t0=1, alpha=1.0e-2 and beta=0.5

b) the Rosenbrock function withx0 =[1;-0,5],epsilon=1.0e-2,t0=1,alpha=1.0e-2 and beta=0.5

Please note: Don’t forget to comment your code in detail!

• What is this variable for?

• How is the function defined (input arguments and return value)?

• What is the defined function doing?

• What is computed in the loop?

• etc.

Deadline:Tuesday, 3rd May, 10:00 am

Referenzen

ÄHNLICHE DOKUMENTE

This paper describes the role of nondifferentiable optimization from the point of view of systems analysis, briefly describes the state of the art, and gives a

The GPhC is now developing a plan to finalise the revised standards and reform the five years of initial education and training in light of the proposals and broad cross-profession

Subset Combination. For the combination of solutions for each subset we im- plement a path-relinking algorithm. Unlike the classic path-relinking approach we do not perform a

The results presented above are the first estimates of particle number emissions with the GAINS model.. possibilities for further improvements. However, we are confident that

This development super- seded a long-unsuccessful negotiation by Iran and the IAEA of a planned ‘structured approach’ to resolve outstanding issues and, in

We investigate the sensitivity of simulations of the Last Glacial Inception (LGI) with respect to initial (size of the Greenland ice sheet) and surface (state of

We examine initial adoption and subsequent intensification of commercial use of the internet by companies, working in the theoretical framework of Karshenas and Stoneman

To be more precise, if the independent decisions of the first stage, i.e., the supply of the branches with lot-types in a certain multiplicity – in other words: the x b,l,m – are