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.

66 CHAPTER 5. DISCRETE-TIME MODELS II: ANALYSISax = gca(projection=’3d’)for x0 in arange(-2, 2, 1):for y0 in arange(-2, 2, 1):for z0 in arange(-2, 2, 1):initialize(x0, y0, z0)for t in xrange(30):update()observe()ax.plot(xresult, yresult, zresult, ’b’)show()Note that it is generally not a good idea <strong>to</strong> draw many trajec<strong>to</strong>ries in a 3-D phase space,because <strong>the</strong> visualization would become very crowded <strong>and</strong> difficult <strong>to</strong> see. Drawing asmall number <strong>of</strong> characteristic trajec<strong>to</strong>ries is more useful.In general, you should keep in mind that phase space visualization <strong>of</strong> discrete-timemodels may not always give images that are easily visible <strong>to</strong> human eye. This is because<strong>the</strong> state <strong>of</strong> a discrete-time system can jump around in <strong>the</strong> phase space, <strong>and</strong> thus <strong>the</strong>trajec<strong>to</strong>ries can cross over each o<strong>the</strong>r (this will not happen for continuous-time models).Here is an example. Replace <strong>the</strong> content <strong>of</strong> <strong>the</strong> update function in Code 5.1 with <strong>the</strong>following:Code 5.3: phasespace-drawing-bad.pynextx = - 0.5 * x - 0.7 * ynexty = x - 0.5 * yAs a result, you get Fig. 5.3.While this may be aes<strong>the</strong>tically pleasing, it doesn’t help our underst<strong>and</strong>ing <strong>of</strong> <strong>the</strong> systemvery much because <strong>the</strong>re are just <strong>to</strong>o many trajec<strong>to</strong>ries overlaid in <strong>the</strong> diagram. Inthis sense, <strong>the</strong> straightforward phase space visualization may not always be helpful foranalyzing discrete-time dynamical systems. In <strong>the</strong> following sections, we will discuss afew possible workarounds for this problem.

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

Saved successfully!

Ooh no, something went wrong!