Multi Variable Optimization: Min F (X, X, X, - X)
Multi Variable Optimization: Min F (X, X, X, - X)
r s
r r x( ) = x + s
Min f ( )
- REDUCE TO
- SOLVE AS A SINGLE VARIABLE PROBLEM
EVOLUTIONARY OPTIMIZATION METHOD - COMPARE ALL 2N+1 POINTS & CHOOSE THE BEST.
- CONTINUE TILL THERE IS AN IMPROVE MENT - ELSE DECREASE INCREAMENT STEP 1: x0 = INITIAL POINT
STEP 2 :
IF
Exploratory move
Current solution is xc; set i = 1; x = xc S1: f = f(x), f+ = f(xi + i), f- = f(xi - i) S2: fmin = min (f, f+, f-); set x corresponding to fmin S3: If i = N, go to 4; else i = i + 1, go to 1 S4: If x xc, success, else failure
Pattern Move
S1: Choose x(0), I, for I = 1, 2, N, , and set k = 0 S2: Perform exploratory move with xk as base point;
If success, xk+1 = x, go to 4 else goto 3
Step 2 Perform an Iteration of the exploratory move with base point as x = x ( 0 ) Thus we set
x = x ( 0 ) = (0,0) T
and i = 1
Step 1 : Explore the vicinity of the variable x1 Calculate the function values at three points
( x ( 0) + 1 x ( 0 ) )T = (0.5,0.5)T
f
+
= f ((0.5,0.5) T ) = 157.81
(0)
= (0,0)
f = f ((0,0) T ) = 170
(x
(0)
1 x
(0) T
) = (0.5,0.5)
= f ((0.5,0.5) T ) = 171.81
Step 2 : Take the Minimum of above function and corresponding point As i 1 : all variables are not explored Step 3 : Increment counter i=2 and explore second variable. First iteration completed
Step1: At this point the base point is x = (0.5,0) T explore the variable x2 and calculate the function values.
f
+
= f ((0.5,0.5) T ) = 144.12
Step 2 : fmin = 144.12 and point , x=(0.5,0.5) Step 3 : As i=2 move to the step 4 of the exploratory move Step 4 : ( of the Exploratory move ) Since x x c the move is success and we set x = (0.5,0.5) T
As the move is success, set x (1) = x = (0.5,0.5) T move to step 4 STEP 4 : We set k=1 and perform Pattern move
x ( 2 ) p = ( x (1) + ( x (1) x ( 0 ) ) T ) = 2(0.5,0.5) T (0,0) T = (1,1) T
Step 5 : Perform another exploratory move as before and with x p as the base point. The new point is x = (1.5,1.5) T Set the new point x ( 2) = x = (1.5,1.5) T (1) ( 2) ( ) 63 . 12 f x = f ( x ) = 144.12 Step 6 : is smaller than Proceed to next step to perform another pattern move
(2)
Note: as x ( 2 )is better than x (1) , a jump along the direction ( x ( 2 ) x (1) ) is made, this will take search closer to true minimum STEP 5 : Perform another exploratory move to find any better point around the new point. Performing the move on both variables we have New point
x (3) = (3.0,2.0) T
In the example the minimum of the Hookes-Jeeves algorithm happen in two iterations : this may not be the case always Even though the minimum point is reached there is no way of finding whether the optimum is reached or not The algorithm proceeds until the norm if the increment vector is small. STEP 6 : function value at new point
f ( x 3 ) = 0 < f ( x 2 ) = 63.12
STEP 5 : With the new point as base the search is success and x=(4.0,2.0) and thus we set
x ( 4 ) = (4.0,2.0) T
STEP 6 : The function value is 50, which is larger that the earlier i.e. 0 . Thus we move to step 3 Step 3 : Since = 0.5 we reduce the increment vector
= (0.5,0.5) T / 2 = (0.25,0.25) T
Step 2 : Perform an exploratory move with the following as current point x (3) = (3.0,2.0) T The exploratory move on both the variables is failure and we obtain x (3) = (3.0,2.0) T thus we proceed to Step 3 Step 3 : Since is not small reduce the increment vector and move to Step 2. The new increment vector is = (0.125,0.125) T The algorithm now continues with step 2 and step 3 until is smaller than the termination factor. The final solution is x * = (3.0,2.0) T with the function value 0
&
THEN
x2 x1
y1
OR
FROM x1 GET y1 ALONG (1,0) y1 GET x2 ALONG (0,1) x2 GET y2 ALONG (1,0) TAKE (y2 - y1 )
Alternate to the above method - One point ( x1 ) and both coordinate directions ((1,0) T and (0,1) T ) - Can be used to create a pair of conjugate directions (d and ( y 2 y 1 ))
Point ( y 1 ) obtained by unidirectional search along (1,0) T from the point ( x1 ) . Point ( x 2 ) obtained by unidirectional search along (0,1) T from the point ( y 1 ) . Point ( y 2 ) obtained by unidirectional search along (1,0) T from the point ( x 2 ) . The figure shown also follows the Parallel Subspace Property. This requires Three Unidirectional searches.
Solution (0) T x = ( 0 , 4 ) Step1 : Begin with a point Initial direction s (1) = (1,0) T and s ( 2) = (0,1) T Step 2: Find minimum along the first search direction. Any point along that direction can be written as
x ( p ) = x ( 0 ) + s (1)
Thus the point xp can be written as xp=(,4)T Now the two variable function can be expressed in terms of one variable F ( ) = ( 2 7) 2 + ( + 9) 2 We are looking for the point which the function value is minimum. == Following the procedure of numerical differentiation. Using the bounding phase method, the minimum is bracketed in the interval (1,4), and using the golden search method the minimum *=2.083 with three decimals places of accuracy. Thus x1 = (2.083,4.00)T
Similarly find the minimum point along the second search direction. A general point on the line is
x( ) = ( x 1 + s 2 ) = (2.083, ( + 4)) T
Using similar approach as said earlier we have *=-1.592 x2 = (2.083,2.408)T From the above point perform a unidirectional search along the first search direction and obtain the minimum point x3 = (2.881,2.408)T
Step 3 : According to the parallel subspace property, we find the new conjugate direction
s ( 2 ) = (1,0) T
Step 4 : the magnitude of search vector d is not small. Thus the new conjugate search direction are
s (1) = (0.798,1.592) T / (0.798,1.592) T = (0.448,0.894) T
Step 2 : A single variable minimization along the search direction s(1) from the point x(3)=(2.881,2.408)T results in the new point x = (3.063,2.045) One more unidirectional search along the s2 from the point x4 results in the point x5. Another minimization along s1 results in x6
The search direction d ( before normalizing ) may be considered to be small and therefore the algorithm may be terminated
EXTENDED PARALLEL SUBSPACE PROPERTY. 1 Let us assume that the point y is found after unidirectional searches along each of m ( < N ) 1 conjugate directions from a chosen point x and similarly, the point y 2 is found after unidirectional searches along each of m 2 conjugate directions from another point x . The vector ( y 2 y 1 ) is the conjugate to all m search directions.
ALGORITHM
Step 1 : Choose starting point And a set of N linearly independent direction Step 2 : Minimize along N unidirectional search directions using the previous minimum point to begin the next search. Step 3 : Form a new conjugate direction d using the extended parallel subspace property. Step 4 : If || d || is small or search directions are linearly dependent, TERMINATE, Else replace starting point for N directions, set s(1)=d /||d|| And go to Step 2
FOR N VARIABLES
STEP 1: TAKE x0 & N LINEARLY INDEPENDENT DIRECTIONS s1, s2, s3, s4,------- sN s i = ei STEP 2: - MINIMIZE ALONG N UNI-DIRECTIONAL SEARCH DIRECTIONS,USING PREVIOUS BEST EVERY TIME - PERFORM ANOTHER SEARCH ALONG s1 STEP 3: FROM THE CONJUGATE DIRECTION d STEP 4: IF
d
IS SMALL TERMINATE
ELSE
s j = s j 1 s =d/d
1
&
GOTO 2
By definition , the first derivative f ( x (t ) ) at any point ( x ( t ) ) represents the direction of the maximum increase of the function value. If we are interested in finding a point with the minimum function value, ideally we should be searching along the opposite to the first derivative direction, that is , we should search along f ( x ( t ) ) Any search made in this direction will have smaller function value.
DECENT DIRECTION
A search direction (d (t ) ) is a decent direction at a point ( x ( t ) ) if the condition f ( x ( t ) ).d ( t ) 0 is (t ) ( x ) satisfied in the vicinity of the point It can also be proved by comparing function values at two points along any decent direction. The magnitude of the vector f ( x (t ) ).d (t ) for a decent direction (d (t ) ) specifies how decent the search direction is. The above statement can be explained with the help of an example on the next side
If
(t ) (t ) is used, the quantity f ( x ). d .d 2 = f ( x ) is maximally negative
(t )
(t )
Note : =
x1
x 2
x 3
x n
Example
Consider the Himmelblau function:
2 f ( x1 , x2 ) = ( x12 + x2 11) 2 + ( x1 + x2 7) 2
We would like to determine whether the direction (t ) T (t ) T at the point is a decent ( x ) = ( 1 , 1 ) (d ) = (1,0) direction or not. Refer to the figure below
It is clear from the figure that if we move locally along (d (t ) ) from the point ( x (t ) ) will reduce the function value Investigate this aspect by calculating the derivative f ( x (t ) ) at the point. Derivative as calculated numerically is
f ( x (t ) ) = (46,38) T
The above is a negative quantity, thus the search direction is a Decent direction
The amount of non-negativity suggests the extent of decent in the direction If the search direction d (t ) = f ( x (t ) ) T = (46,38) T is used, the magnitude of the above dot product is
46 (46,38) = 3,560 38
T
The direction (46,38) or (0.771,0.637) is more descent than The above direction is the steepest direction at the point x(t)
In nonlinear function the steepest decent direction at any point may not exactly pass through the true minimum. The steepest decent direction is a direction which is a local best direction It is not guaranteed that moving along the steepest decent direction will always take the search closer to the true minimum
As the direction gives the maximum decent in function values, it is also known as Steepest Decent Methods The algorithm guarantees improvement in the function value at every iteration
Algorithm in brief ;
At every iteration ; To find the minimum point along direction Compute derivative at current point Perform unidirectional search in the negative to this derivative direction The minimum point becomes the current point and the search continues from this point ; Algorithm continues until a point having a small enough gradient vector is found.
Algorithm in Steps
STEP 1: CHOOSE M (MAX. NO. OF ITERATIONS)
1 ,
STEP 2: CALCULATE
, x
,k = 0
f (x
STEP 3: IF IF
) )
TERMINATE TERMINATE
f (x k M
MIN.
f (x ) = f (x f (x ))
k+1 k k
STEP 5:
IF
x x x
k
k+1
1
GOTO STEP 2
ELSE
k =k +1
- METHOD WORKS WELL WHEN xk IS FAR FROM x* (OPTIMUM) - IF POINT IS CLOSE TO x* THEN CHANGE IN GRADIENT VECTOR IS VERY SMALL. - OTHER METHODS USE VARIATION -SECOND DERIVATIVES(NEWTONS) -COMBIMATION -CONJUGATE GRADIENT METHOD
Example
Consider the Himmelblau function:
2 f ( x1 , x2 ) = ( x12 + x2 11) 2 + ( x1 + x2 7) 2
Step 1: Choose large value of M for proper convergence M 100 is normally chosen. Initial conditions : M = 100 x(0) = (0,0)T 1= 2=10-3 k=0
Step 2 : The derivative at the initial point x0 is calculated and is found to be (- 14, - 22)T
Step 3 : As the magnitude of the derivative is not small and k = 0 < M = 100. do not terminate proceed to step 4
Step 4 : perform a line search form x(0) in the direction f ( x ( 0) ) such that the function value is minimum. Along that direction, any point can be expressed by fixing a value for the parameter 0 in the equation.
x = x f ( x
0 0 (0)
) = 14 ,22
0
0 T
Using Golden section search in the interval (0,1) 0*= 0.127 minimum point along the direction is x1 = (1.788,2.810)T Step 5 : As x1 and x0 are quite different, we do not terminate, but go back to step 2, this completes one iteration.
Step 2: The derivative vector at this point is ( - 30.707, 18.803 )T Step 3 : The magnitude of the derivative vector is not smaller than 1, thus, we continue with step 4. Step 4 : Another unidirectional search along ( 30.707,-18.803) from the point x1=(1.788,2.810) using the golden section search finds the new point x2=(23.008,1.99) with a function value equal to 0.018 Continue the process until the termination criteria is reached
Minimise ( x12 + x2 11) 2 + ( x1 + x22 7) 2 Subjected to ( x1 5) 2 + x22 26 0 Penalty = 0.1 < ( x1 5) 2 + x22 26 0 > 2
Infeasible region
x2
x1
Process
1. Choose 1 , 2 , R, . 2. Form modified objective function
P ( x k , R k ) = f ( x k ) + ( R k , g ( x k ), h( x k ))
3. Start with
xk
go to step 2.
At any stage minimize P(x,R) = f(x)+(R,g(x),h(x)) R = set of penalty parameters = penalty function
- for equality constraints - only for infeasible points Interior penalty functions - penalize feasible points Exterior penalty functions - penalize infeasible points Mixed penalty functions - combination of both
Infinite barrier penalty - inequality constraints. - R is very large. - Exterior. Log penalty =-R ln[g(x)] -inequality constraints - for feasible points - interior. -initially large R. - larger penalty close to border.
= R g j ( x)
Inverse penalty - interior. - larger penalty close to border. - initially large R Bracket order penalty
R < g ( x) > 2 1 = R g ( x)
Direct search
Variable elimination - for equality constraints - Express one variable as a function of others and - Eliminate one variable - Remove all equality constraints
Complex search
- generate a set of points at random - If a point is infeasible reflect beyond centroid of remaining points - Take worst point and push towards centroid of feasible points.
If the resulting xim is infeasible, retract half the distance to the centroid, repeat till xm is feasible
x
p
xmean