Agent based modeling of the manufacturing of charcoal in forested areas of the eastern United States. There will be two models:
- Mill model, a simple model of a saw mill that is a prototype.
- Charcoal production model
This simulation requires Python to be installed on a machine that can launch a local http server. This does not work on Google Colaboratory, unfortunately.
See the Installation section in this tutorial.
or:
$ pip install pipenv
$ pipenv install mesa
- Make a directory. cd to the directory. Then:
$git init .
$git pull https://github.com/jeffblackadar/hist5706_digital_history.git
There are two models, Mill and CharcoalProduction.
This is a prototype model meant try out Mesa and build a basic model of consumption of wood in a forested area.
$ python run_mill.py
This is a model of chacoal production for an iron furnace in the Eastern United States during the 18th to mid-19th centuries.
- change directory to /charcoalproduction
- python run_charcoalproduction.py
$ cd charcoalproduction
$ python run_charcoalproduction.py
- server.py - Instantiates the model and sets its size. Change the size of the model here.
- For model.py, furnace.py, landcell.py, charcoalhearth.py see the model class documentation
- portrayal.py - Contains information to render the classes in the html visualization.
- HexGridMulti.py - HexGridMulti is an additional class added to the Mesa grid classes so that cells in a Hexagon grid may contain more than 1 agent at time.
- run_iron_p.py, server_image.py - Run a simple image based simulation. This is a prototype that was abandoned.
- documenter_charcoalproduction.py - Creates an html page of documentation of the classes using Mermaid.
- model_init_image.py - A prototype of logic to add agents in order from the center of a grid outwards.
- workbook.ipynb - Contains calculations to inform the model's paradata.
- charcoalhearth_paradata_workbook.ipynb - Also contains calculations to inform the model's paradata. (These two will be merged.)