1 / 32

A Core Course on Modeling

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.

duff
Télécharger la présentation

A Core Course on Modeling

An Image/Link below is provided (as is) to download presentation 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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')

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

  8. 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?

  9. 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

  10. 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/

  11. 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

  12. 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

  13. 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

  14. 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.

  15. 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)

  16. 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

  17. 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)

  18. 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]

  19. 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

  20. 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.

  21. 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.

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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

  27. 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))) roadLength=40 roadWidth=15 . . . problem: too slow to do optimization

  28. 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))) roadLength=40 roadWidth=15 . . . • 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

  29. 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))) roadLength=40 roadWidth=2 . . . problem: awkward metric in cat.-II space problem: too slow to do optimization  use symmetry

  30. 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)))) roadLength=40 roadWidth=2 . . . minP maxP problem: awkward metric in cat.-II space  scale penalty problem: border optima ???

  31. 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)))) roadLength=40 roadWidth=2 . . . problem: border optima ???  expand cat.-I ranges

  32. 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 …?)

More Related