dakota-2

advertisement
Introduction
Optimum Design Process
 Mathematical process of finding the conditions that give maximum or minimum value of a function
Identify :
(1) Design variables
(2) Objective functions to be minimized/maximized
(3) Constraints that must be satisfied
Initial design
Analyze the system
Convergence
criteria ?
N
Change design using
Optimization technique
Y
Optimum
Design
Introduction …
Applications
Optimization is at work everywhere: manufacturing, transportation, logistics, financial services, utilities,
energy, telecommunications, government, defense and retail
 Engineering Applications




Vehicle design and analysis
Shape optimization of Aircraft structures
Heat transfer analysis in CVD reactors
Size and topology optimization of mechanical components
 Medical Applications
 Algorithms for new drug development
 Protein structure assessment
 DNA sequence mapping
 Environmental protection
 Efficient soil and water resource utilization
 Land and natural resource allocation
 Management Mathematics
 Supply Chain Management, Distribution Management and Production Scheduling
Background Information
Optimization Software Packages available in the Industry
 DAKOTA – Sandia National Labs, a complete optimization toolkit
 iSIGHT* - Engineous Software Inc, a complete optimization toolkit
 GENESIS* - Vanderplaats Research & Development, Inc., Structural Analysis and Optimization Software
 Mathematical Dynamic Modeling (MADYMO)* – TNO Automotive
 Hierarchical Evolutionary Engineering Design System (HEEDS)* – Red Cedar Technology
 OPTIMUS* – Noesis Solutions, Optimization software
 LS-OPT* - Livermore Software Technology Corporation
 COSMOSWorks™ and COSMOSM™* - Structural Research & Analysis Corporation
 MATLAB Optimization Toolbox* – MathWorks
* Commericial packages
Background Information
Obtaining DAKOTA
DAKOTA binary executable files and source code files are available through the following website:
http://endo.sandia.gov/DAKOTA
Installing DAKOTA - Binary Executable Files
gunzip Dakota_4_x.OSversion.tar.gz
tar -xvf Dakota_4_x.OSversion.tar
Running DAKOTA
dakota -i dakota.in
dakota -i dakota.in > dakota.out
dakota –i dakota.in –read_restart dakota.rst > dakota.out
Multiprocessor Execution
mpirun –np 4 dakota –i dakota.in > dakota.out
mpirun –machinefile machines –np 4 dakota –i dakota.in > dakota.out
Optimization with DAKOTA
Design Analysis Kit for Optimization and Terascale Applications (DAKOTA)

Software toolkit which provides a flexible and extensible interface between
simulation codes and iterative analysis methods

Improved or optimal designs using state-of-the-art optimization methods

Shortens design cycle and reduces overall product development costs
Black-Box interface between DAKOTA and a user-supplied simulation code
Capabilities of DAKOTA
Sampling
Methods
and DOE
Parameter
Study
Multidimensional
LHS
Vector
DDACE
Modern
DOE
Centered
List
Uncertainty
Quantification
Analytic
Reliability
method
Stochastic
FE method
AMV
AMV+
Classical
DOE
Pseudo
Monte Carlo
CCD
LHS
Box Behnken
Optimization
Software packages
Optimization
Strategies
Surface Fitting
methods
CONMIN
Multilevel
Hybrid
First-order
Taylor Series
SGOPT
Multistart
Local
Quadratic
Polynomial
PICO
Pareto
Kriging
Interpolation
APPS
MINLP
ANN
OPT++
OUU
MARS
NPSOL*
SBO
FORM
SORM
Orthogonal
Array sampling
LHS : Latin Hypercube sampling
DDACE : Distributed Design and Analysis for
Computer Experiments
DOE : Design of Experiments
CCD : Central Composite Design
AMV : Advanced Mean-Value methods
FORM/SORM : First/Second Order Reliability Method
MINLP : Mixed Integer Nonlinear
Programming
OUU : Optimization Under Uncertainty
SBO : Surrogate Based Optimization
ANN : Artificial Neural Network
MARS : Multivariate Adaptive Regression
Splines
DOT*
Parallel
Computing
Flexibility in DAKOTA
Files required for Simulation
DAKOTA Input File
e.g., Dakota_rosenbrock.in
Simulation Driver Script File
e.g., simulator_script
Pre-Processing Utility
e.g., transfer_perl
Template Simulation Input file
e.g., ros.template
Adapting the Scripts for another Simulation

Steps for this purpose are

Create a template simulator input file by identifying the fields in an existing input file.

Modify the Perl variables in the perl script file.

Modify the analysis section of simulator script file.

