Metadata-Version: 2.1
Name: reticuler
Version: 3.1
Summary: Simulations of spatial networks growth
Author: Stanisław Żukowski
Author-email: zukowski.st@gmail.com
License: MIT
Project-URL: Source, https://github.com/stzukowski/reticuler
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy >=1.23
Requires-Dist: matplotlib >=3.6
Requires-Dist: scipy >=1.11.4
Requires-Dist: shapely >=2.0.3

# Reticuler

<p align="center">
<a href="https://pypi.org/project/reticuler/"><img alt="PyPI" src="https://img.shields.io/pypi/v/reticuler"></a>
<a href='https://reticuler.readthedocs.io/en/latest/?badge=latest'><img src='https://readthedocs.org/projects/reticuler/badge/?version=latest' alt='Documentation Status'/></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
</p>

Python package to simulate the growth of spatial transport networks in nature.

[Documentation](https://reticuler.readthedocs.io/en/latest/)

## Setup

### External dependencies:
[__FreeFEM++__](https://freefem.org/) - PDE solver

### Package installation
```
pip install reticuler
```

## Usage

Four command line scripts are installed during the installation:
   - *reticulate* - runs the simulation
   - *reticulate_back* - runs the the Backward Evolution Algorithm
   - *clip_ret* - clips the network to one of the growth thresholds: maximum forward evolution step, length, height, evolution time, or BEA step
   - *plot_ret* - plots the network based on the *.json* file from the simulation
   - *script_ret* - prepares a FreeFEM++ script based on the *.json* file

To use just type in the command line:
`reticulate -h`

Typical network growth simulation:
```
reticulate -out test --growth_params {\"growth_thresh_type\":1,\"growth_thresh\":2}
```
- output file: *test*,
- growth threshold type: maximum network height,
- growth threshold: 2

## How to cite
[1] [*Through history to growth dynamics: backward evolution of spatial networks*](https://doi.org/10.1038/s41598-022-24656-x), S. Żukowski, P. Morawiecki, H. Seybold, P. Szymczak, Sci. Rep. 12, 20407 (2022).
<!--- [Materials](https://github.com/stzukowski/reticuler/tree/main/archive/papers/2022SciRep) --->

**References:**
The thin-finger growth algorithm used in this package was based on an earlier code described in the paper
[*Bifurcation dynamics of natural drainage networks*](https://doi.org/10.1098/rsta.2012.0365) (A. Petroff, O. Devauchelle, H. Seybold, and D. H. Rothman. Philos. Trans. Royal Soc. A 371, 20120365, 2013)
