This directory contains all data and code needed to fully reproduce results for our paper. The approach is described in iGrow: A Smart Agriculture Solution to Autonomous Greenhouse Control.
Note that the materials presented here mainly consists of replications of experiments and results; for additional information (e.g., scenario introduction of real greenhouses) see the Technical Appendix.pdf
and Multimedia Appendix.zip
.
Running the follow command:
python evaluate_simulator.py
You will obtain R$^2$ of different variables of two simulators.
The results are stored in ./result/table1/
Running the follow command:
python vs_simulators.py
You will obtain accuracy of WUR simulator
and both of our simulators
compared the ground truth in the real trajectory, take planting trajectory of the champion of the 2nd Autonomous Greenhouse Challenge -- Automatoes as an example.
The results are stored in ./result/figure3/
Running the follow command:
python vs_methods.py
You will obtain economic effectiveness and setpoints simulated by different methods on our incremental simulator.
The results are stored in ./result/figure4/
Running the follow command:
python liaoyang_harvest.py
You will obtain the main economic effectiveness curves (including Crop yield
, Gains
, Fruit Prices
) of the control group (planting experts) and the experimental group (iGrow) in the 2nd pilot project.
The results are stored in ./result/figure5/
Running the follow command:
python liaoyang_economic.py
You will obtain all of economic indicators of the control group (planting experts) and the experimental group (iGrow) in the 2nd pilot project.
The results are stored in ./result/table2/
Running the follow command:
python liaoyang_analysis.py
You will obtain the pair relationship among four action variables over time of the control group (planting experts) and the experimental group (iGrow) in the 2nd pilot project.
The results are stored in ./result/figureS4toS13/
Please set different random number seeds, otherwise the original result will be overwritten.
Due to the size of planting trajectories dataset exceeds the available max limit set by CMT, then we upload a representative subset of this dataset.
Running the follow command:
python train_simulator.py
You will obtain the baseline simulator.
The results are stored in ./result/models/baseline/
Running the follow command:
python sac_main.py
You will obtain the model of SAC algorithm.
The results are stored in ./SAC/sac_model
Running the follow command:
python ega_main.py
You will obtain the model of EGA algorithm.
The results are stored in ./GA/ga_train/policy/
In the top-level directory are executable scripts to execute, evaluate, and visualize the experimental results of our paper.
The relationship of these executable scripts to the results in the paper is as follows:
evaluate_simulator.py
: Table 1vs_simulators.py
: Figure 3python vs_methods.py
: Figure 4python liaoyang_harvest.py
: Figure 5python liaoyang_economic.py
: Table 2python liaoyang_analysis.py
: Figure S4 to S13python train_simulator.py
: baseline and incremental simulatorspython sac_main.py
: The strategy of SAC algorithmpython ega_main.py
: The strategy of EGA algorithm
Figure 1
is the overview of our paper; Figure 2
shows the the structure of our simulator. They only need to present in the paper.
Figure S1 to S3
and Table S1, S2
belong to the introduction of the pilot scenario, which can bee seen in Multimedia Appendix.zip
.
The code is compatible with Python 3.6
. Running the follow command for install dependencies are needed to run the source code files:
pip install -r requirements.txt
Note that cuda==10.2
, Pytorch==1.7.1
and geatpy==2.5.1
.