Optimisation tools beyond QMC · The Black Box QMC in the Apuan Alps VII, 28 July – 3 August...

Post on 02-Oct-2020

0 views 0 download

Transcript of Optimisation tools beyond QMC · The Black Box QMC in the Apuan Alps VII, 28 July – 3 August...

Optimisation tools beyond QMC

Mariapia Marchi (Numerical Methods Group, Esteco S.p.A, Trieste, Italy)

Outline

• Introductory shopping list: nomenclature, multi-

objective optimisation problems and Pareto

dominance,…

• Brief overview of genetic algorithms in general

• MOGAII and NSGAII

• Just to play a little bit…

• Few applications: integration of modeFRONTIER in

material modelling studies

• Conclusions

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Inputs & Outputs

• Input variables: quantities that a designer can vary or choices

that he/she can make.

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

• Continuous variables:

• point coordinates

• process variables,…

• Discrete variables:

• components from a catalogue

• number of components,…

• Objectives: response parameters, i.e. the quantities that the

designer wish to be MAX or MIN

• MAX

• Efficiency, performance, …

• MIN

• Cost, weight, …

( A MAX problem can always be transformed into a MIN problem )

• Constraints: restrictions and limits the designer must meet due

to norms, functionalities, etc. They define a feasible region. General constraints

• Max admissible stress, deformation, acceleration, … • Min performance, ….

Constraints on variables • Total volume, thickness, weight, … • Relations holding between

variables, …

Multi-objective optimisation problems: def.

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

OBJECTIVES

CONSTRAINTS

OPTIMISATION PROBLEM

If k > 1 and conflicting objectives, then MULTI-OBJECTIVE!!

Can be reduced to a single-obj. opt. probl.

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Weighted Function: n objectives can be added in a single objective using weights: F(x) = w1*Obj1+w2*Obj2+wj3*Obj3... Pro:

simple formulation

weights are problem-dependent and must be empirically defined (which value?) weights are connected to objective values and might lose significance for different physics (how to sum pears with apples?)

Multi-objective formulation is generally more accurate and is to be preferred

Multi-Objective Optimisation Problems: solution

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Dominated design: exist solutions with better (lower)

values of both objectives

Pareto front: no solutions exist with better values for both objectives

Pareto-Frontier, set of optimal solutions:

Pareto dominance

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Pareto Dominance:

Design a dominates Design b if:

[f1(a) <= f1(b) and f2(a) <= f2(b)...and fn(a) <= fn(b)]

and

it exists i in {1,…,n} such that fi(a) < fi(b)

• In the Pareto frontier none of the components can be improved without deterioration of at least one of the other components.

• Pareto dominance for one objective coincides with a classical optimization approach.

• Pareto dominance defines a group of efficient solutions: in case of n objectives, the group of efficient solutions contains at Max ∞(n-1) points

Robustness vs. Accuracy

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Accuracy measures the capability of the optimisation algorithm

to find the function’s extreme.

x Xreal Xfound

x Xreal Xfound

Robustness is the ability of an optimisation algorithm to reach the absolute extreme of an objective function.

x

Robust algorithms reach global extremes

Non-Robust algorithms get stuck in local extremes

• Genetic Algorithms use the analogy of natural selection and reproduction as an optimisation target.

PRO:

high robustness, multi-objective optimisation is possible, independence from structure of constraints and objectives (no derivatives!), ability

to locate global optimum

CON:

low convergence rate if high accuracy is required, high computational cost

Genetic Algorithms – general overview

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Genetic algorithms: parallelism with evolution

• Genetic algorithms loosely parallel biological evolution

and are based on Darwin’s theory of natural selection.

• The specific mechanics of the algorithms involve the

language of microbiology and, in developing new

potential solutions, mimic genetic operations.

• A population represents a group of potential solution

points.

• A generation represents an algorithmic iteration.

• A chromosome is comparable to a design point, and a

gene is comparable to a component of the design

vector.

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Genetic Algorithms: basics

Combination between designs (input parameters):

CROSSOVER, MUTATION, …

Initial screening of designs

starting population

Design Parameters

Value

1 220

2 1.34

… …

n 0.978

One generic design (individual)

SELECTION of best designs

- fitness criteria for S.O. cases

- dominance criteria for M.O. cases

Repeat loop

Encoding problem: Binary representation Continuous operators

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

• Individual : a configuration with associated variables and objectives

• Main operators

