introduction mathematical process of finding the conditions that give maximum or minimum value of a...
TRANSCRIPT
Introduction
Mathematical process of finding the conditions that give maximum or minimum value of a function
Optimum Design Process
Identify : (1) Design variables(2) Objective functions to be minimized/maximized(3) Constraints that must be satisfied
Change design using Optimization technique
OptimumDesign
Initial design
Analyze the system
Convergence criteria ?
N
Y
Applications
Engineering Applications
Medical Applications
Environmental protection
Management Mathematics
Introduction …
Vehicle design and analysis Shape optimization of Aircraft structures Heat transfer analysis in CVD reactors Size and topology optimization of mechanical components
Algorithms for new drug development Protein structure assessment DNA sequence mapping
Optimization is at work everywhere: manufacturing, transportation, logistics, financial services, utilities, energy, telecommunications, government, defense and retail
Efficient soil and water resource utilization Land and natural resource allocation
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
Obtaining DAKOTADAKOTA 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 DAKOTAdakota -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
Background Information
Optimization with DAKOTA
Black-Box interface between DAKOTA and a user-supplied simulation code
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
Capabilities of DAKOTA
Parameter Study
Uncertainty Quantification
OptimizationSoftware packages
OptimizationStrategies
Surface Fittingmethods
Parallel Computing
Sampling Methods and DOE
Multidimensional
Vector
Centered
List
LHS
DDACE
ModernDOE
Classical DOE
PseudoMonte Carlo
LHS
OrthogonalArray sampling
CCD
Box Behnken
Analytic Reliabilitymethod
StochasticFE method
AMV
AMV+
FORM
SORM
CONMIN
SGOPT
PICO
APPS
OPT++
NPSOL*
DOT*
MultilevelHybrid
MultistartLocal
Pareto
MINLP
OUU
SBO
First-order Taylor Series
Quadratic Polynomial
KrigingInterpolation
ANN
MARS
LHS : Latin Hypercube samplingDDACE : Distributed Design and Analysis for Computer ExperimentsDOE : Design of ExperimentsCCD : Central Composite DesignAMV : Advanced Mean-Value methodsFORM/SORM : First/Second Order Reliability Method
MINLP : Mixed Integer Nonlinear ProgrammingOUU : Optimization Under UncertaintySBO : Surrogate Based OptimizationANN : Artificial Neural NetworkMARS : Multivariate Adaptive Regression Splines
Flexibility in DAKOTA
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.
Files required for SimulationFiles required for Simulation
DAKOTA Input File e.g., Dakota_rosenbrock.in
DAKOTA Input File e.g., Dakota_rosenbrock.in
Simulation Driver Script File e.g., simulator_script
Simulation Driver Script File e.g., simulator_script
Pre-Processing Utility e.g., transfer_perl
Pre-Processing Utility e.g., transfer_perl
Template Simulation Input file e.g., ros.template
Template Simulation Input file e.g., ros.template
Adapting the Scripts for another Simulation
Flow chart of SBO
DACE (data sampling)
Select design points that must
be analyzed
Simulation
Analyze system using
computational methods
Metamodeling
Construct approximated mathematical model
(surrogate model)
Optimization
Find an optimal design variable set
Capabilities …
Multilevel HybridDifferent optimization algorithms at
different stages
Multistart Local Multiple local optima exists
Surrogate based optimization
Branch and BoundMINLP
Stochastic Reliability based
Analytic Reliability based
Sampling Based
Optimization under Uncertainty
Multiple sets of weightsPareto optimization
Optimization Strategies
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
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
Surface Fitting Methods
First order Taylor series model
Polynomial Regression
Linear
Quadratic
Cubic
Kriging Interpolation
Artificial Neural Network
Multivariate Adaptive Regression Splines (MARS)
Interfacing DAKOTA with Other Simulation Codes
DAKOTA Input File Format
Variables
Interface
Responses
Methods
Strategy
Interfacing Mechanisms in DAKOTA
Interfacing with an application (Computational Simulation code)
System Calls
Interfacing with an approximation
(Surrogate model)
Forks
Direct Function
In DAKOTA, there are two different strategies for interfacing i.e., interfacing with an application and
interfacing with an approximation
Global
Local
Multipoint
Hierarchical
Capabilities (Parallel Computing)
Single Program Multiple Data parallel programming model
MPI and MPI_COMM_WORLD
Parallelism levels
Algorithmic coarse grained
Independent function evaluations
Algorithmic fine grained
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
46.0322.11 xxxx
Objective Function: Minimize the weight of Truss
F(x1, x2, x3, x4) =
Test cases – Weight Optimization
Weight optimization of a truss structure under vertical load A truss structure
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
Best data captured at function evaluation 112
Optimization Results
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
Total Wall Clock = 0.806 seconds
Gradient based method (CONMIN_MFD) was applied
weight
20
,00
0 kg
Mathematically :x1
x2
x3
x4
Cross sectional area of the truss members (x1, x2, x3, x4) are design variables
Vertical deflection constraint and certain end constraints are applied
Test case – Handling extreme non-linearity
A surface plot of the objective function
22
21
21
221
)5.0(*16)6.0(*91
1
))1*3(*66(
))*4.5cos(25.1(*7.1),(
xxx
xxxf
Gradient based and Non-Gradient based methods were applied
Multi-Level hybrid optimization was applied
Surrogate based Optimization (SBO) which employs data-sampling,
metamodeling and optimization techniques was used.
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
Gradient based optimization with different initial points using OPT++
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
Effect of population size on GA
Objective : Find the most optimal solution on a non-linear (real world) response surface
Mathematically
* % error = 100*/ realrealsbo fff
realf = -1.0696
Comparison of accuracy of surface fitting methods
Fitting method x1 x2 % error*
quadratic poly. -0.5007 -0.5076 -1.0024 6.28
cubic poly. -0.5788 -0.4918 -1.0675 0.19
kriging -0.5981 -0.5130 -1.0675 0.19
MARS -0.5659 -0.4802 -1.0555 1.32
ANN -0.5530 -0.4685 -1.0381 2.95
No. of samples x1 X2 % error
20 -0.5969 -0.5181 -1.0654 0.39
30 -0.5981 -0.5130 -1.0675 0.19
40 -0.5957 -0.5019 -1.0695 0.01
Effect of number of samples in LHS on the solution (Kriging)
sbof
sbof
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
Multilevel hybrid optimization
Test case – DAKOTA coupled with in-house solvers
Generalized grid of the airfoil
Job file
Input File Results File
Input File
Variables File
History File
DAKOTA
Script File
Inhouse(Flow Solver)
Black-box interface of DAKOTA and Flow solver
Extract data
Alter
Run
Extracted data
Waits for
DAKOTA interface with a Inhouse CFD flow solver
Objective Function: Maximize Coefficient of Lift CL
Design Variable: Angle of attack (ALPHA)
Side constraint: 0o ALPHA 13o
Gradient based method (CONMIN_FRCG) is used
FORK Application Interface is used
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.
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
Conclusion
strategy, \single_method \
# graphics \tabular_graphics_data
method, \conmin_mfd \convergence_tolerance = 1e-4 \
# conmin_frcg \# optpp_q_newton \# optimization_type minimize
variables, \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
interface, \application, system \
# application direct \ analysis_driver = 'a.out' \ parameters_file = 'test.in' \ results_file = 'test.out' \ file_tag
responses, \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 for Truss design (Gradient based method)
Input File – Truss design
strategy, \single_method \
graphics \tabular_graphics_data
method, \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
variables, \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‘interface, \ application fork, \ analysis_driver = 'a.out' \
parameters_file = 'sgopt-real.in' \ results_file = 'sgopt-real.out' \ file_tagresponses, \
num_objective_functions = 1 \no_gradients \no_hessians
Non - Gradient based method
Input File – Handling Extreme non-linearity
strategy, \graphics \tabular_graphics_data \multi_level uncoupled \method_list = 'GA' 'PS' 'NLP'
method, \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
method, \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
method, \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, \id_interface = 'I1' \application fork, \ analysis_driver= 'a.out' \ parameters_file= 'multilevel.in' \ results_file= 'multi.out' \ file_tag
variables, \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'
responses, \id_responses = 'R1' \num_objective_functions = 1 \no_gradients \
no_hessiansresponses, \
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
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
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 \
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).
method, \ id_method = 'SAMPLING' \ model_type single \ interface_pointer='TFN' \ responses_pointer='TFN_GRAD‘ \ dace lhs \ seed = 123 \ samples = 30 \
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 \
Surrogate Based Optimization
Input File – Handling Extreme non-linearity