Modelowanie zjawiska mikrosegregacji stopu

Download Report

Transcript Modelowanie zjawiska mikrosegregacji stopu

Optimization of thermal processes
Lecture 9
Maciej Marek
Czestochowa University of Technology
Institute of Thermal Machinery
Optimization of thermal processes
2007/2008
Overview of the lecture
• Constrained nonlinear programming problems
• Characteristics of a constrained problem
• Direct methods
− Random search
− Sequential linear programming
− Methods of feasible directions
• Indirect methods
− Tansformation techniques
− Penalty function method
Optimization of thermal processes
2007/2008
Nonlinear programming (constrained optimization problem)
Find
 x1 
x 
X   2
 
 
 xn 
which optimizes
f (X)
Nonlinear functions
subject to the constraints:
g j ( X)  0,
j  1, 2,..., m
hk ( X)  0,
k  1, 2,..., p
• Direct methods – the constraints are handled in explicit manner
• Indirect methods – the constrained problem is solved as a sequence of
unconstrained minimization problems
Optimization of thermal processes
2007/2008
Characteristics of a constrained problem
The constraints may have no effect on the optimum point.
In this case we can ignore the constraints and just solve the unconstrained
problem. In practice it’s hard to identify such situation beforehand.
x2
Another local minimum
g2 ( x1 , x2 )  0
Necessary and sufficient
Condition:
f
Xopt
Feasible region
g1 ( x1, x2 )  0
H X*
x1
X*
0
 2 f 



x

x
 i j  X *
Positive definite
Optimization of thermal processes
2007/2008
Characteristics of a constrained problem
The optimum solution may occur on a constraint boundary.
In this case the constraint(s) determine the posistion of the optimum point.
x2
Minimum value but not in the feasible region
Xopt
Active constraint
g1 ( x1, x2 )  0
Feasible region
Optimization of thermal processes
g2 ( x1 , x2 )  0
x1
2007/2008
Characteristics of a constrained problem
The constrained problem may have more local extreme points then
the unconstrained problem.
Active constraints
x2
X1opt
2
Xopt
Feasible region
Optimization of thermal processes
A constrained optimization
technique must be able to locate
the minimum in all mentioned
situations.
x1
2007/2008
Random search method (direct methods)
1.
Generate a trial desing vector using one random number of each design
variable.
2.
Verify whether the constraints are satisfied (within a specified tolerance).
If not, generate new trial vectors until you find a vector that satisfies all
the constraints.
3.
Check if the value of the objective function is reduced. In such a case
take current design vector as the best design. Otherwise, discard the
trial vector and go to step 1.
4.
After specified number of iterations stop the procedure and take the last
best design vector as the solution of your constrained problem.
This method is very simple.
Unfortunetely, it is as simple as
inefficient.
Optimization of thermal processes
2007/2008
Sequential linear programming - SLP (direct methods)
In this method the solution of the nonlinear problem is found by solving a series
of linear programming problems (other name: cutting plane method).
1.
Start with an initial point X1 and set the iteration number as i=1.
2.
Linearize the objective function and constraint functions about the point
Xi as:
T
f ( X)  f ( Xi )  f ( Xi ) ( X  Xi )
g j ( X)  g j ( Xi )  g j ( Xi )T ( X  Xi )
First-order Taylor expansion
hk ( X)  hk ( Xi )  hk ( Xi )T ( X  Xi )
3.
Formulate the approximating linear problem as:
minimize
f (Xi )  f (Xi )T (X  Xi )
subject to
g j ( Xi )  g j ( Xi )T ( X  Xi )  0, j  1,.., m
hk ( Xi )  hk ( Xi )T ( X  Xi )  0, k  1,..., p
Optimization of thermal processes
2007/2008
Sequential linear programming - SLP (direct methods)
4.
Solve the approximating LP problem to obtain the solution vector Xi+1 .
5.
Evaluate the original constraints at Xi+1 :
g j (Xi 1 ), j  1, 2,..., m and hk (Xi 1 ), k  1, 2,..., p
if
Prescribed tolerance
g j (Xi 1 )   , j  1, 2,..., m and |hk (Xi 1 ) |  , k  1, 2,..., p
stop the procedure and take Xopt = Xi+1 .
6.
Otherwise, find the most violated constraint, for example, as
gk ( Xi 1 )  max  g j ( Xi 1 ) 
j
and relinearize this constraint about the point Xi+1
gk (X)  gk (Xi 1 )  gk (Xi 1 )T (X  Xi 1 )  0
and add this as the (m+1)th inequality constraint.
Optimization of thermal processes
2007/2008
Sequential linear programming - SLP (direct methods)
6.
Set the new iteration number as i=i+1, the total numver of constraints as
m+1 inequalities and p equalities, and to to step 4.
SLP method has several advantages, e.g.:
• It is an efficient technique for solving convex programming problems
with nearly linear objective and constraint function
• Each of the approximating problems will be a LP problem and hence can
be solved quite efficiently
SLP method can be illustrated with the help of a onevariable problem. Let’s see...
Optimization of thermal processes
2007/2008
Geometrical interpretaion of SLP method (direct methods)
Minimize
f ( x)  c1 x
subject to
g ( x)  0
Nonlinear function
f ( x)  c1 x
f ( x)
g ( x)  0
g ( x)  0
g ( x)  0
minimum
Feasible region (interval)
c
e1
e2 a
b
x
d
We start with initial constraint c  x  d
and proceed with consequent linearizations of
Optimization of thermal processes
2007/2008
g ( x)
SLP method - example
(direct methods)
f ( x1 , x2 )  x1  x2
Minimize
Due to the nonlinear
constraint the problem
is nonlinear
subject to the constraint
g ( x1, x2 )  3x12  2x1x2  x22 1  0
Steps 1,2,3:
To avoid possible unbounded solution, we first take the bounds on the
design variables, and solve the LP problem:
min f ( x1, x2 )  x1  x2
Initial constraints
2  x1  2
2  x2  2
The solution of this problem can be obtained as:
Optimization of thermal processes
2
X 
2
2007/2008
f ( X)  4
SLP method - example
(direct methods)
Step 4
Since we have solved one LP problem, we can take:
2
Xi1  X2   
2
Step 5
As g (X2 )  23  
we linearize about point X2:
g (X)  g (X2 )  g (X2 )T (X  X2 )  0
g
x1
g ( X2 )  23,
g
x2
 (6 x1  2 x2 )
 16
