Framework for stock-flow consistent agent-based modeling, being developed at the German Aerospace Center (DLR) for and in the scientific context of energy systems analysis, however, it is widely applicable in other scientific fields.
Project description
sfctools - A toolbox for stock-flow consistent, agent-based models
Sfctools is a lightweight and easy-to-use Python framework for agent-based macroeconomic, stock-flow consistent (ABM-SFC) modeling. It concentrates on agents in economics and helps you to construct agents, helps you to manage and document your model parameters, assures stock-flow consistency, and facilitates basic economic data structures (such as the balance sheet).
Installation
We recommend to install sfctools in a fresh Python 3.8 environment. For example, with conda, do
conda create --name sfcenv python=3.8
conda activate sfcenv
conda install pip
Then, in a terminal of your choice, type:
pip install sfctools
see https://pypi.org/project/sfctools/
Usage with Graphical User Interface 'Attune'
Type
python -m sfctools attune
to start the GUI.
Usage inside Python
from sfctools import Agent,World
class MyAgent(Agent):
def __init__(self, a):
super().__init__(self)
self.some_attribute = a
my_agent = MyAgent()
print(my_agent)
print(World().get_agents_of_type("MyAgent"))
| Author Thomas Baldauf, German Aerospace Center (DLR), Curiestr. 4 70563 Stuttgart | thomas.baldauf@dlr.de |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sfctools-1.0.4.182-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d31d23c16b853eaf5884a593636ab475c8ce17177fe9a47ff3e7eb2247d23da9 |
|
MD5 | 6bcea8f2511a5e9fab2e2655c3891663 |
|
BLAKE2b-256 | 6afc9b3b35a612c188bc438848275577b63932d21a97918f73d24a815fd90a04 |