A Core Course on Modeling

1 / 32

# A Core Course on Modeling - PowerPoint PPT Presentation

A Core Course on Modeling. Week 5 – Roles of Quantities in a Functional Model. ACCEL (continued) a 4 categories model dominance and Pareto optimality strength algorithm Examples. A Core Course on Modeling. Week 5 – Roles of Quantities in a Functional Model. ACCEL: a four-categories model.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'A Core Course on Modeling' - duff

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

• ACCEL (continued)
• a 4 categories model
• dominance and Pareto optimality
• strength algorithm
• Examples

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

2

• to-do list keeps track of incomplete expressions
• to-do list empty: script is compiled
• script compiles correctly: script starts running

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

• quantities are automatically categorized:
• x=17  constant: cat. III
• x=slider(3,0,10)  user input: cat I
• x not in right hand part:  output only: cat. II
• otherwise:  cat. IV

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

4

• Category I:
• slider (number), checkbox (boolean), button(boolean event), input (arbitrary), cursorX, cursorY, cursorB
• cannot occur in expressions:

a=slider(10,0,20) *p

• slider with integer parameters gives integer results
• slider with 1 float parameter gives float results

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

5

• Category I:
• to use slider for non-numeric input:

r=[ch0, ch1, ch2, …, chn]

myChoice=slider(0,0,n)

p=r[myChoice]

(p can have arbitrary properties)

http://www.gulfdine.com/McDonald's_Markiya

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

6

• Category II:
• all cat.-II quantities are given as output
• dynamic models: p = f( p{1}, q{1} ) :

p is not in cat.-II

• to enforce a quantity in cat.-II: pp = p
• visual output with 'plot()'; this is a function and produces output  cat.-II (usually 'plotOK')

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

7

• Category II:
• in IO/edit tab: show / hide values: values of all quantities
• results output: (too …) few decimals

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

8

• Category III:
• cat.-III is automatically detected for numbers or strings
• Cat-III is detected for expressions with constants only:

X = 3 * sin (7.14 / 5)

• don't use numerical constants in expressions:

x = pricePerUnit * nrUnits

x = 3.546 * nrUnits

x = 2 * PI * r (built-in constants: PI and E)

why not?

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

9

• Category IV:
• Expressionsshouldbesimple as possible:
• Prefery = x * p, p = z + t over y = x * (z+t)
• when in doubt: inspect!
• make temporary cat.-II quantity
• (even) better trick:

next week

image: http://shyatwow.blogspot.nl/2010/11/bug-day-inspect-bugs.html

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

10

• Category IV:
• efficiency: re-use common sub-expressions
• consider user defined functions

image: http://mewantplaynow.blogspot.nl/

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

11

• Category IV:
• efficiency: re-use common sub-expressions
• consider user defined functions

u = a + b*log(c)*sin(d)

v = e + b*log(c)*sin(d)

term = b*log(c)*sin(d)

u=a + term

v=e + term

re-using same value

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: a four-categories model

12

• Category IV:
• efficiency: re-use common sub-expressions
• consider user defined functions

u = a + b*log(c)*sin(d)

v = e + p*log(q)*sin(r)

term(x,y,z) = x*log(y)*sin(z)

u = a + term(b,c,d)

v = e + term(p,q,r)

re-using same thinking

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: dominance & pareto optimality

13

image: http://hellnearyou.blogspot.nl/2010/06/aspria-managers-want-submission-from.html

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

ACCEL: dominance & pareto optimality

14

Dominance

• Ordinal cat.-II quantities:
• C1dominates C2 C1.qi is better than C2.qi for all qi;
• ‘better’: ‘<‘ (e.g., waste) or ‘>’ (e.g., profit);
• more cat.-II quantities: fewer dominated solutions.

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

ACCEL: dominance & pareto optimality

15

q2

(e.g., waste)

C3

Dominance

• Ordinal cat.-II quantities:
• C1dominates C2 C1.qi is better than C2.qi for all qi;
• ‘better’: ‘<‘ (e.g., waste) or ‘>’ (e.g., profit);
• more cat.-II quantities: fewer dominated solutions.

C2

C1 dominates C2

C1

C1 dominates C3

C2,C3: no dominance

q1(e.g., profit)

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

ACCEL: dominance & pareto optimality

16

Dominance

• Only non-dominated solutions are relevant
• Dominance: prune cat.-I space;
• More cat.-II quantities: more none-dominated solutions
•  nr. cat.-II quantities should be small.

image http://ornamentalplant.blogspot.nl/2011/07/trimming-pruning.html

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: dominance & pareto optimality

17

Dominance in ACCEL

• y=paretoMax(expression)  enlist for maximum
• y=paretoMin(expression)  enlist for minimum
• To use Pareto algorithm, express all conditions into penalties
• For inspection of the results: Paretoplot

paretoHor(x)

paretoVer(x)

A Core Course on Modeling

Week 5 – Roles of Quantities in a Functional Model

ACCEL: dominance & pareto optimality

18

Dominance in ACCEL

myArea=paretoHor(paretoMax(p[myProv].area))

myPop=paretoVer(paretoMin(p[myProv].pop))

