Transcript dakota-2

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

Multidimensional Vector

Parameter Study

LHS DDACE Centered List Pseudo Monte Carlo Modern DOE Classical DOE CCD

Capabilities of DAKOTA

Sampling Methods and DOE Uncertainty Quantification Optimization Software packages Optimization Strategies

Analytic Reliability method Stochastic FE method

CONMIN

Multilevel Hybrid

Surface Fitting methods

First-order Taylor Series

Parallel Computing

AMV SGOPT Multistart Local Quadratic Polynomial AMV+ PICO Pareto Kriging Interpolation FORM APPS MINLP ANN SORM LHS Box Behnken OPT++ OUU MARS Orthogonal Array sampling NPSOL* SBO 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*

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 Flow chart of SBO

Multilevel Hybrid Different optimization algorithms at different stages Multistart Local Multiple local optima exists

DACE (data sampling)

Select design points that must be analyzed Pareto optimization Multiple sets of weights Sampling Based

Simulation

Analyze system using computational methods Optimization under Uncertainty Analytic Reliability based Stochastic Reliability based

Metamodeling

Construct approximated mathematical model (surrogate model) MINLP Branch and Bound Surrogate based optimization

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

Surface Fitting Methods

First order Taylor series model Polynomial Regression Kriging Interpolation Artificial Neural Network Multivariate Adaptive Regression Splines (MARS) Linear Quadratic Cubic

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

Variables Interface Responses Methods Strategy

Interfacing Mechanisms in DAKOTA

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 Function evaluation coarse grained Function evaluation fine grained Independent function evaluations Internal linear algebra Separable parts of a single function evaluation Solution steps within a single analysis code

Test cases – Weight Optimization

Weight optimization of a truss structure under vertical load

Objective Function: Minimize the weight of Truss Mathematically : F(x1, x2, x3, x4) =

x

1  1 .

2 

x

2 

x

3  0 .

6 

x

4 Cross sectional area of the truss members (x1, x2, x3, x4) are design variables Vertical deflection constraint and certain end constraints are applied Gradient based method (CONMIN_MFD) was applied 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

A truss structure

x2 x1 x3 weight x4 Design Variables Optimization Results Initial Point Design Variables Final Point x1 x2 x3 x4 20 cm 2 40 cm 2 10 cm 2 10 cm 2 x1 x2 x3 x4 10.63 cm 2 6.65 cm 2 10.64 cm 2 12.86 cm 2 Initial Objective function value 84 kg Final Objective function value Best data captured at function evaluation 112 Total Wall Clock = 0.806 seconds 36.97 kg

Test case – Handling extreme non-linearity

Objective : Find the most optimal solution on a non-linear (real world) response surface Mathematically

f

(

x

1 ,

x

2 )   1 .

7 * ( 6 ( 1 .

25  6 *  cos( ( 3 *

x

1 5 .

4  1 ) * 2

x

2 ) ) )  1  9 * (

x

1  0 .

6 ) 2 1  16 * (

x

2  0 .

5 ) 2  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. A surface plot of the objective function

Gradient based optimization with different initial points using OPT++

Test 1 2 3 4 initial

x 1

0.0

0.0

0.0

-0.5

initial

x 2

0.0

0.5

-0.5

0.0

optimal

x 1

0.3239

0.3312

0.3140

-0.5922

optimal

x 2

-0.012

0.5759

-0.5778

-0.5021

f

-0.7164

-0.6739

-0.7514

-1.0696

optimum local local local global population

Effect of population size on GA

optimal x 1 optimal x 2 f 200 400 600 -0.5304

-0.6359

-0.6359

-0.5013

-0.4801

-0.4801

-1.0374

-1.0454

-1.0454

computing time (sec.) 26.36

51.72

79.82

Method GA  PS  CONMIN GA  CONMIN

Multilevel hybrid optimization

optimal x -0.5925

-0.5925

1 optimal x -0.5023

-0.5023

2 f -1.0696

-1.0696

computing time (sec.) 12.45

11.44

Comparison of accuracy of surface fitting methods

Fitting method quadratic poly.

cubic poly.

kriging MARS ANN x 1 -0.5007

-0.5788

-0.5981

-0.5659

-0.5530

x 2 -0.5076

-0.4918

-0.5130

-0.4802

-0.4685

f sbo

-1.0024

-1.0675

-1.0675

-1.0555

-1.0381

% error* 6.28

0.19

0.19

1.32

2.95

Effect of number of samples in LHS on the solution (Kriging)

No. of samples 20 30 40 x 1 -0.5969

-0.5981

-0.5957

X 2 -0.5181

-0.5130

-0.5019

f sbo

-1.0654

-1.0675

-1.0695

% error 0.39

0.19

0.01

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 Input File

DAKOTA

Results File Generalized grid of the airfoil Objective Function: Maximize Coefficient of Lift C L Design Variable: Angle of attack (ALPHA) Side constraint: 0 o  ALPHA 13 o Gradient based method (CONMIN_FRCG) is used FORK Application Interface is used Extract data Input File Alter Variables File Script File Run Extracted data History File Waits for

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

strategy, #

Input file for Truss design (Gradient based method)

single_method graphics tabular_graphics_data method, # # # variables, 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

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 – Handling Extreme non-linearity

strategy,

Non - Gradient based method

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_tag responses, 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

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

Surrogate Based Optimization

\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 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 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \