Skip to main content

A platform for creating, modifying, and combining dynamic models, with a focus on horticultural greenhouses and crops

Project description

GreenLight

A Python platform for creating, modifying, and combining dynamic models, with a focus on horticultural greenhouses and crops.

Quick start

pip install greenlight
python -m greenlight.main

or:

pip install greenlight
import greenlight
mdl = greenlight.GreenLight()
mdl.run()

Announcements

Change in default branch name

As of version 2.0.2, the default branch name has changed from master to main. If you have a local clone, you can update it by running the following commands:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

Previous versions

Versions 1.x of this repository are programmed in MATLAB, and their development is discontinued. Looking for the last MATLAB version of GreenLight? You can find it here.

Active discussions on Discord

Users are welcome to join the GreenLight Discord server to post their questions, wishes, ideas - and hopefully help each other.

User's guide

GreenLight is a platform for creating, modifying, and combining dynamic models. It was developed for simulating horticultural greenhouses and crops (and that still remains its main focus), but its capabilities are more general. One strength of GreenLight is its use as a tool for open science, as it allows for transparent, reusable, and shareable research in the domain of dynamic modelling.

Follow the instructions below based on what you want to do:

I just want to run a greenhouse simulation

The simplest way to do this is to install greenlight through pip and then run main:

pip install greenlight
python -m greenlight.main

A dialog box will appear with various inputs, you can play around with those, hit OK and see what happens.

For more information about installation, see installing GreenLight.

I want to run a simulation for a specific location

Simulations performed as above will not be very informative unless specific weather data is provided as input. Follow the instructions in input data on how to acquire weather data which will allow you to perform simulations for specific locations.

I want to modify a model setting, then view and analyze simulation results

Any complex modelling work will most likely require writing and using scripts or notebooks. Have a look at Using GreenLight for a general explanation on how GreenLight can be used. That page also contains links to further examples.

I want to learn more about the definitions and architecture of GreenLight's greenhouse models

It is difficult to make modifications to the model without having a good understanding of the model structure and its various variables, constants, and inputs. The only way to build a familiarity with the model is to carefully read through it. Fortunately, there is already quite some literature to help guide through the model.

The standard greenhouse model in GreenLight is based on Katzin (2021). Energy Saving by LED Lighting in Greenhouses: A Process-Based Modelling Approach. This in turn is based on Vanthoor (2011). A model-based greenhouse design method.

The best way to get familiarized with the model is to read through these publications and understand what the variables represent. A good way to start is with Vanthoor's Chapter 8, which is represented in GreenLight in greenhouse_vanthoor_2011_chapter_8.json. Try to read through this chapter together with the related JSON file to get a grasp of the model.

This can be continued by reading Vanthoor's Chapter 9 with crop_vanthoor_2011_chapter_9_simplified.json, and reading Katzin's Chapter 7 with extension_greenhouse_katzin_2021_vanthoor_2011.json. Only by reading through and understanding the different model components is it possible to make meaningful modifications.

I want to learn more about the technical and numerical aspects of the GreenLight's models

Check Simulation options about how various settings can be modified.

I want to extend, combine, implement a model from literature or develop my own model

See Model format and Modifying and combining models.

I want to further develop the GreenLight platform

At this point you may dig deeper into the code. Have a look at the GreenLight package and explore the code and docstrings from there.

Further documentation

See Documentation.

Notes

License

This project is licensed under the BSD 3-Clause-Clear License. See the LICENSE file for details.

Repository structure

  • docs contains detailed documentation on how to work with the repository
  • greenlight holds the Python module containing the platform implementations
  • greenlight/models contains files that define models implemented on the platform
  • notebooks contain example notebooks that use the python module in this package
  • scripts contains Python scripts and examples that use this package

Contributors

  • David Katzin, Wageningen University & Research, david.katzin@wur.nl
  • Pierre-Olivier Schwarz, Université Laval
  • Joshi Graf, Wageningen University & Research
  • Stef Maree, Wageningen University & Research
  • User shanakaprageeth on github.com

Acknowledgements

Thank you to Ian McCracken for providing the PyPI GreenLight namespace

This package was created with Cookiecutter and the WUR Greenhouse Technology cookiecutter project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

greenlight-2.0.5.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

greenlight-2.0.5-py2.py3-none-any.whl (1.2 MB view details)

Uploaded Python 2Python 3

File details

Details for the file greenlight-2.0.5.tar.gz.

File metadata

  • Download URL: greenlight-2.0.5.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for greenlight-2.0.5.tar.gz
Algorithm Hash digest
SHA256 b7aa2017200c4601288d77c1c9db7a437bd1572d6edbac374dc0416457bc83d9
MD5 50bd0003420410108ca5326b8fe8ffbf
BLAKE2b-256 dbb301c678f52a71c18abe8c405a0bd9a48c86d1e3a20219e21ec96f44543153

See more details on using hashes here.

File details

Details for the file greenlight-2.0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: greenlight-2.0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for greenlight-2.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f664afcf515bccd818ce3220f34764e3b566b0cf5baa6de8161ac7fd154ad87f
MD5 09aed415cb80df15c872f54ddc276d0b
BLAKE2b-256 a3e3964e73bf61581a80e2457d1b706239cc9be0e9c264a2e09f87f8b8315cb8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page