Code Monkey home page Code Monkey logo

dqn_irrigation-in-agriculture's Introduction

Irrigation Optimization with a Deep Reinforcement Learning model - Case study on a site in Portugal

we trained a deep Q(LSTM)-Networks network model that uses histirocal cliamte data, soil moisture and evapotranspiration, and simply tells farmers when and how much to irrigate to achieve the best productivity without wasting water for a tomato field.

Framework

First, historical data are collected from various sources and prepared for use as input to the models. Then, two LSTM models are trained on the obtained historical data to predict soil moisture for the next day and tomato yield at the end of a season, respectivly. Training the LSTM models is a unique process and after training, they use as a feature in the DRL training environment, which takes the current state $s$ (historical climate data) and action $a$ (amount of irrigation), and then returns the next state $s'$ and reward $r$. During the agent's training, it selects an action for the next irrigation based on the current state of the field and evaluates that action using a function called $Q$-value. The environment receives the current state and the action chosen by the agent and indicates the next state and the reward. This interaction between the DRL agent and training environment is repeated until the DRL agent converges to an optimal strategy for choosing the next day's irrigation amount.

Installation

The model depends on the following Python packages:

numpy

tensorflow

sklearn

pandas

matplotlib

For more information about the version see requirement.txt

About the Model

choos_action: Number of actions that agent can selected from them

Agent: Contains the class of DQN agent and training the model.

environment: A class that define the environment of the agent.

test: test the trained agent on the test set.

train: training the agent

Citation

@article{alibabaei2022, title = {Irrigation optimization with a deep reinforcement learning model: Case study on a site in Portugal}, journal = {Agricultural Water Management}, volume = {263}, pages = {107480}, year = {2022}, issn = {0378-3774}, url = {https://www.sciencedirect.com/science/article/pii/S0378377422000270}, author = {Khadijeh Alibabaei and Pedro D. Gaspar and Eduardo Assunção and Saeid Alirezazadeh and Tânia M. Lima}, }

dqn_irrigation-in-agriculture's People

Contributors

falibabaei avatar

Stargazers

 avatar

Watchers

 avatar  avatar

dqn_irrigation-in-agriculture's Issues

Model files missing

From where we can get these two model files?

lstm_TSW=tf.keras.models.load_model('SoilWater_fadagosa.h5') #model prediction fro water content
lstm_y=tf.keras.models.load_model('yeild_estimation_fadagosa.h5') #predict yield at the end of season

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.