Optimizing WasteContainer Location
Introduction
This AI services optimizes the placement of used cooking oil (UCO) containers in Valencia to improve urban recycling accessibility and promote environmental sustainability. The service dresses the maximum covering location problem by proposing a genetic algorithm that utilizes context information to strategically position UCO recycling bins throughout the city. The goal is to enhance accessibility for residents while reducing operational costs and environmental impact.
graph TD;
A[Web Frontend] -->|Sends optimization task| B[REST API];
B -->|Submits task to| C[Celery];
C -->|Assigns to a worker| D[Optimization Task];
D -->|Fetches data from| G[Redis];
C -->|Publishes tasks status updates to| F[MQTT Broker];
C -->|Assigns to a worker| H[Periodically Update Data Task ];
H -->|Gets data from| I[City Data Platform];
H -->|Stores data in| G[Redis];
Deploy
-
Clone the repository and navigate to its root folder:
-
Create and activate a Python virtual environment:
-
Install all requirements:
-
Create an
.env
file using.env.example
as a guide: -
Then edit the
.env
file and replace theOPENROUTESERVICE_API_KEY
value with your own Openroute service API key. -
Run Redis Container
-
Run RabbitMQ Container
-
Start Celery Worker
-
Finally, start the server and open http://127.0.0.1:5000 in your browser: