Download Latest Version pycx-0.32.zip (87.1 kB)
Email in envelope

Get an email when there's a new version of PyCX

Home / PyCX-0.32 / textbook-sample-codes
Name Modified Size InfoDownloads / Week
Parent folder
bifurcation-diagram-hysteresis.py 2016-09-09 426 Bytes
bifurcation-diagram-numerical.py 2016-09-09 588 Bytes
bifurcation-diagram-pitchfork-subcritical.py 2016-09-09 477 Bytes
bifurcation-diagram-pitchfork-supercritical.py 2016-09-09 473 Bytes
barabasi-albert.py 2016-09-09 1.1 kB
bifurcation-diagram.py 2016-09-09 306 Bytes
van-del-pol-Hopf-bifurcation.py 2016-09-09 746 Bytes
voter-model.py 2016-09-09 755 Bytes
transport-ca-error.py 2016-09-09 1.5 kB
transport-ca-escaping.py 2016-09-09 1.7 kB
transport-ca-imshow.py 2016-09-09 1.2 kB
turing-pattern-PDE.py 2016-09-09 1.8 kB
SIS-model-adaptive.py 2016-09-09 1.2 kB
SIS-model-synchronous-update.py 2016-09-09 1.2 kB
SIS-model.py 2016-09-09 1.0 kB
small-world-exercise.py 2016-09-09 969 Bytes
small-world-experiment.py 2016-09-09 537 Bytes
small-world.py 2016-09-09 1.1 kB
transport-ca.py 2016-09-09 1.5 kB
read-adjlist-directed.py 2016-09-09 195 Bytes
read-adjlist.py 2016-09-09 145 Bytes
segregation.py 2016-09-09 1.2 kB
shortest-path.py 2016-09-09 371 Bytes
random-graphs.py 2016-09-09 553 Bytes
random-walk-2D-pSetter.py 2016-09-09 978 Bytes
random-walk-2D-standalone.py 2016-09-09 651 Bytes
random-walk-2D.py 2016-09-09 663 Bytes
predator-prey-abm-evolvable.py 2016-09-09 2.8 kB
predator-prey-abm-with-plot.py 2016-09-09 3.0 kB
predator-prey-continuous.py 2016-09-09 682 Bytes
pycxsimulator.py 2016-09-09 12.6 kB
plot-imshow.py 2016-09-09 173 Bytes
plot-surface-3d.py 2016-09-09 270 Bytes
plot-vector-field.py 2016-09-09 190 Bytes
predator-prey-abm.py 2016-09-09 2.6 kB
predator-prey.py 2016-09-09 596 Bytes
period-doubling-bifurcation-cobweb.py 2016-09-09 978 Bytes
phasespace-drawing-3d.py 2016-09-09 858 Bytes
phasespace-drawing-bad.py 2016-09-09 623 Bytes
phasespace-drawing-exercise.py 2016-09-09 719 Bytes
phasespace-drawing-fibonaccci.py 2016-09-09 602 Bytes
phasespace-drawing-streamplot.py 2016-09-09 222 Bytes
phasespace-drawing.py 2016-09-09 616 Bytes
plot-contour.py 2016-09-09 209 Bytes
networkx-test2.py 2016-09-09 285 Bytes
networkx-test.py 2016-09-09 739 Bytes
oscillation-correct-phasespace.py 2016-09-09 467 Bytes
oscillation-correct.py 2016-09-09 486 Bytes
oscillation-wrong.py 2016-09-09 453 Bytes
panic-ca.py 2016-09-09 947 Bytes
period-doubling-bifurcation.py 2016-09-09 529 Bytes
net-majority.py 2016-09-09 1.0 kB
net-percolation-plot.py 2016-09-09 349 Bytes
net-percolation.py 2016-09-09 237 Bytes
net-sync-analysis.py 2016-09-09 1.2 kB
network-drawing-options.py 2016-09-09 774 Bytes
network-layouts.py 2016-09-09 535 Bytes
Lorenz-equations.py 2016-09-09 1.1 kB
Lyapunov-exponent.py 2016-09-09 600 Bytes
net-diffusion-adaptive.py 2016-09-09 1.6 kB
net-diffusion.py 2016-09-09 929 Bytes
net-kuramoto-desync.py 2016-09-09 1.0 kB
net-kuramoto.py 2016-09-09 1.0 kB
net-LDR.py 2016-09-09 646 Bytes
exponential-growth-time.py 2016-09-09 473 Bytes
graph-based-phasespace-exercise.py 2016-09-09 352 Bytes
graph-based-phasespace.py 2016-09-09 387 Bytes
interactive-template.py 2016-09-09 541 Bytes
karate-club-visualization.py 2016-09-09 94 Bytes
keller-segel-abm.py 2016-09-09 1.9 kB
logisticgrowth-continuous.py 2016-09-09 481 Bytes
communities.py 2016-09-09 544 Bytes
degree-correlation.py 2016-09-09 318 Bytes
degree-distributions-loglog.py 2016-09-09 616 Bytes
exponent-estimation.py 2016-09-09 724 Bytes
exponential-growth.py 2016-09-09 312 Bytes
chaotic-behavior-butterfly-effect.py 2016-09-09 446 Bytes
chaotic-behavior.py 2016-09-09 341 Bytes
cobweb-plot-exercise.py 2016-09-09 720 Bytes
cobweb-plot-for-mfa.py 2016-09-09 797 Bytes
cobweb-plot-for-rga.py 2016-09-09 782 Bytes
cobweb-plot.py 2016-09-09 802 Bytes
bifurcation-diagram-transcritical.py 2016-09-09 433 Bytes
BZ-reaction.py 2016-09-09 2.3 kB
ca-graph-based-phasespace-pie.py 2016-09-09 655 Bytes
ca-graph-based-phasespace.py 2016-09-09 789 Bytes
ccdfs-loglog.py 2016-09-09 736 Bytes
Totals: 87 Items   81.3 kB 0
######################################################################
######################################################################
##
## PyCX 0.32
## Complex Systems Simulation Sample Code Repository
##
## 2008-2016 (c) Copyright by Hiroki Sayama
## 2012 (c) Copyright by Chun Wong & Hiroki Sayama
##          Original GUI module and simulation models
## 2013 (c) Copyright by Przemyslaw Szufel & Bogumil Kaminski
##          Extensions to GUI module, some revisions
## All rights reserved.
##
## See LICENSE.txt for more details of license information.
##
## Send any correspondences to:
##   Hiroki Sayama, D.Sc.
##   Director, Center for Collective Dynamics of Complex Systems
##   Associate Professor, Department of Systems Science and Industrial Engineering
##   Binghamton University, State University of New York
##   P.O. Box 6000, Binghamton, NY 13902-6000, USA
##   Tel: +1-607-777-3566
##   Email: sayama@binghamton.edu
##
## http://pycx.sf.net/
##
######################################################################
######################################################################


