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.4.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.4-py2.py3-none-any.whl (1.2 MB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: greenlight-2.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 64fa8950dc901777f155da7c9033bbd1ac66a1f8657e9cd5f1cf7df30fe3708e
MD5 bcf28abb711aeb5ae22b5667b8bba975
BLAKE2b-256 6e7b5af84537365a601752d2df31d0e3b3fd1ee429d139c26891d67efa9f4e3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: greenlight-2.0.4-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.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 397da71a3fc783841393b9bcd3cfe9181cc326d21068812c4e8032f0d136897a
MD5 f3b77707b2f1b8b2753cd84462f10b1e
BLAKE2b-256 ad50a614a06e46b27c31fe2a6415156bfa16e47e54c34424f16b8b92c515243d

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