Skip to content

simpest

simpest logo

PyPI License: MIT

Introduction

simpest is a Python package for crop and disease simulation workflows. It connects SIMPLACE outputs with the FraNchEstYN model family so you can run end-to-end experiments from weather and management data to simulation and summary results.

Package Description

The package supports a practical modeling pipeline:

  • Runs SIMPLACE scenarios
  • Converts SIMPLACE outputs to FraNchEstYN-compatible inputs
  • Runs crop, disease, and fungicide simulation steps
  • Calibrates selected parameters using multi-start Nelder-Mead optimization
  • Export daily simulation and seasonal summary outputs.

Core modules are available under simpest/models.

Directory Tree

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
simpest/
|- docs/
|  |- examples/
|  |- index.md
|  |- installation.md
|  |- usage.md
|  |- simpest.md
|  |- common.md
|- simpest/
|  |- simpest.py
|  |- common.py
|  |- models/
|     |- simplace.py
|     |- franchestyn.py
|     |- fr_runner.py
|     |- fr_crop_model.py
|     |- fr_disease_model.py
|     |- fr_fungicide_model.py
|     |- fr_optimizer.py
|     |- fr_utilities.py
|     |- fr_data.py
|- tests/
|- mkdocs.yml
|- pyproject.toml
|- README.md

Installation

1
pip install simpest

For development installs, use editable mode:

1
pip install -e .

Quickstart

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from simpest.models.simplace import SimplaceConfig, init_simplace, run_simplace
from simpest.models.franchestyn import FranchestynConfig, run_franchestyn

# 1) Configure and run SIMPLACE
sp_cfg = SimplaceConfig(
    install_dir="<SIMPLACE_INSTALL>",
    work_dir="<SIMPLACE_WORK>",
    output_dir="<OUTPUT_DIR>",
    solution_path="<SOLUTION_PATH>",
    project_path="<PROJECT_PATH>",
)
shell = init_simplace(sp_cfg)
run_simplace(shell, sp_cfg, project_lines=[1])

# 2) Configure and run FraNchEstYN
fr_cfg = FranchestynConfig(
    reference_path="<REFERENCE_CSV>",
    crop_type="wheat",
    disease_type="septoria",
    site="indiana",
    variety="Generic",
    disease="thisDisease",
)

result = run_franchestyn(
    weather_path="<WEATHER_FILE>",
    management_path="<MANAGEMENT_FILE>",
    start_year=2018,
    end_year=2019,
    config=fr_cfg,
)
print(result["outputs"]["summary"])

See the full workflow notebook at docs/examples/simpest_workflow_example.ipynb.

Project