ae 5301 hw 3 solution

Upload: umangdighe

Post on 22-Feb-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/24/2019 AE 5301 HW 3 Solution

    1/13

    Prob 1

    1a) Himmelblau function: Himmelblau function is a mathematical

    function with multiple minima and is used to check the performance of

    optimization schemes. It is named after David Himmelblau and it is

    referenced in a 1972 book named pplied !onlinear "ro#rammin#.

    $athematicall%& the function is de'ned as

    f(x , y)=(x2+ y11)2+(x+y27 )2

    (he function is usuall% evaluated in ran#e

    x , y(6,6)

    1b) Plot Contours

    )or all the contour plots& the *(+,ontour"lot function was used within the

    mentioned ran#es

    Code for contours :

    Function

  • 7/24/2019 AE 5301 HW 3 Solution

    2/13

    Plot :

    Fig 1 Contour plot for HimmelBlau function

    1c) -olve usin# fminunc times :

    "/0,D*/:

    (he function is sou#ht to be minimized usin# the fminunc built in

    matlab function. (he minimum function value and correspondin# variable values will

    depend on the initial #uess provided since fminunc 'nds the closest

    local minima. (he second step is repeated usin# points 3&34 & 53&34 & 3&534 and 5

    3&534 (he values of minimum 6 & % and fmin are presented in a table below

  • 7/24/2019 AE 5301 HW 3 Solution

    3/13

    (he same procedure is followed for 2c and c for solvin# the respective

    functions with the fminunc matlab function.

    Contour

    -6 -4 -2 0 2 4 6

    -6

    -4

    -2

    0

    2

    4

    6

    x

    y

    Fig. Contour plot with (66) as initial point and (!") as local minima

  • 7/24/2019 AE 5301 HW 3 Solution

    4/13

    -6 -4 -2 0 2 4 6

    -6

    -4

    -2

    0

    2

    4

    6

    x

    y

    Fig. Contour plot with (#66) as starting point and (#".$%&1!.1!1!)as local minima

  • 7/24/2019 AE 5301 HW 3 Solution

    5/13

    -6 -4 -2 0 2 4 6

    -6

    -4

    -2

    0

    2

    4

    6

    x

    y

    Fig. Contour plot with ( 6#6) as starting point and ( !.&$'' #1.$'$1)

    as local minima

    -6 -4 -2 0 2 4 6

    -6

    -4

    -2

    0

    2

    4

    6

    x

    y

  • 7/24/2019 AE 5301 HW 3 Solution

    6/13

    Fig. Plot with (#6#) as starting point and (#!.!#!."$!") as local

    minima

    Code

    1d) *+,+-C /0*-2H3

    #enetic al#orithm 84 is a method for solvin# both constrained and

    unconstrained optimization problems based on a natural selection process

    that mimics biolo#ical evolution1. t each step& the #enetic al#orithm

    randoml% selects individuals from the current population and uses them as

    parents to produce the children for the ne6t #eneration with which the

    population evolves toward an optimal solution1.

    (he matlab #a optimation toolbo6 was used to perform the #a optimization

    process for the d subsections of this homework

    "/0,D*/

    (he obective function is created in a separate matlab 'le and is savedin the workin# director%

    (he #eneric al#orithm optimization method was chosen durin#

    initialization of the toolbo6 (he function was included throu#h the 'le created earlier and the

    number of variables was #iven to be 2 (he upper and lower bound ran#es were provided and the al#orithm

    was e6ecuted (he #lobal minimum of the function alon# with the respective value of

    6 and % were #iven as output.

    (00;

  • 7/24/2019 AE 5301 HW 3 Solution

    7/13

  • 7/24/2019 AE 5301 HW 3 Solution

    8/13

    )i#. 8 toolbo6 output for "rob. 1

    /-*;(-

    6 > ? % > ? fmin >

    1.1@137@97ABA757

  • 7/24/2019 AE 5301 HW 3 Solution

    9/13

    Prob "

    "a) 4i5 Hump Camel Bac Function : (he si#ni'cance of new

    optimization al#orithms depends on the eCectiveness of solvin# practical

    problems. -i6 Hump camel back function is used to test the performance and

    reliabilit% of optimization al#orithms. -i6 Hump

  • 7/24/2019 AE 5301 HW 3 Solution

    10/13

    Plot

    Fig." Contour Plots for 4i5 Hump Camel Bac Function

    "c) -olve usin# fminunc:

    "d) *+,+-C /0*-2H3

    6> A.A9 %> 5A.71 fmin> 51.A132@91BAAB

  • 7/24/2019 AE 5301 HW 3 Solution

    11/13

    )i# : 0utput from $atlab 8 for "rob. 2

    Prob. !

    !a) Branin rcos function : It is a #lobal optimization test function. (he

    function has three #lobal optima.

    )unction de'nition :

    f(x , y )=1(y 5.14 2x2+

    5

    x6)

    2

    +10(1 18 )cosx+10

    /an#e for the function is

    5 x 10,0 y 15

  • 7/24/2019 AE 5301 HW 3 Solution

    12/13

    !b) Contour plot

    Code

    Plot

    Fig !. Contour plot of Branin rcos function

  • 7/24/2019 AE 5301 HW 3 Solution

    13/13

    !c) -olve usin# fminunc:

    !d) *+,+-C /0*-2H3

    Fig: $atlab 8 output for "rob.

    = > .1 %> 2.27B )min>A.97@@32@37133

    -eference

    718Ehttp:FFwww.mathworks.comFdiscover%F#enetic5al#orithm.htmlE