X2
X2
 (2 x1  2 x2 )
8
X2
X2
Thus:
g (X)  16x1  8x2  25  0
and we can add this constraint to the
previous LP problem.
Optimization of thermal processes
2007/2008
SLP method - example
(direct methods)
The new LP problem becomes:
min f ( x1, x2 )  x1  x2
2  x1  2
2  x2  2
16 x1  8 x2  25  0
Step 6
Step 4
Added constraint
Set the iteration number as i=2 and go to step 4.
Solve the approximating LP problem
and obtain the solution:
 0.5625
X3  

2.0


f (X3 )  2.5625
This procedure is continued until the specified convergence
criterion is satisfied:
g (Xi )  
Optimization of thermal processes
2007/2008
Other direct methods
• Methods of feasible directions
• Rosen’s gradient projection method
• Generalized reduced gradient method
• Sequential quadratic programming
x2
1*
Xi 1  Xi  i*Si
Feasible region
X2
X1
S1
S2
optimum
2*
X3
Feasible direction
C1  C2  ...  C5
f  C4
f  C1
f  C2
f  C5
f  C3
x1
Objective function contours
Optimization of thermal processes
2007/2008
Transformation techniques (indirect methods)
If the constraints are explicit functions of the design variables and have certain simple
forms, the independent variables may be transformed such that the constraints are
satisfied automatically. For instance:
1.
Lower and upper bounds on xi:
li  xi  ui
2.
New independent unconstrained variable
xi  li  (ui  li )sin2 yi
If the variable xi is constrained to take only positive values:
xi  0
Note:
xi  yi2
1.
2.
3.
The constraints have to be very simple functions.
For certain constraints such transformation may be
not possible
If it is not possible to eliminate all the constraints it
may be better not to use the transormation at all
Optimization of thermal processes
2007/2008
Transformation techniques - example (indirect methods)
Maximize
f ( x1 , x2 , x3 )  x1x2 x3
subject to the constraints
x1  x2  x3  60
x1  36
xi  0, i  1, 2,3
By introducing new variables as
y1  x1 , y2  x2 , y3  x1  x2  x3
the constraints can be restated as
0  y1  36, 0  y2  60, 0  y3  60
The constraints will be satisfied automatically if we define new
variables:
y1  36sin2 z1, y2  60sin 2 z2 , y3  60sin 2 z3
What will be the form of the objective function in
the new variables?
Optimization of thermal processes
2007/2008
Penalty function method – basic approach (indirect methods)
Suppose we have an optimization problem with equality constraints:
Find
 x1 
x 
X   2
 
 
 xn 
which optimizes
subject to the constraints:
f (X)
hk ( X)  0,
k  1, 2,..., p
The idea is to solve optimization problem in which we include the
constraints in the objective function:
p
New objective function
 (X, r )  f ( X)  r  h j ( X) 
2
j 1
Constant, positive for minimization and
negative for maximization.
Optimization of thermal processes
2007/2008
Penalty function method – basic approach (indirect methods)
, f
, f
 (r3 )
Feasible region
 (r2 )
 (r1 )
f (X)
 (r3 )
 (r2 )
optimum
1*
 (r1 )
3*
optimum
2*
1*
3*
2*
f (X)
Feasible region
Exterior method
x1
Optimization of thermal processes
Interior method
2007/2008
x1
Thank you for your attention
Optimization of thermal processes
2007/2008