15.08.2015 Views

Introduction to the Modeling and Analysis of Complex Systems

introduction-to-the-modeling-and-analysis-of-complex-systems-sayama-pdf

introduction-to-the-modeling-and-analysis-of-complex-systems-sayama-pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

44 CHAPTER 4. DISCRETE-TIME MODELS I: MODELINGRun this code <strong>and</strong> you should get a new window that looks like Fig. 4.1. If not, check yourcode carefully <strong>and</strong> correct any mistakes. Once you get a successfully visualized plot,you can clearly see an exponential growth process in it. Indeed, Eq. (4.12) is a typicalma<strong>the</strong>matical model <strong>of</strong> exponential growth or exponential decay. You can obtain severaldistinct behaviors by varying <strong>the</strong> value <strong>of</strong> a.1816141210864200 5 10 15 20 25 30Figure 4.1: Visual output <strong>of</strong> Code 4.9.Exercise 4.5 Conduct simulations <strong>of</strong> this model for various values <strong>of</strong> parametera <strong>to</strong> see what kind <strong>of</strong> behaviors are possible in this model <strong>and</strong> how <strong>the</strong> value <strong>of</strong> adetermines <strong>the</strong> resulting behavior.For your information, <strong>the</strong>re are a number <strong>of</strong> options you can specify in <strong>the</strong> plot function,such as adding a title, labeling axes, changing color, changing plot ranges, etc. Also,you can manipulate <strong>the</strong> result <strong>of</strong> <strong>the</strong> plotting interactively by using <strong>the</strong> icons located at <strong>the</strong>bot<strong>to</strong>m <strong>of</strong> <strong>the</strong> plot window. Check out matplotlib’s website (http://matplotlib.org/) <strong>to</strong>learn more about those additional features yourself.In <strong>the</strong> visualization above, <strong>the</strong> horizontal axis is au<strong>to</strong>matically filled in by integers startingwith 0. But if you want <strong>to</strong> give your own time values (e.g., at intervals <strong>of</strong> 0.1), you can

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!