Change the post-processing section in simulator_script to reflect the revised extraction process.

Modify the DAKOTA input file to define the initial values, bounds, and tags in the variables specification and
the number of objectives and constraints in the responses specification.
Capabilities …
 Optimization studies have shown that there is no single optimization technique that works best for all
design problems. A combination of techniques can provide the best opportunity for finding an optimal
solution
Optimization Strategies
Multilevel Hybrid
Multistart Local
Pareto optimization
Flow chart of SBO
Different optimization algorithms at
different stages
Multiple local optima exists
Multiple sets of weights
Sampling Based
Optimization under
Uncertainty
Analytic Reliability based
Stochastic Reliability based
MINLP
DACE (data
sampling)
Select design
points that must
be analyzed
Simulation
Analyze system
using
computational
methods
Metamodeling
Construct approximated
mathematical model
(surrogate model)
Branch and Bound
Optimization
Surrogate based optimization
Find an optimal
design variable set
Capabilities (Surface Fitting methods)
Surface fitting process consists of three steps:

Selection of a set of design points,

Evaluation of the true response quantities at these design points

Using the response data to solve for the unknown coefficients in the surface fit model
First order Taylor
series model
Linear
Polynomial Regression
Surface Fitting Methods
Quadratic
Cubic
Kriging Interpolation
Artificial Neural Network
Multivariate Adaptive
Regression Splines (MARS)
Interfacing DAKOTA with Other Simulation Codes
 In DAKOTA, there are two different strategies for interfacing i.e., interfacing with an application and
interfacing with an approximation
DAKOTA Input File Format
Interfacing Mechanisms
in DAKOTA
Variables
Interface
Responses
Methods
Strategy
Interfacing with an application
(Computational Simulation code)
System Calls
Forks
Direct Function
Interfacing with an
approximation
(Surrogate model)
Local
Global
Multipoint
Hierarchical
Capabilities (Parallel Computing)
 Single Program Multiple Data parallel programming model
 MPI and MPI_COMM_WORLD
Parallelism levels
Algorithmic
coarse grained
Algorithmic fine
grained
Independent function
evaluations
Internal linear
algebra
Function evaluation
coarse grained
Separable parts of a single
function evaluation
Function evaluation
fine grained
Solution steps within a
single analysis code
Test cases – Weight Optimization
A truss structure
 Weight optimization of a truss structure under vertical load
Objective Function: Minimize the weight of Truss
x2
x1
Cross sectional area of the truss members
(x1, x2, x3, x4) are design variables
Problem is formulated in C, C++, F77 / F90
Executable is linked with DAKOTA input file
DAKOTA is executed with the input file to
generate the output
weight
x4
Optimization Results
Vertical deflection constraint and certain end
constraints are applied
Gradient based method (CONMIN_MFD) was applied
x3
20,000 kg
Mathematically : F(x1, x2, x3, x4) = x1  1.2  x2  x3  0.6  x4
Design
Variables
Initial
Point
Design
Variables
Final Point
x1
20 cm2
x1
10.63 cm2
x2
40 cm2
x2
6.65 cm2
x3
10 cm2
x3
10.64 cm2
x4
10 cm2
x4
12.86 cm2
Initial Objective
84 kg
Final Objective
36.97 kg
function value
function value
Best data captured at function evaluation 112
Total Wall Clock = 0.806 seconds
Test case – Handling extreme non-linearity
Objective : Find the most optimal solution on a non-linear
(real world) response surface
Mathematically
f ( x1 , x 2 )  
1.7 * (1.25  cos(5.4 * x 2 ) )
(6  6 * (3 * x1  1) )
2

1
1  9 * ( x1  0.6)  16 * ( x 2  0.5) 2
2
 Gradient based and Non-Gradient based methods were applied
 Multi-Level hybrid optimization was applied
 Surrogate based Optimization (SBO) which employs data-sampling,