1) Selection

2) Cross-over

3) Mutation

i

m

ii

n

i

th

mn

ffxx

individuali

f

,,,,

:

11

Problem Definition

Definition of objectives

First Generation definition (D.O.E.)

Evaluation of designs

Parent set definition (dominance)

Creation of the next generation

Genetic operations to create children

Basic flow-chart

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Scope : • transfer the best characteristics to the next generation by

selecting design vectors from the current generation to be used in the next generation

• probability of selection proportional to fitness function (single objective) or domination criteria (multi-objective)

Selection

Local selection

F1 > F2 > F3 > F4

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Classical Cross-Over Directional Cross-over

Scope : • Define a new individual for next generations, keeping

best information of parents

CROSS-OVER

Binary crossover Directional crossover

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Scope :

• Operator used to avoid premature convergence, it

makes a random modification of one variable

Mutation

Single-point Crossover

Single-point Mutation

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

DOE & Schedulers

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

MOGA II

• C. Poloni and V. Pediroda, GA coupled with

computationally expensive simulations: tools to

improve efficiency. In Genetic Algorithms and

Evolution Strategies in Engineering and Computer

Science, pages 267–288, John Wiley and Sons,

England, 1997.

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

MOGA II: Parent definition & Elitism enabled

……..

i-th generation (n individuals)

……..

Not dominated-designs from all Design Space (ONLY IF ELITISM ENABLED)

…….. …….. Put two sets together

…….. Parent set randomly reduced to size n

Parent set ready for genetic operations

Definition of parent set at each generation – Elitism enabled

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

MOGA-II constraint handling

G(x)

P(G(x))

0

Tolerance = 0

Tolerance ≠ 0

Adaptive Penalty

t

Adaptive penalty is scaled in function of the range of variation of the function

Note: always normalise constraints! Otherwise, G(x) is influenced by higher scale ones

• G(x) is sum of constraint violations

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

NSGA-II

NSGA-II = Non-dominated Sorting Genetic Algorithm II

developed by K. Deb – KanGAL.

• It is a fast and elitist multi-objective evolutionary

algorithm.

References:

• [1] Deb, K., Pratap, A., Agarwal, S., and Meyarivan, T. 2000, A Fast and Elitist Multi-

Objective Genetic Algorithm-NSGA-II, KanGAL Report Number 2000001

• [2] Deb, K. and Agrawal, R. B. 1995, Simulated binary crossover for continuous search

space, Complex Systems, 9, 115

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

NSGA-II

Main features:

• A fast and clever non-dominated sorting procedure is

implemented: cost is O(MN^2), M= #obj. and N =pop.

• It implements elitism for multi-objective search, using

an elitism-preserving approach.

• A parameter-less diversity preservation mechanism is

adopted. Diversity and spread of solutions is

guaranteed without use of sharing parameters,

adopting a suitable parameter-less niching approach.

• The constraint handling method does not make use of

penalty parameters.

• NSGA-II allows both continuous ("real-coded") and

discrete ("binary-coded") design variables.

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

NSGA II: Parent set &Elitism

……..

…….. (i-1)-th generation (n individuals)

i-th generation (n individuals)

…….. …….. Parent set originally made by last 2 generations (2*n individuals)

Ranking definition (next slide) …….. …….. 1 2 3 4 5 6 7 8

…….. 1 2 3 4 Keep in parent set only the first best n designs

Parents ready for genetic operations

Definition of parents at each generation - Elitism

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

NSGA II: Ranking procedure and selection fitness

1

2

3 4

5

Max f1

Max

f2

• First, define front order: • 4 is better than 5 because dominates it

• 1,2,3 are better than 4 because dominate it

• Second, crowding distance parameter:

order the points of same front maximising their mean reciprocal distance: 1 is the best point since it is located in the less crowded region, 3 is the worst.

Ranking procedure for parent set definition and selection fitness

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

NSGA II: constraint handling

•No penalty function is defined, but constraints are taken into account directly during ranking procedure

• If A and B are both feasible, ranking is defined as before (first front order, then crowding distance)

• If A is feasible and B is unfeasible, rank(A) is always higher than rank(B)

• If A and B are both unfeasible, higher ranking is assigned to designs with lower sum of constraints violation

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Applications

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

• Just to play a little bit

• Applications to material

modelling

Ground state energy of a 2DEG

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Energy as a functional of 𝑟𝑠 e ζ

Tw

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