1. What is PyCX?

The PyCX Project aims to develop an online repository of simple,
crude, yet easy-to-understand Python sample codes for dynamic complex
systems simulations, including iterative maps, cellular automata,
dynamical networks and agent-based models. You can run, read and
modify any of its codes to learn the basics of complex systems
simulation in Python.

The target audiences of PyCX are researchers and students who are
interested in developing their own complex systems simulation software
using a general-purpose programming language but do not have much
experience in computer programming.

The core philosophy of PyCX is therefore placed on the simplicity,
readability, generalizability and pedagogical values of simulation
codes. This is often achieved even at the cost of computational speed,
efficiency or maintainability. For example, PyCX does not use
object-oriented programming paradigms, it does use global variables
frequently, and so on. These choices were intentionally made based on
our experience in teaching complex systems modeling and simulation to
non-computer scientists.

For more information, please see the following open-access article:
Sayama, H. (2013) PyCX: A Python-based simulation code repository for
complex systems education. Complex Adaptive Systems Modeling 1:2.
http://www.casmodeling.com/content/1/1/2


2. What's new in version PyCX 0.3 / 0.31 / 0.32?

* Przemyslaw Szufel & Bogumil Kaminski at the Warsaw School of
  Economics made a substantial improvement to the "pycxsimulator.py"
  GUI module, implementing interactive control of model and
  visualization parameters. This improvement is fully backward
  compatible, so you can run old PyCX 0.2 simulator codes with this
  new GUI module.

* Several new sample simulation codes were added, including:

    Contributions by Przemyslaw Szufel & Bogumil Kaminski:
    - "abm-schelling.py" (Tom Schelling's segregation model)
    - "ca-rumor.py" (Spread of rumor)
    The above two codes show how to use the new interactive parameter
    setting feature.

    Other additions of dynamical network models:
    - "net-randomwalk.py" (Random walk on a network)
    - "net-voter.py" (Voter model of opinion formation on a network)
    - "net-epidemics-adaptive.py" (Epidemics on a network, with adaptive link cutting)
    - "misc-fileio-csv.py" (Example of how to read/write CSV files)

* Revision made to 0.31:
     - ttk is used as a graphics backend instead of Tix, so that Mac
       users can run the sample codes without installing Tix.

* Revision made to 0.32: 
    - The "pycxsimulator.py" GUI module was updated with several bug
      fixes by Toshi Tanizawa and Alex Hill to make its GUI and
      visualization more stable.
    - The file name of the Schelling's segregation model was changed
      to "abm-" to better reflect the nature of the model.
    - Sample codes used in Hiroki Sayama's Open SUNY textbook
      (http://tinyurl.com/imacsbook) are now included in the
      "textbook-sample-codes" subfolder.


3. How to use it?

(i) Install Python 2.7, NumPy, SciPy, matplotlib and NetworkX.
Installers are available from the following websites:
  http://python.org/  http://scipy.org/  http://matplotlib.org/  http://networkx.github.io/

Alternatively, you can use prepackaged Python suites, such as:
    - Anaconda (https://www.continuum.io/downloads)
    - Enthought Canopy (https://www.enthought.com/products/canopy/)

(ii) Choose a PyCX sample code of your interest.

(iii) Run it.

(iv) Read the code to learn how the simulation was implemented.

(v) Change the code as you like.


Note to Anaconda Spyder users:
* To run dynamic simulations, you should use a plain Python console
  (i.e., not in an IPython console). You can open a plain Python
  console from the "Consoles" menu.


Note to Enthought Canopy users:
* To run dynamic simulations, you may need to do the following:
  1. Go to "Edit" -> "Preferences" -> "Python" tab.
  2. Uncheck the "Use PyLab" check box, and click "OK."
  3. Choose "Run" -> "Restart kernel."
  4. Run your code. If it still doesn't work, re-check the "Use PyLab" check box, and try again.


Questions? Comments? Send them to sayama@binghamton.edu.
Source: README.txt, updated 2016-09-09