A surface plot of the objective function
metamodeling and optimization techniques was used.
Gradient based optimization with different initial points using OPT++
Test
initial
x1
initial
x2
optimal
x1
optimal
x2
f
optimum
1
0.0
0.0
0.3239
-0.012
-0.7164
local
2
0.0
0.5
0.3312
0.5759
-0.6739
local
3
0.0
-0.5
0.3140
-0.5778
-0.7514
local
4
-0.5
0.0
-0.5922
-0.5021
-1.0696
global
Effect of population size on GA
population
optimal
x1
optimal
x2
f
computing
time
(sec.)
200
-0.5304
-0.5013
-1.0374
26.36
400
-0.6359
-0.4801
-1.0454
51.72
600
-0.6359
-0.4801
-1.0454
79.82
Multilevel hybrid optimization
Method
optimal x1
optimal x2
f
computing time
(sec.)
GA  PS  CONMIN
-0.5925
-0.5023
-1.0696
12.45
GA  CONMIN
-0.5925
-0.5023
-1.0696
11.44
Comparison of accuracy of surface fitting methods
Fitting method
x1
x2
f sbo
% error*
quadratic poly.
-0.5007
-0.5076
-1.0024
6.28
No. of samples
x1
X2
f sbo
% error
cubic poly.
-0.5788
-0.4918
-1.0675
0.19
20
-0.5969
-0.5181
-1.0654
0.39
kriging
-0.5981
-0.5130
-1.0675
0.19
30
-0.5981
-0.5130
-1.0675
0.19
MARS
-0.5659
-0.4802
-1.0555
1.32
40
-0.5957
-0.5019
-1.0695
0.01
ANN
-0.5530
-0.4685
-1.0381
2.95
Effect of number of samples in LHS on the solution (Kriging)
f real = -1.0696
* % error = f sbo  f real / f real *100

Test case – DAKOTA coupled with in-house solvers
 DAKOTA interface with a Inhouse CFD flow solver
Black-box interface of DAKOTA and Flow solver
Job file
DAKOTA
Input File
Results File
Generalized grid of the airfoil
Objective Function: Maximize Coefficient of Lift CL
Extract
data
Script File
Extracted
data
Design Variable: Angle of attack (ALPHA)
Side constraint: 0o  ALPHA  13o
Input File
History
File
Alter
Waits
for
Gradient based method (CONMIN_FRCG) is used
FORK Application Interface is used
Variables
File
Run
Inhouse
(Flow Solver)
Grid Computing

DAKOTA (Binary) is distributed for various platforms e.g., Intel Pentium Red Hat, Sun Solaris, SGI IRIX,
IBM AIX and Mac OSX. DAKOTA (Source) is also distributed, which can be built for any particular
platform.

DAKOTA is intended for solving computationally expensive simulations of different applications, enabling
DAKOTA on a grid based resource will reduce expense and make it available for various research
communities

Large scale parallelism and grid computing will be very useful for DAKOTA users, providing quick
results, enabling collaborative usage and communication.

DAKOTA version 4.0 with a JAVA Front End is installed on Medusa (Rocks 4.1 cluster), this required
installing few additional packages e.g., BLAS, LAPACK, FLEX, YACC and Bison. PGI compiler was
required for compiling various algorithms included in the toolkit

Optimization, Parameter estimation, Uncertainty quantification and Statistics toolkit DAKOTA is intended
for usage among scientists and engineers, this can further collaborated through SURA grid usage

Goal is now to enable DAKOTA on SURA grid, it has been enabled on Medusa and can be easily
extended to other available clusters. Users from different groups can submit jobs for different
applications and there can be collaborative support among them.
Conclusion

Provides access to a broad range of iterative capabilities through a single, relatively simple interface
between DAKOTA and simulation code.

Interfacing a different iterative method / strategy with the simulation code requires only a change in
few commands of the DAKOTA input file

Provides access to a variety of different optimization methods and algorithms, with much of the
complexity of the optimization software interfaces hidden from the user

Designed to exploit massively parallel computing platforms through a multi-level parallelism approach
which takes advantage of opportunities for concurrent function evaluations that are provided by the
different optimization algorithms

