This is L-egume model, a generic model of forage legume morphogenesis.
See Louarn, G., Faverjon, L. (2018). A generic individual-based model to simulate morphogenesis, C–N acquisition and population dynamics in contrasting forage legumes. Annals of botany, 121(5), 875-896. Faverjon, L. (2018). Calibration et evaluation d’un modele individu-centre generique de morphogenese des legumineuses fourrageres – Application a la prediction des equilibres inter-specifiques dans des communautes prairiales experimentales. PhD Thesis. Univ. Poitiers.
These instructions will get you a copy of L-egume up and running on your local machine.
To install and use L-egume, you need first to install the dependencies.
L-egume has been tested on Windows 7/10 64bit.
-
Install Python 3.6 using Anaconda
- go to https://www.anaconda.com/download/
- click on "64-Bit Graphical Installer",
- download "Anaconda2-2018.12-Windows-x86_64.exe" and install it selecting the following options:
- install for all users,
- default destination directory,
- install all subfeatures, including subfeature "Add python.exe to Path".
-
Create and Activate a conda environment using 'Anaconda Prompt':
- Open an 'Anaconda Prompt' console
- Create a new environment (e.g. py37_64) using the following command lines: conda create -n py37_64 -c fredboudon -c conda-forge openalea.lpy openalea.mtg openalea.plantscan3D conda install openalea.lpy -c fredboudon -c conda-forge
- Activate the new environment using the following command line: activate py37_64
-
Install scipy package (v1.1.0):
- in your acivated conda environment, install successively : conda install -c anaconda scipy
-
Install xlrd package (v1.2.0):
- in your acivated conda environment, install successively : conda install -c conda-forge xlrd
-
Install OpenAlea L-py:
-
go to https://github.com/openalea/lpy to check latest install recommendations for PlantGL
-
To correct lpy console display bug: (not required anymore after python 3)
- go to envs\nom_environnement\library\bin
- create a new file 'mylpy.bat'
- write inside the following command line: python -c "from openalea.lpy.gui.lpystudio import main ; main()"
- you can now launch lpy studio from your acivated conda environment using “mylpy”
-
Note: We suppose you already installed the dependencies for your operating system. Otherwise follow these instructions.
You can install L-egume either in "install" or "develop" mode.
Install L-egume in "install" mode if you're not going to develop, edit or debug it, i.e. you just want to used it as third party package.
To install L-egume in "end-user" mode:
- open and activate a conda environment with installed dependencies,
- go to your local copy of project L-egume (you can get the latest version from https://sourcesup.renater.fr/projects/l-egume/),
- run command:
python setup.py install --user
.
Install L-egume in "develop" mode if you want to get L-egume installed and then be able to frequently edit the code and not have to re-install L-egume to have the changes to take effect immediately.
To install L-egume in "develop" mode:
- open and activate a conda environment with installed dependencies,
- go to your local copy of project L-egume (you can get the latest version from https://sourcesup.renater.fr/projects/l-egume/),
- run command:
python setup.py develop --user
.
To run a simulation example, two options:
-
- open Lpy platform, load l-egume.lpy file from legume folder, Use Run or animate button to launch a simulation
- Run l-egume from a python script (see l-egume_batch_mixture8.py in multisim folder for an example; require mutiprocessing)
See the user guide for a step by step explanation of how to set and run model L-egume.
[AFTER: TO BE COMPLETED!!!]
To build the user and reference guides:
- install the model (see Installation of the model),
- open a command line interpreter,
- go to the top directory of your local copy of the project,
- run this command:
python setup.py build_sphinx
, - and direct your browser to file
doc/_build/html/index.html
.
The test allows to verify that the model implementation accurately represents the developer’s conceptual description of the model and its solution.
The test:
- runs the model on 200 steps,
- concatenates the outputs of the model in pandas dataframes,
- writes the outputs dataframes to CSV files,
- compares actual to expected outputs,
- raises an error if actual and expected outputs are not equal up to a given tolerance.
To run the test :
- install the model (see Installation of the model),
- open a command line interpreter,
- go to the directory
test
of your local copy of the project, - and run this command:
python test_lgrass.py
.
First, send an email to lgrass-request@groupes.renater.fr to be added to the project.
Then,
- check for open issues or open a fresh issue to start a discussion around a feature idea or a bug: https://sourcesup.renater.fr/tracker/?group_id=3957.
- If you feel uncomfortable or uncertain about an issue or your changes, feel free to email lgrass@groupes.renater.fr.
For any question, send an email to lgrass-request@groupes.renater.fr.
We use a Git repository on SourceSup for
versioning: https://sourcesup.renater.fr/projects/l-egume
If you need an access to the current development version of the model, please send
an email to lgrass-request@groupes.renater.fr.
For versionning, use a git client and get git clone git+ssh://glouarn@git.renater.fr:2222/scmrepos/git/l-egume/l-egume.git SSH will is required
Gaetan LOUARN, Lucas FAVERJON - see file AUTHORS for details
This project is licensed under the CeCILL-C License - see file LICENSE for details