This tutorial contain sample agent-based and System Dynamics models along with Jupyter notebooks that illustrate the features of the BPTK-Py framework. This tutorial is designed as a companion to the BPTK-Py online documentation – the online documentation is generated from these notebooks using quarto
First, make sure you have Python 3 installed on your machine.
Then follow these steps:
- On the command line, move into a directory where you would like to store the BPTK-Py tutorial.
- Clone this repository:
git clone https://github.com/transentis/bptk_py_tutorial.git
- Install a virtual environment in that directory:
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
(MacOS/Linux) orvenv\scripts\activate.bat
(Windows) - Install the necessary python modules:
pip install -r requirements.txt
- Start JupyerLab:
jupyter lab
- Your browser will open showing JupyterLab and your chosen directory
- Open the notebook
readme.md
from within JupyterLab
This tutorial contains a number of Jupyter notebooks that illustrate usage of the BPTK-Py framework. Which one to get started with depends on whether you are interested in Agent-based modeling, in System Dynamics using XMILE (e.g. using Stella Architect or iThink) or in our domain-specific language for System Dynamics (SD DSL).
The best place to get started is the Quickstart, which illustrates System Dynamics and Agent-based Modeling using a simple customer acquisition model.
You might also like the System Dynamics Tutorial.
Our model library contains some interesting models that you can use as a starting point for understanding System Dynamics, Agent-based Modeling and the BPTK-Framework:
- Bass Diffusion Model. The classic Bass Diffusion Model that is used to explain the dynamics of introductiong a new product or service into a market.
- Beer Distribution Game. In-depth analysis of the beergame using both System Dynamics and Agent-based simulation. Includes an illustration of how to use BPTK in conjunction with reinforcement learning to train agents to play the beergame autonomously.
- Competitive Pricing A neat little model that can be used to understand pricing dynamics.
- Customer Acquisition. A model that analyses the effects of referral marketing on customer acquisition.
- Make Your Professional Service Firm Grow. A model that analyses growth strategies in professional service firms.
Our Business Prototyping Toolkit Meetup Group gathers online regularly. This is a good place to see BPTK in action, ask questions and suggest new features. We record every session and you can view past recordings on the meetup homepage.
Please let us know if you need help getting started, if you find a bug or are missing important functionality.
We are keen to hear how you use BPTK-Py – your feedback is invaluable in helping us improve BPTK-Py.
You can best reach us per e-mail at support@transentis.com
- Architecture of the BPTK Framework
- Scenarios in Depth
- Accessing Raw Simulation Results
- Advanced Plotting Features
- Developing Dashboards using Jupyter Widgets
- Developing Dashboards using the SimpleDashboard Utility Class
- Introduction to BPTK Server
- Persisting the BPTK-Server State
- A Simple Python Library For System Dynamics
- SD DSL Functions
- Creating User-defined Functions in SD Models
- SD DSL: Under The Hood
- The Mathematics Underlying the SD DSL
- Working With XMILE
- Bass Diffusion Model. The classic Bass Diffusion Model that is used to explain the dynamics of introductiong a new product or service into a market.
- Beer Distribution Game. Computational notebooks, simulation models and AI training algorithms that explore the beer distribution game in depth.
- Competitive Pricing Dynamics A neat little model that can be used to understand pricing dynamics.
- Customer Acquisition. A model that analyses the effects of referral marketing on customer acquisition.
- Enterprise Digital Twin. A simulation of a professional service firm that forms part of the transentis Enterprise Digital Twin. This is work in progress that accompanies our current meetup series
- Make Your Professional Service Firm Grow. A model that analyses growth strategies in professional service firms.
- System Archetypes. System Archtetypes are basic patterns of behaviour of a system. The model library provides System Dynamics models and dashboards to gain a deeper understanding of the archetypes and of how to model them.
- Agent
- bptk
- BptkServer
- Biflow
- Constant
- Converter
- DataCollector
- Element
- Event
- Flow
- Model
- Module
- Scheduler
- SimpleDashboard
- SimulationScenario
- Simultaneous Scheduler
- Stock
You can find further examples of models and dashboards build using BPTK in the following GitHub repositories:
- COVID Simulation. Jupyter notebooks and dashboards illustrating the SIR model.
- COVID Simulation Dashboard. A web-based simulation dashboard for the COVID simulation built using our BPTK Widgets library for Javascript. View a live version of the dashboard online.