An interactive web application demonstrating some of the research conducted by Prof. Tias Guns's lab (KU Leuven) within the Tuples Trustworthy AI project. More specifically, it covers parts of the Waste Collection use case (as provided by the industrial partner Optit).
This codebase only includes the work on visualising / explaining previously generated solutions, not how these solutions were generated in the first place. With the demo, an expert planner (user) can explore and compare different solutions against each other. The trade-off between KPI metrics can be studied and with the help of a simulator the robustness of different solutions can be compared. Individual solutions can be analysed in more detail. Once a preferred solution has been selected, the planner can give feedback in the form of a "request for re-optimisation":
- A single vehicle route can be selected for re-optimisation, after which a subset of the assigned garbage bins will be exchanged with a neighbouring vehicle route, re-balancing the workload in the search for an improved solution.
- The selection of routes for re-optimisation can be automated with the use of a Large Neighbourhood Search (LNS) on top of the CPMpy library. A target objective can be selected after which the LNS will repeatedly destroy and repair the given solution in search for improvement.
For easy setup, a docker-compose file is provided (Requires docker to be installed). Simply run:
docker compose up
The demo's webserver should now be listening on port 5006
Alternatively, one can do a manual install:
- Create a
python==3.10virtual environment e.g. using pyenv# install python 3.10 pyenv install 3.10 pyenv local 3.10 # create virtual environment python -m venv .venv # activate virtual environment # - Windows .venv\Scripts\activate # - Linux (depending on shell) source .venv/bin/activate
- Install the project / dependencies
e.g. using
uv(recommended, a really fast package manager for python)or with poetrypip install uv uv sync
pip install poetry poetry install
To start the web application:
python -m panel serve ./app/main.pyHere we will give a small overview of what is included in this demo.
All garbage bins to be collected can be subdivided into clusters depending on their assigned garbage truck. The demo includes a visualisation of these cluster assignments.
By selecting one of such clusters, the rest of the UI will update accordingly by visualising more detailed information on that particular vehicle route.
Once a cluster has been selected, some details on the accompanying vehicle route (physical location and KPI metrics) will get displayed.
More detailed KPIs comparing multiple solutions against each other can also be found:
The distribution bar charts can be used a a selection / filtering operator as to gain insight into which clusters belong to which catergory.
By selecting rows within the KPI table one can switch between the different solutions as to look at one in more detail.
A separate "simulator" popup window is available as to compare the robustness of different solutions against each other. What gets simulated is the effects of an increase in total garbage volume on the achievability of a solution. The original problem description assumes only 85% of garbage bins will be placed outside on a pickup day. The simulator evaluates situations where this percentage were to increase. The higher the curve, the more robust the solution to an increase in garbage volumes.
The user can now give feedback on a selected cluster / route by requesting for a re-optimisation (re-balancing a subset of garbage bins between two vehicles through a destroy and repair operation).
This destroy and repair process can be automated through an LNS loop.