1 valley: C. Attaccalite, S. Moroni, P. Gori-Giorgi, G.B. Bachelet, PRL 88, 256601 (2002)

2 valleys: MM, S. De Palo, S. Moroni, G. Senatore, PRB 80, 035103 (2008)

A couple of tests…

TEST 1:

Minimisation of 𝐸 𝑟𝑠, ζ for 2valley case (single obj.)

Minimum found for 𝑟𝑠 = 0.97 and ζ = 0 (as expected).

TEST 2:

Minimisation of 𝐸1𝑣 𝑟𝑠, ζ and 𝐸2𝑣 𝑟𝑠, ζ (multi-obj).

A Pareto front is found.

Optimal solutions have ζ = 0 and 𝑟𝑠 close to the extreme

value for 2v system.

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Concepts behind modeFRONTIER

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

• Input Variables: Entities defining the

design space

• A Black Box: Generates the outputs

according to the inputs

• Output Variables: Measures from the

system

The Black Box

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

• The black box can be:

• A set of solvers that model and solve numerically the

design problem (e.g. CAD/CAE tools)

• A set of experiments that produce data

Multi-disciplinary Scenario

CFD (StarCD, Fluent,

CFX)

Others (In-House codes, MATLAB, Excel)

CAD (CATIA, UGS,

PROE)

FEM (Nastran, Ansys, Madymo, etc)

Optimisation workflow

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Optimisation workflow

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

BLACK BOX

The following two examples are taken from:

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Example 1: Composite materials

MOTIVATION: Effective stiffness of composites consisting of a polymer and two fillers of different particle size not predicted correctly by additive approach. From: Non-Additive Effects in the Elastic Behavior of Dental Composites, M. Wissler, H.R. Lusti, C. Oberson, A.H. Widmann-Schupak, G. Zappini, A.A. Gusev. Advanced Engineering Materials Vol 5, 113–116, March, 2003

Particular case: GLASS BEAD COMPOSITES • Easier processing

• Better surface properties (scratch, abrasion resistance)

• Good dimensional stability

• Cheaper than fibres

• But worse mechanical properties

• What is the best compromise?

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Modellisation

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

15% beads: small reduction in strength

DIGIMAT-MF integration in modeFrontier

• Variation of glass

bead fraction

• Minimize thermal

anisotropy.

• Maximize stress

at full load as

indicator of

strength.

Future: Integration of atomistic level?

Results

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Bubble size indicates amount of glass beads

Example 2: atomistic modelling in engineering

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Tipical procedure in ATOMISTIC MODELLING WORKFLOWS:

ENGINEERING-OPTIMISED workflow:

Multi-objective optimization in atomistic modelling of adsorbents

Characteristics of this study

• Molecular simulation approach allows shortening time

and effort to generate physical properties used in

process development.

• Specialised Force-Fields that realistically describe gas

adsorption (pure compounds and mixtures) in well

defined zeolite adsorbents are needed.

• modeFRONTIER is used to obtain optimised Force-

Fields.

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Pseudo-experimental data for gas adsorption in zeolites

Few details

• Zeolite structure from experimental data (mostly)

• Zeolite-sorbate and sorbate-sorbate interactions in terms of a Lennard-Jones interaction potential.

Workflow for force-field optimization

Forcefield optimisation with modeFrontier

Validated workflow

Adsorption of multi-component mixtures in a given

zeolite can be predicted with good accuracy,

based on the proposed workflow:

Prediction of multicomponent mixture adsorption

modeFrontier optimised, specialized forcefield: match single component and few multicomponent experiments

Atomistic simulation of single gas adsorption

Exper. adsorption isotherms: several gases, range of T,p

Conclusions

• Genetic algorithm are robust optimisation tools which

can deal efficiently with multi-objective optimisation

problems.

• Useful applications in material modelling, combined

together with mF workflow

• I would like to investigate other physical applications

related to QMC…

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Recently published papers on Genetic algorithms & QMC

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Aknowlegments

• Mike (for his invitation)

• My chief (for letting me go !)

• The marketing group (for help in finding material)

• Danilo Di Stefano (for useful discussions)

• Gerhard Goldbeck (for his slide material)

• THANK YOU FOR YOUR ATTENTION!

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

QMC in the Apuan Alps VII, 28 July – 3 August 2012, Vallico di Sotto (Italy)

Input for simulations, GC-MC method

Experimental data and simulations