Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theemperorofdaiviet/watering-system
A simple knowledge based system using Fuzzy Logic to calculate the flow rate for watering system
https://github.com/theemperorofdaiviet/watering-system
fuzzy-logic knowledge-based-systems python streamlit
Last synced: 11 days ago
JSON representation
A simple knowledge based system using Fuzzy Logic to calculate the flow rate for watering system
- Host: GitHub
- URL: https://github.com/theemperorofdaiviet/watering-system
- Owner: theEmperorofDaiViet
- Created: 2023-12-02T14:54:26.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-19T17:03:44.000Z (about 1 year ago)
- Last Synced: 2023-12-20T10:22:38.994Z (about 1 year ago)
- Topics: fuzzy-logic, knowledge-based-systems, python, streamlit
- Language: Python
- Homepage:
- Size: 3.75 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Table of Contents
# About The Project
A simple knowledge based system using Fuzzy Logic to calculate the flow rate for watering system, based on current temperature, soil moisture and light intensity.> :warning: **Warning**: This project is for educational purposes only and doesn't help anything in real life.
## Built With
* [![Python][Python-shield]][Python-url]
* [![Streamlit][Streamlit-shield]][Streamlit-url]
* [![NumPy][NumPy-shield]][NumPy-url]
* [![Pandas][Pandas-shield]][Pandas-url]
* [![[Matplotlib]][Matplotlib-shield]][Matplotlib-url]
* [![Markdown][Markdown-shield]][Markdown-url]
* [![HTML5][HTML5-shield]][HTML5-url]
* [![CSS3][CSS3-shield]][CSS3-url]# Getting Started
## Prerequisites
Before cloning and using this application, you'll need to install these things on your computer:
* [Python 3.11.0](https://www.python.org/downloads/release/python-3110/): Streamlit is a app framework in Python language, so you need to have Python installed to run this application. I used Python 3.11.0, but I think it works fine with some other releases as well.
* [Streamlit](https://streamlit.io/): a free and open-source framework to rapidly build and share beautiful machine learning and data science web apps.
* [Visual Studio Code](https://code.visualstudio.com/download): You can choose any IDE or Text Editor that you want. To build a simple application like this, I recommend Visual Studio Code.## Installation
You can install this application by cloning this repository into your current working directory:
```sh
git clone https://github.com/theEmperorofDaiViet/watering-system.git
```
After cloning the repository, you can open the project by Visual Studio Code.To install all dependencies needed for this project, open a terminal and type:
```sh
pip install -r requirements.txt
```To run the application, open a terminal and type:
```sh
streamlit run main.py
```
As usual, the app should automatically open in a new tab in your browser. It runs on port 8501 by default.# Key Features
* Get and validate input
* Process input by Fuzzy Logic to calculate suitable flow rate, which consists of 3 steps:
* Fuzzification
* Fuzzy inference
* Defuzzification
* Display all calculations of these steps and visualize them by plots.
* A subpage named "***lib***" provides the same features, but by the [*skfuzzy*](https://pythonhosted.org/scikit-fuzzy/) library, for comparison.# Usage
This is a short video, which converted to gif, to illustrate the features of the application in a nutshell:
- The home page includes a sidebar to navigate through other pages and enter input. The default input is 20°C in temperature, 50% in soil moisture, and 500 µmol/m²/s in light intensity (PAR).
- I change the temperature to 27°C, the soil moisture to 48% and the light intensity to 723 µmol/m²/s, then click Nộp to submit.
- The calculations, the plots and the final result are displayed.
- Finally, I navigate to the lib page to get the result calculated by the [*skfuzzy*](https://pythonhosted.org/scikit-fuzzy/) library.# Contact
You can contact me via:
* [![GitHub][GitHub-shield]][GitHub-url]
* [![LinkedIn][LinkedIn-shield]][LinkedIn-url]
* ![Gmail][Gmail-shield]: [email protected]
* [![Facebook][Facebook-shield]][Facebook-url]
* [![Twitter][Twitter-shield]][Twitter-url]
[Python-shield]: https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54
[Python-url]: https://www.python.org/
[Streamlit-shield]: https://img.shields.io/badge/Streamlit-FF4B4B?style=for-the-badge&logo=Streamlit&logoColor=white
[Streamlit-url]: https://streamlit.io/
[NumPy-shield]: https://img.shields.io/badge/numpy-%23013243.svg?style=for-the-badge&logo=numpy&logoColor=white
[NumPy-url]: https://numpy.org/
[Pandas-shield]: https://img.shields.io/badge/pandas-%23150458.svg?style=for-the-badge&logo=pandas&logoColor=white
[Pandas-url]: https://pandas.pydata.org
[Matplotlib-shield]: https://img.shields.io/badge/Matplotlib-%23ffffff.svg?style=for-the-badge&logo=Matplotlib&logoColor=black
[Matplotlib-url]: https://matplotlib.org/
[Markdown-shield]: https://img.shields.io/badge/Markdown-000000?style=for-the-badge&logo=markdown&logoColor=white
[Markdown-url]: https://www.markdownguide.org/
[HTML5-shield]: https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white
[HTML5-url]: https://www.w3.org/html/
[CSS3-shield]: https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge&logo=css3&logoColor=white
[CSS3-url]: https://www.w3.org/Style/CSS/
[SQLite-shield]: https://img.shields.io/badge/SQLite-07405E?style=for-the-badge&logo=sqlite&logoColor=white
[SQLite-url]: https://www.sqlite.org/index.html[GitHub-shield]: https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white
[GitHub-url]: https://github.com/theEmperorofDaiViet
[LinkedIn-shield]: https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white
[LinkedIn-url]: https://www.linkedin.com/in/khiet-to/
[Gmail-shield]: https://img.shields.io/badge/Gmail-D14836?style=for-the-badge&logo=gmail&logoColor=white
[Facebook-shield]: https://img.shields.io/badge/Facebook-%231877F2.svg?style=for-the-badge&logo=Facebook&logoColor=white
[Facebook-url]: https://www.facebook.com/Khiet.To.Official/
[Twitter-shield]: https://img.shields.io/badge/Twitter-%231DA1F2.svg?style=for-the-badge&logo=Twitter&logoColor=white
[Twitter-url]: https://twitter.com/KhietTo