A Python platform for creating, modifying, and combining dynamic models, with a focus on horticultural greenhouses and crops.
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.
This project is licensed under the BSD 3-Clause-Clear License. See the LICENSE file for details.
Users are welcome to join the GreenLight Discord server to post their questions, wishes, ideas - and hopefully help each other.
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
- I want to run a simulation for a specific location
- I want to modify a model setting, then view and analyze simulation results
- I want to learn more about the definitions and architecture of GreenLight's greenhouse models
- I want to learn more about the technical and numerical aspects of the GreenLight's models
- I want to extend, combine, implement a model from literature or develop my own model
- I want to further develop the GreenLight platform
After installing greenlight, run the following in your terminal:
python -m greenlight.main
A dialog box will appear with various inputs, you can play around with those, hit OK and see what happens.
Tip: If you're just exploring, change the End date in the box to something closer to the start date, say 9/30/21, to run shorter simulations that will run faster.
Simulations performed as above will not be very informative unless 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.
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.
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.
Check Simulation options about how various settings can be modified.
See Model format and Modifying and combining models.
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.
See Documentation.
docs
contains detailed documentation on how to work with the repositorygreenlight
holds the Python module containing the platform implementationsmodels
contains files that define models implemented on the platformnotebooks
contain example notebooks that use the python module in this packagescripts
contains Python scripts and examples that use this package
- David Katzin, Wageningen University & Research, [email protected]
- Pierre-Olivier Schwarz, Université Laval
- Joshi Graf, Wageningen University & Research
- Stef Maree, Wageningen University & Research
This package was created with Cookiecutter and the WUR Greenhouse Technology cookiecutter project template.