Flexibility, and extensibility, of the C++ object-oriented design approach used in creating DAKOTA
permits the rapid development of more sophisticated optimization strategies such as surrogate-based
optimization, hybrid optimization and optimization under uncertainty
Input File – Truss design
Input file for Truss design (Gradient based method)
strategy,
#
method,
#
#
#
variables,
interface,
#
responses,
single_method
graphics
tabular_graphics_data
conmin_mfd
convergence_tolerance = 1e-4
conmin_frcg
optpp_q_newton
optimization_type minimize
continuous_design = 4
cdv_descriptor
'x1' 'x2‘ ‘x3’ ‘x4’
cdv_initial_point
20.0 40.0 10.0 10.0
cdv_lower_bounds 0.0 0.0 0.0 0.0
application, system
application direct
analysis_driver = 'a.out'
parameters_file = 'test.in'
results_file = 'test.out'
file_tag
num_objective_functions = 1
num_nonlinear_inequality_constraints = 5
numerical_gradients
method_source dakota
interval_type central
fd_gradient_step_size = 0.001
no_hessians
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
Input File – Handling Extreme non-linearity
strategy,
method,
variables,
interface,
responses,
Non - Gradient based method
single_method
graphics
tabular_graphics_data
output verbose
max_iterations 300
max_function_evaluations 500
solution_accuracy = 1.e-2
seed = 1234
sgopt_pga_real
initialization_type random
population_size = 200
selection_pressure rank
replacement_type elitist = 1
crossover_type uniform crossover_rate = 0.92
mutation_type offset_cauchy dimension_rate = .12
population_rate = .91 non_adaptive
continuous_design = 2
cdv_initial_point
0.0 0.0
cdv_lower_bounds
-1.0 -1.0
cdv_upper_bounds
1.0 1.0
cdv_descriptor
'x1' 'x2‘
application fork,
analysis_driver = 'a.out'
parameters_file = 'sgopt-real.in'
results_file = 'sgopt-real.out'
file_tag
num_objective_functions = 1
no_gradients
no_hessians
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
Input File – Handling Extreme non-linearity
strategy,
method,
method,
method,
graphics
tabular_graphics_data
multi_level uncoupled
method_list = 'GA' 'PS' 'NLP'
id_method = 'GA'
model_type single
variables_pointer = 'V1'
interface_pointer = 'I1'
responses_pointer = 'R1'
max_function_evaluations 10
sgopt_pga_real
seed = 1234
population_size = 20
verbose output
id_method = 'PS'
model_type single
variables_pointer = 'V1'
interface_pointer = 'I1'
responses_pointer = 'R1'
sgopt_pattern_search stochastic
seed = 1234
verbose output
initial_delta = 0.1
threshold_delta = 1.e-2
solution_accuracy = 1.e-2
exploratory_moves best_first
id_method = 'NLP'
model_type single
variables_pointer = 'V1'
interface_pointer = 'I1'
responses_pointer = 'R2'
conmin_frcg
gradient_tolerance = 1.e-2
convergence_tolerance = 1.e-2
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
interface,
variables,
responses,
responses,
id_interface = 'I1'
application fork,
analysis_driver= 'a.out'
parameters_file= 'multilevel.in'
results_file= 'multi.out'
file_tag
id_variables = 'V1'
continuous_design = 2
cdv_initial_point
0.0 0.0
cdv_upper_bounds
1.0 1.0
cdv_lower_bounds
-1.0 -1.0
cdv_descriptor
'x1' 'x2'
id_responses = 'R1'
num_objective_functions = 1
no_gradients
no_hessians
id_responses = 'R2'
num_objective_functions = 1
numerical_gradients
method_source dakota
interval_type central
fd_step_size = 0.0001
no_hessians
Multi-Level Optimization
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
Input File – Handling Extreme non-linearity
Surrogate Based Optimization
strategy,
surrogate_based_opt
graphics
tabular_graphics_data
max_iterations = 2
opt_method_pointer = 'NLP'
trust_region
initial_size = 1.0
minimum_size = 1.0e-6
contraction_factor = 0.50
expansion_factor = 1.50
\
\
\
\
\
\
\
\
\
\
method,
id_method = 'NLP'
model_type layered
interface_pointer = 'SFN'
responses_pointer = 'SFN_GRAD'
optpp_q_newton,
max_iterations = 50,
convergence_tolerance = 1e-4
\
\
\
\
\
\
\
method,
id_method = 'SAMPLING'
model_type single
interface_pointer='TFN'
responses_pointer='TFN_GRAD‘
dace lhs
seed = 123
samples = 30
\
\
\
\
\
\
\
\
variables,
continuous_design = 2
cdv_initial_point
-0.5 -0.5
cdv_lower_bounds
-1.0 -1.0
cdv_upper_bounds
1.0 1.0
cdv_descriptor
'x1'
'x2'
\
\
\
\
\
interface,
id_interface = 'SFN'
approximation global,
dace_method_pointer = 'SAMPLING'
kriging
correlations 1.0 1.0
\
\
\
\
\
\
interface,
application system,
id_interface = 'TFN'
analysis_driver = 'a.out'
parameters_file = 'surrogate.in'
results_file = 'surrogate.out'
file_tag
\
\
\
\
\
\
\
responses,
id_responses = 'TFN_GRAD‘
num_objective_functions = 1
no_gradients
no_hessians
\
\
responses,
\
\
\
\
\
\
\
id_responses = 'SFN_GRAD'
num_objective_functions = 1
numerical_gradients
method_source dakota
interval_type central
fd_step_size = 0.0001
no_hessians
# SAMPLING method specifications for building
# surrogate function(s).
\
\
\
Download