Coder Social home page Coder Social logo

pycx's Introduction

PyCX

PyCX is a Python-based sample code repository for complex systems research and education.

Current version: 1.0 (December 2019)

Sample codes are freely available from the Project website.

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 modeling and simulation, including iterative maps, ordinary and partial differential equations, cellular automata, network analysis, dynamical networks, and agent-based models. You can run, read and modify any of its codes to learn the basics of complex systems modeling and simulation in Python.

The target audiences of PyCX are researchers and students who are interested in developing their own software to study complex systems 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 sample 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 so much, it does not use sophisticated but complicated algorithm or data structure, it does use global variables frequently, and so on. These choices were intentionally made based on the author's experience in teaching complex systems modeling and simulation to non-computer scientists coming from a wide variety of domains.

For more details of its philosophy and background, 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

How to use it?

  1. Install Python 2 or 3, NumPy, SciPy, matplotlib, and NetworkX.

    Installers are available from the following websites:

    Alternatively, you can use prepackaged Python suites, such as:

    The codes were tested using Anaconda Distribution Python 2.7 and 3.7 on their Spyder and Jupyter Notebook environments.

  2. Choose a PyCX sample code of your interest.

  3. Run it. To run a dynamic, interactive simulation, make sure you have pycxsimulator.py.

  4. Read the code to learn how the model was implemented.

  5. Change the code as you like.

Note for Spyder users: Dynamic simulations may cause a conflict with Spyder's own graphics backend. In such a case, go to "Run" -> "Configuration per file" and select "Execute in an external system terminal".

Note for Jupyter Notebook users: You can run PyCX codes by entering "%run sample-code-name" in your Notebook.

Revision history

What's new in version 1.0?

  • All the codes, including pycxsimulator.py, were updated to be compatible with both Python 2.7 and Python 3.7. They can run in both languages with no modification. Special thanks to Prof. Toshi Tanizawa at the National Institute of Technology, Kochi College!

  • Several bug fixes were applied to pycxsimulator.py's GUI so that it works more robustly within the IPython environment.

  • Codes for network modeling and analysis were updated to be compatible with NetworkX 2.

  • The coding style was simplified to be more readable and more consistent with the author's OpenSUNY Textbook style.

  • The file names of sample codes were updated so that all codes start with the following prefix:

    • "ds-": for low-dimensional dynamical systems
    • "dynamic-": for demonstration of how to use pycxsimulator.py
    • "ca-": for cellular automata
    • "pde-": for partial differential equations
    • "net-": for network models
    • "abm-": for agent-based models
  • Some new examples were added, including: Hopfield networks, simple swarming, network attack experiment, and population-ecomony interactions.

  • Minor bug fixes were applied to examples of cascading failure, network communities, etc.

What was in previous versions 0.3/0.31/0.32?

  • Ver. 0.3:

    • Przemyslaw Szufel and Bogumil Kaminski at the Warsaw School of Economics made a substantial improvement to pycxsimulator.py, implementing interactive control of model and visualization parameters.
    • Several additional sample codes were added.
  • Ver. 0.31:

    • ttk was used as a graphics backend instead of Tix, so that Mac users could run the sample codes without installing Tix.
  • Ver. 0.32:

    • pycxsimulator.py's GUI was updated with several bug fixes by Toshi Tanizawa and Alex Hill.
    • Sample codes used in the author's OpenSUNY Textbook were included in the "textbook-sample-codes" subfolder.

Questions? Comments? Send them to [email protected].

pycx's People

Contributors

hsayama avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.