Simulator for Causal Block Diagrams

rparedis 1b16eac64d Threading/GameLoopAlt bugfixes 4 سال پیش
doc 315973dc77 Added Seaborn to plotting 4 سال پیش
examples 02d2f858cc Added some more features 4 سال پیش
src 1b16eac64d Threading/GameLoopAlt bugfixes 4 سال پیش
.gitignore 1e0d012ee2 Added Q-learning for the AGV 4 سال پیش
README.md 4934896dad Fixed simple examples with new library + added live plotting possibilities. 5 سال پیش
requirements.txt 315973dc77 Added Seaborn to plotting 4 سال پیش
test.sh ec562b52c7 Swapped src/CBD directory names to allow for setup.py 5 سال پیش
whishlist.txt 8f3513219d Q learning other idea 4 سال پیش

README.md

CBD Simulator Framework

 Copyright the Modelling, Simulation and Design Lab (MSDL)
           http://msdl.cs.mcgill.ca/

 Author(s): Marc Provost
            Hans Vangheluwe
            Joachim Denil
            Claudio Gomes
            Randy Paredis
  
 Purpose: simulates CBD models in Python.

 Requires Python version >= 3.6

 Uses the following Python libraries 
  unittest
  math 
  collections (for collections.namedtuple)
  os
  sys
  re
  datetime
  bokeh (https://bokeh.org/) for plotting
  Graphviz to display the dependency structure of the CBD

How to use the Simulator Framework:

Prerequisites

For plotting, the code uses the Bokeh library. To install bokeh for Python, if it is not already installed, follow the instructions in: https://bokeh.pydata.org/en/latest/docs/user_guide/quickstart.html#installation

To display dependencies between CBD blocks, the Graphviz library is used. To install Graphviz, if it is not already, follow the steps:

  1. Download and install Graphviz: https://www.graphviz.org/download/
  2. Make sure the Graphviz binaries are accessible in the PATH environment variable. For example, on windows there should be an entry in the PATH with: C:\Graphviz2.38\bin

Running the tests

From the root directory of the CBD Simulator Framework (i.e., where this README file resides).

python3 -m unittest discover -v CBD.test "*.py"

testDerivatorBlock and testIntegratorBlock will fail while working on the Discrete-Time CBD simulator.

Running examples

Make sure that PYTHONPATH includes the root directory of the CBD Simulator Framework.

cd examples/EvenNumberGen/
python3 EvenNumberGen.py
cd examples/Fibonacci/
python3 Fibonacci.py

Both will generate an HTML document containing a bokeh plot in the current directory.