CS 170: Computing for the Sciences and MathematicsAdministriviaUnconstrained GrowthExample of Unconstrained GrowthAnalytic SolutionExponential DecayWhere’s The Computation?Finite difference equationApproximating Unconstrained GrowthSystems Dynamics ToolStock/Box Variable/ReservoirFlowConverter/Variable/FormulaConnector/Arrow/ArcWith system dynamics toolHOMEWORK!Unconstrained Growth and DecayCS 170:Computing for the Sciences and MathematicsAdministriviaLast timeError and Basic differential calculusAssigned HW 2TodayHW2 due!Unconstrained GrowthWE HAVE CLASS ON MONDAYUnconstrained GrowthPopulation growth without constraintsExamples?Example of Unconstrained GrowthRate of change of population is directly proportional to number of individuals in the population (P)dP/dt = rPwhere r is the growth rate.Analytic Solution“Closed Form” solutionCan determine with a computer algebra systemLike MapleP = P0ertExponential DecayRate of change of mass of radioactive substance proportional to mass of substanceConstant of proportionality(rate) is negativeRadioactive Carbon-14: -0.000120968(about .0120968% per year)dQ/dt = -0.000120968 QQ = Q0 e-0.000120968tWhy Carbon-14?Where’s The Computation?An analytic solution is always preferable!But…finding it can be very hardInstead of solving the relationship, we’ll approximate it.Finite difference equationnew = old + changepopulation(t) = population(t - ∆t) + ∆populationIf I repeat this calculation a lot (moving the time up a bit each pass), I can see the trend of population over timeApproximating Unconstrained Growthinitialize simulationLe ng th, population, growth Rate, ∆tnumIterations simulationLength / ∆tfor i going from 1 to numIterations do the following:growth growthRate * populationpopulation population + growth * ∆tt i * ∆tdisplay t, growth, and populationUNITS ARE IMPORTANTDoes this give me the exact answer?Systems Dynamics ToolHelps to modelPerforms simulationWhat happens at one time step influences what happens at nextStock/Box Variable/ReservoirAnything that accumulates, buffer, resourceExamplesPopulationRadioactivityPhosphateBody fatLaborFlowRepresents activitiesExamplesBirthing, dying with populationIntaking & expending calories with body fatMoving from one population to anotherDiffusion ReactionsConverter/Variable/FormulaContains equations that generate output for each time periodConverts inputs into outputsTakes in information & transforms for use by another variableExamplesGrowth rate with population & growthCalories in a foodRates of reaction/diffusionConnector/Arrow/ArcLinkTransmits information & inputsRegulates flowsShows dependenceWith system dynamics toolEnter equationsRun simulationsProduce graphsProduce tablesHOMEWORK!READ Module 3.2 in the textbookYES CLASS on
View Full Document