sfctools


Namesfctools JSON
Version 1.1.9.2 PyPI version JSON
download
home_pagehttps://gitlab.com/dlr-ve/esy/sfctools/framework
SummaryFramework 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.
upload_time2024-01-04 13:27:29
maintainerThomas Baldauf, Benjamin Fuchs
docs_urlNone
authorThomas Baldauf
requires_python>=3.6,<=3.12
licenseMIT
keywords stock-flow-consistent agent-based agent macroeconomics computational economics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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). For more documentation, see https://sfctools-framework.readthedocs.io/en/latest/.

## 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

Try out this simple example:

```python
from sfctools import Agent, World 

class SomeAgent(Agent):
    def __init__(self, a):
        super().__init__()
        self.some_attribute = a

my_agent = SomeAgent(a='Hello')
your_agent = SomeAgent(a='World')

my_agents = World().get_agents_of_type("SomeAgent")
my_message = my_agents[0].some_attribute
your_message = my_agents[1].some_attribute

print("%s says %s, %s says %s" % (my_agent, my_message, your_agent, your_message))
```

The resulting output will be

```console 
SomeAgent__00001 says Hello, SomeAgent__00002 says World
```

## More Examples

Have a look at the [documentation page](https://sfctools-framework.readthedocs.io/en/latest/doc_api_examples/examples_framework.html) for more examples. 


## Cite this Software

You can cite the software as follows: 

Baldauf, T., (2023). sfctools - A toolbox for stock-flow consistent, agent-based models. Journal of Open Source Software, 8(87), 4980, https://doi.org/10.21105/joss.04980


You can cite the software repository as follows:

Thomas Baldauf. (2023). sfctools - A toolbox for stock-flow consistent, agent-based models (1.1.0.2b). Zenodo. https://doi.org/10.5281/zenodo.8118870


-----------------------------------

| Corresponding author: Thomas Baldauf, German Aerospace Center (DLR), Curiestr. 4 70563 Stuttgart | thomas.baldauf@dlr.de |


            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/dlr-ve/esy/sfctools/framework",
    "name": "sfctools",
    "maintainer": "Thomas Baldauf, Benjamin Fuchs",
    "docs_url": null,
    "requires_python": ">=3.6,<=3.12",
    "maintainer_email": "thomas.baldauf@dlr.de, benjamin.fuchs@dlr.de",
    "keywords": "stock-flow-consistent,agent-based,agent,macroeconomics,computational economics",
    "author": "Thomas Baldauf",
    "author_email": "thomas.baldauf@dlr.de",
    "download_url": "https://files.pythonhosted.org/packages/0f/1f/3035f6453069b277fa34b5e8219b601d59a2a319156cc53b48d982264dce/sfctools-1.1.9.2.tar.gz",
    "platform": null,
    "description": "# sfctools - A toolbox for stock-flow consistent, agent-based models\n\nSfctools 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). For more documentation, see https://sfctools-framework.readthedocs.io/en/latest/.\n\n## Installation\n\nWe recommend to install sfctools in a fresh Python 3.8 environment. For example, with conda, do\n\n    conda create --name sfcenv python=3.8\n    conda activate sfcenv\n    conda install pip\n\nThen, in a terminal of your choice, type:\n\n    pip install sfctools\n\nsee https://pypi.org/project/sfctools/\n\n## Usage with Graphical User Interface 'Attune'\n\nType\n\n    python -m sfctools attune\n\nto start the GUI.\n\n## Usage inside Python\n\nTry out this simple example:\n\n```python\nfrom sfctools import Agent, World \n\nclass SomeAgent(Agent):\n    def __init__(self, a):\n        super().__init__()\n        self.some_attribute = a\n\nmy_agent = SomeAgent(a='Hello')\nyour_agent = SomeAgent(a='World')\n\nmy_agents = World().get_agents_of_type(\"SomeAgent\")\nmy_message = my_agents[0].some_attribute\nyour_message = my_agents[1].some_attribute\n\nprint(\"%s says %s, %s says %s\" % (my_agent, my_message, your_agent, your_message))\n```\n\nThe resulting output will be\n\n```console \nSomeAgent__00001 says Hello, SomeAgent__00002 says World\n```\n\n## More Examples\n\nHave a look at the [documentation page](https://sfctools-framework.readthedocs.io/en/latest/doc_api_examples/examples_framework.html) for more examples. \n\n\n## Cite this Software\n\nYou can cite the software as follows: \n\nBaldauf, T., (2023). sfctools - A toolbox for stock-flow consistent, agent-based models. Journal of Open Source Software, 8(87), 4980, https://doi.org/10.21105/joss.04980\n\n\nYou can cite the software repository as follows:\n\nThomas Baldauf. (2023). sfctools - A toolbox for stock-flow consistent, agent-based models (1.1.0.2b). Zenodo. https://doi.org/10.5281/zenodo.8118870\n\n\n-----------------------------------\n\n| Corresponding author: Thomas Baldauf, German Aerospace Center (DLR), Curiestr. 4 70563 Stuttgart | thomas.baldauf@dlr.de |\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "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.",
    "version": "1.1.9.2",
    "project_urls": {
        "Documentation": "https://sfctools-framework.readthedocs.io/en/latest/",
        "Homepage": "https://gitlab.com/dlr-ve/esy/sfctools/framework"
    },
    "split_keywords": [
        "stock-flow-consistent",
        "agent-based",
        "agent",
        "macroeconomics",
        "computational economics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "61da35254e71a16e5f114b97b626e76086076f06125e08730f82252a1b522ed3",
                "md5": "7acea3f2f46fd3c988804c49d7c66d62",
                "sha256": "bf4881f9280c1c992915126e2fb00a09eed4ae6f930ce1d7fc70a37e7938410b"
            },
            "downloads": -1,
            "filename": "sfctools-1.1.9.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7acea3f2f46fd3c988804c49d7c66d62",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6,<=3.12",
            "size": 357427,
            "upload_time": "2024-01-04T13:27:26",
            "upload_time_iso_8601": "2024-01-04T13:27:26.840031Z",
            "url": "https://files.pythonhosted.org/packages/61/da/35254e71a16e5f114b97b626e76086076f06125e08730f82252a1b522ed3/sfctools-1.1.9.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f1f3035f6453069b277fa34b5e8219b601d59a2a319156cc53b48d982264dce",
                "md5": "74325256e55c1dc29c5d4c7155e3a811",
                "sha256": "56d7d0961375389c1d271cdacaa857a1f0ac9779e26e4f53fc63fdca47a71a96"
            },
            "downloads": -1,
            "filename": "sfctools-1.1.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "74325256e55c1dc29c5d4c7155e3a811",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6,<=3.12",
            "size": 321594,
            "upload_time": "2024-01-04T13:27:29",
            "upload_time_iso_8601": "2024-01-04T13:27:29.857970Z",
            "url": "https://files.pythonhosted.org/packages/0f/1f/3035f6453069b277fa34b5e8219b601d59a2a319156cc53b48d982264dce/sfctools-1.1.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-04 13:27:29",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "dlr-ve",
    "gitlab_project": "esy",
    "lcname": "sfctools"
}
        
Elapsed time: 0.53270s