Skip to content

YaoYao1995/iGrow

 
 

Repository files navigation

iGrow: A Smart Agriculture Solution to Autonomous Greenhouse Control

Introduction

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.

Fully reproduce the experimental results of our paper

1. Comparison of baseline and incremental simulators in virtual trajectores

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/

2. Accuracy of different simulators in the real scenario

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/

3. Performance comparison of different methods on our incremental simulator

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/

4. Comparison of the economic effectiveness in the 2nd pilot project.

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/

5. Overall economic effectiveness comparison of the 2nd pilot project.

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/

6. The pair relationship among four action variables over time

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/

Re-train algorithm (not necessary)

Please set different random number seeds, otherwise the original result will be overwritten.

1. Simulator

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/

2. SAC

Running the follow command:

python sac_main.py

You will obtain the model of SAC algorithm.

The results are stored in ./SAC/sac_model

3. EGA

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/

High-level overview of source files

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 1
  • vs_simulators.py: Figure 3
  • python vs_methods.py: Figure 4
  • python liaoyang_harvest.py: Figure 5
  • python liaoyang_economic.py: Table 2
  • python liaoyang_analysis.py: Figure S4 to S13
  • python train_simulator.py: baseline and incremental simulators
  • python sac_main.py: The strategy of SAC algorithm
  • python ega_main.py: The strategy of EGA algorithm

Other information description

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.

Environment dependencies for running

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%