CBD Simulator Development Kit¶
Python-based framework for CBD modeling and simulation.
| Authors: |
|
|---|---|
| Python Version: | >= 3.6 |
Prerequisites¶
The following packages are required to run simulations using this framework:
Standard Python Modules:
unittest,math,collections(forcollections.namedtuple),os,sys,datetimebokeh for plotting. To install bokeh for python, follow these instructions.
GraphViz to display the dependency structure of the CBD. To install Graphviz, follow these steps:
- Download and install Graphviz: https://www.graphviz.org/download/
- 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 - Install
graphvizfor Python: https://graphviz.readthedocs.io/en/stable/manual.html
Note
For anaconda users, use https://anaconda.org/anaconda/graphviz
Running the Tests¶
From the root directory of the CBD Simulator Framework (i.e., where this README file resides), execute:
python -m unittest discover -v CBDMultipleOutput.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/
python EvenNumberGen.py
cd examples/Fibonacci/
python Fibonacci.py
Both will generate an HTML document containing a bokeh plot in the current directory.