Building Models Project identification Assumptions Flow diagrams - - PowerPoint PPT Presentation

building models
SMART_READER_LITE
LIVE PREVIEW

Building Models Project identification Assumptions Flow diagrams - - PowerPoint PPT Presentation

Building Models Project identification Assumptions Flow diagrams Sources of equations Graphical Methods Solving equations Project identification Set realistic goals! Model what? ENVIRONMENT MODEL Exponential Growth


slide-1
SLIDE 1

Building Models

  • Project identification
  • Assumptions
  • Flow diagrams
  • Sources of equations
  • Graphical Methods
  • Solving equations
slide-2
SLIDE 2

Project identification

Set realistic goals! Model what?

MODEL ENVIRONMENT

slide-3
SLIDE 3

Exponential Growth Model

Assume rate of growth is proportional to quantity present Continuous time, deterministic

dp dt = ap p(t) = p0eat

Discrete time, deterministic pt+1 = bpt p(t) = p0bt Continuous time, stochastic Prob{p(t + δt) = p(t) + 1} = cp(t)δt Prob{p(t + δt) = p(t) − 1} = dp(t)δt E[p(t)] = p0e(c−d)t

slide-4
SLIDE 4

Deterministic and stochastic models

General birth-death dp(t) dt = b(p) − d(p) , Event Effect on population, p Probability of Event Birth p(t + δt) = p(t) + 1 b(p)δt Death p(t + δt) = p(t) − 1 d(p)δt No change p(t + δt) = p(t) 1 − b(p)δt − d(p)δt

slide-5
SLIDE 5

Exponential Growth Model

Spatial model

λp model Movement between patches Spatial, colony or meta−population model

  • Non−spatial

Figure 1: A schematic description of a spatial model

slide-6
SLIDE 6

Assumptions

Framework State explicitly Relevance of simplifications Limit applications

slide-7
SLIDE 7

Flow Diagrams

Pictorial representation of model structure Use standard symbols, or set a logical puzzle! ✷ state or level variables source or sink → channel of material flow channel of information flow ✶ control on rate of flow

slide-8
SLIDE 8

Energy Model for Cattle Growth

Assume the only relevant information about an animal is its liveweight, W Assume the only source of energy is food intake, I Assume energy is lost either as a result of maintenance (M)

  • r due to converting food to body tissue

W is a state variable, I is a source, M is a sink

slide-9
SLIDE 9

Flow Diagram for Energy Model

INTAKE (I) (M) STORED CHEMICAL ENERGY (W) CONVERSION R3 R5 R4 R2 R1 CONSTRAINTS R1 + R2 = M R1 + R3 = I R3 = R4 + R5 LIVEWEIGHT MAINTENANCE

slide-10
SLIDE 10

Sources of Equations

Literature Analogy with existing models Data analysis

slide-11
SLIDE 11

Diffusion

Used to describe the random spread of objects in space from areas of high density to areas of low density With large numbers of objects, the partial differential equation

∂c ∂t = D ∂2c ∂x2 describes the change well.

t = 10 DENSITY (c) SPACE (x)

slide-12
SLIDE 12

Estimating relationships from data

  • 100
  • 200
  • 300
  • 400
  • 500
  • 600
  • 10

20 30 40 50

Maintenace=F+0.0043W Liveweight W (Kg)/1.08 F=0.53(W/1.08)

0.67

Fasting metabolism (MJ/d)

slide-13
SLIDE 13

Meta-analyses

Energy Content of Weight Gain 46 published equations for the linear regression of log Protein on log Liveweight AND log Fat on log Liveweight need to summarize these by “average” equations OR must decide which equation is most appropriate

slide-14
SLIDE 14

Graphical Methods for Differential Equations

Based on the approximation

dy dt = {y(t+δt)−y(t)} δt

Observations yi at times ti, calculate

(yi+1−yi) (ti+1−ti)

and plot this against y or t

slide-15
SLIDE 15

Logistic growth a population data

0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.1 0.2 0.3 0.4 0.0 5.0 10.0

  • 15.0

20.0

  • 0.0

0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 5.0 10.0

  • 15.0

20.0

  • −4.0

−3.0 −2.0 −1.0 0.0

y time time (yt+1+yt)/2 (yt+1+yt)/2 log(y) (log(yt+1)−log(yt))/δt (yt+1−yt)/δt

slide-16
SLIDE 16

For data from some growth curves, find {log(yi+1 − log(yi}/(ti+1 − ti) ≈ A − Byi Why should this be?

d(log y) dt

= 1

y dy dt = A − By dy dt = y(A − By)

This is the logistic growth curve

slide-17
SLIDE 17

Solving Equations

Mathematival solutions exist for linear, deterministic equations

dy dt = ay; y = y(0)eat dy dt = ay + bz dz dt = cy + dz

Mathematical solution of non-linear equations is much more difficult

slide-18
SLIDE 18

Numerical Solution of Model Equations

Computer intensive Approximate Case specific Model structure less critical

slide-19
SLIDE 19

Euler’s Method

Assume dy

dt is constant over short time intervals

y(ti+1) ≈ yi + (ti+1 − ti)dy

dt|ti

Often, ti+1 − ti is held constant, called the step size

t0 y0 y t

slide-20
SLIDE 20

Fourth Order Runge-Kutta (RK4)

Uses an average of dy

dt over the interval from ti to ti+1

Achieves much greater accuracy than assuming dy

dt is constant

However, if vastly different time scales use stiff ODE solver, e.g., Rosenbrock

slide-21
SLIDE 21

Numerical Approximation of cos(t)

cos(t) an exact solution to second order ODE

d2y dt2 = −y

Re-write as system of first order ODE’s

dy dt = z dz dt = −y

Solution will be unit circle in y-z phase space

slide-22
SLIDE 22

Numerical estimation of the cosine function

  • 10
  • 20
  • 30
  • −5

−3 −1 1 3 5

Euler RK4 Exact

slide-23
SLIDE 23

Stochastic simulation (approximate)

General birth-death Event Effect on population, p Probability of Event Birth p(t + δt) = p(t) + 1 b(p)δt Death p(t + δt) = p(t) − 1 d(p)δt No change p(t + δt) = p(t) 1 − b(p)δt − d(p)δt Update time: t → t + δt and draw y ∼ U(0, 1) Birth if y < b(p)δt else Death if y < b(p)δt + d(p)δt else No event