Business Prototyping Toolkit Quickstart

Overview of the BPTK computational modeling framework.
Keywords

agent-based modeling, abm, bptk, bptk-py, xmile, stella, python, business simulation, marimo, Pandas, Matplotlib

Business Prototyping Toolkit Quickstart

BPTK Quickstart

The Business Prototyping Toolkit (BPTK) is a computational modeling framework that enables you to build simulation models using System Dynamics (SD) and/or agent-based modeling (ABM) and manage simulation scenarios with ease.

The framework is used to build models of markets, business models, organisations and entire business ecosystems. It can be used to build small, explorative models — such as the one on the following pages — as well as large models with hundreds of thousands of equations.

The guiding principle of the framework is to let the modeler concentrate on building simulation models by providing a seamless interface for managing model settings and scenarios and for plotting simulation results. It takes a “minimalistic” approach and just provides the necessary modeling and simulation functionality, using standard open source packages for everything else.

  • Plotting is built in, using Matplotlib — one call gives you a chart of any scenario. Because the results are plain Matplotlib and Pandas objects, you can take them further whenever you need to: your own chart styles, or interactive dashboards built in a notebook environment such as marimo.
  • Simulation results are returned as Pandas dataframes.
  • Numerics via NumPy and SciPy.

Model settings and scenarios are kept in JSON files. These settings are automatically loaded by the framework upon initialization, as are the model classes themselves. This makes interactive modeling, coding and testing very painless, especially in a reactive notebook environment such as marimo.

Key Components of the Business Prototyping Toolkit

The toolkit has been available since 2018 and supports Agent-based modeling (ABM), System Dynamics modeling (SD) and hybrid models that use both.

There is also support for importing XMILE models created with external modeling environments, such as iseesystems Stella Architect or iThink.

Once you have a model, you can then define and manage different simulation scenarios, plot the results of those scenarios and build interactive dashboards.

The framework also provides a simple REST API server, which lets you serve up and query models using web technology.

BPTK Building Blocks

We used it to build a dashboard illustrating different COVID scenarios; the repositories for the dashboard and the simulation are available on GitHub.

Example Model: Simulating Customer Acquisition using the Bass Diffusion Model

To illustrate the different ways of building simulation models using BPTK, we will use a simple model of customer acquisition known as the Bass Diffusion Model. It describes the process of how new products or services are adopted by consumers.

We will build it four times over: with the System Dynamics DSL, with agent-based modeling, as a hybrid of the two, and as a XMILE model.

The basic structure of the model is illustrated in the following causal loop diagram:

Customer Acquisition CLD

Contents

The quickstart is split into one page per modeling approach - each builds the same customer acquisition example, so you can compare them directly.

Every one of them runs right here in your browser: press the play button on a cell, change a value, and the cells below it recompute. To run them on your own machine instead, see Installation.

Further Examples

You can find more examples in the Model Library.