p=[Pgr,Pfr,Pdr,Pov,Pgl,Put,Pnh,Pzh,Pzl,Pnb,Pli]

myProv=slider(0,0,11)

myCap=p[myProv].cap

Pfr=['cap':'leeuwarden','pop':647239,'area':5748.74]

. . .

Pli=['cap':'maastricht','pop':1121483,'area':2209.22]

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

ACCEL: dominance & pareto optimality

19

Dominance in ACCEL

• Dominated areas: bounded by iso-cat.-II quantitiy lines;
• Solutions in dominated areas: ignore;
• Non-dominated solutions: Pareto front.

D

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

ACCEL: strength-algorithm

20

image: http://www.usdivetravel.com/T-BolivianAndesExpedition.html

Optimization in practice

• Find 'best' concepts in cat.-I space.
• Mathematical optimization: single-valued functions.
• The 'mounteneer approach';
• Only works for 1 cat.-II quantity.

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

ACCEL: strength-algorithm

21

Optimization in practice

• Eckart Zitzler: Pareto + Evolution.
• genotype = blueprint of individual (‘cat.-I’);
• genotype is passed over to offspring;
• genotype phenotype, determines fitness (‘cat.-II’);
• variation in genotypes  variation among phenotypes;
• fitter phenotypes  beter gene-spreading.

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

ACCEL: strength-algorithm

22

Optimization in practice

• Start: population of random individuals (tuples of values for cat.-I quantities);
• Fitness: fitter when dominated by fewer;
• Next generation: preserve non-dominated ones;
• Complete population: mutations and crossing-over;
• Convergence: Pareto front stabilizes.

image: http://www.freakingnews.com/Mutation-Pictures---2317.asp

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

ACCEL: strength-algorithm

23

Optimization in practice: caveats

• Too large % non-dominated concepts: no progress;
• Find individuals in narrow niche: problematic;
• Analytical alternatives may not exist
• Need guarantee for optimal solution  DON’T use Pareto-Genetic.

image: http://glup.me/epic-fail-pics-serie-196

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

ACCEL: strength-algorithm

24

Optimization in practice: brute force

• If anything else fails:
• local optimization for individual elements of the Pareto-front;
• Split cat.-I space in sub spaces if model function behaves different in different regimes;
• Temporarily fix some cat.-IV quantities (pretend that they are in category-III).

http://www.square2marketing.com/Portals/112139/images/the-hulk-od-2003-resized-600.jpg

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

Examples

25

paretoMax

paretoMax

paretoMin

Optimal province:

spaciousness = area / population

or

area

population

1 cat.-II quantity

2 cat.-II quantities

meaningful quantity, related to purpose

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

Examples

26

paretoMin

paretoMin

paretoMin

Optimal street lamps:

efficiency = power * penalty

or

power

penalty

not too much light

not too little light

1 cat.-II quantity

2 cat.-II quantities

contrived quantity, not related to purpose

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

Examples

27

Optimal street lamps:

dL=slider(25.5,5,50)

h=slider(5.5,3,30)

p=slider(500.1,100,2000)

intPenalty=paretoMin(paretoHor(-min(minP,minInt)+max(maxP,maxInt)-(maxP-minP)))

. . .

problem: too slow to do optimization

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

Examples

28

Optimal street lamps:

dL=slider(25.5,5,50)

h=slider(5.5,3,30)

p=slider(500.1,100,2000)

intPenalty=paretoMin(paretoHor(-min(minP,minInt)+max(maxP,maxInt)-(maxP-minP)))

. . .

• Minimal intensity computed by the model
• Minimal intensity to see road marks
• Maximal intensity computed by the model
• Maximal intensity tnot to be blinded

problem: too slow to do optimization

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

Examples

29

Optimal street lamps:

dL=slider(25.5,5,50)

h=slider(5.5,3,30)

p=slider(500.1,100,2000)

intPenalty=paretoMin(paretoHor(-min(minP,minInt)+max(maxP,maxInt)-(maxP-minP)))

. . .

problem: awkward metric in cat.-II space

problem: too slow to do optimization  use symmetry

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

Examples

30

intPenalty

minInt

maxInt

Optimal street lamps:

dL=slider(25.5,5,50)

h=slider(5.5,3,30)

p=slider(500.1,100,2000)

intPenalty=paretoMin(paretoHor(log(0.00001-min(minP,minInt)+max(maxP,maxInt)-(maxP-minP))))

. . .

minP

maxP

problem: awkward metric in cat.-II space  scale penalty

problem: border optima ???

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

Examples

31

Optimal street lamps:

dL=slider(25.5,5,50)

h=slider(5.5,1,30)

p=slider(500.1,50,2000)

intPenalty=paretoMin(paretoHor(log(0.00001-min(minP,minInt)+max(maxP,maxInt)-(maxP-minP))))

. . .

problem: border optima ???  expand cat.-I ranges

A Core Course on Modeling

Week 5-Roles of Quantities in a Functional Model

Examples

32

Optimal street lamps:

Summary:

• check if model exploits symmetries
• check if penalty functions represent intuition
• check if optima are not on arbitrary borders
• keep thinking: interpret trends (h 0, l0 … 1D approximation …?)