RLTrajPart is a reinforcement learning driven elastic partitioning framework for distributed trajectory stream analytics.
- Java 8
- Apache Flink 1.17
- Kafka 3.4.0
- Python.version = 3.8.19
- PyTorch.version = 2.3.0
The system contains two main components: the trajectory stream analytics on the Flink side, and the reinforcement learning agent implemented with PyTorch.
For the Flink side, compile the Java code with mvn package
. For the RL agent, install the required Python packages in RL/requirements.txt
.
The parameters are configured in TrajectoryFlink\src\main\resources\conf\trajectoryflink-conf.yml
and RL/config.py
respectively.
- Run
python/RL/train.py
to start the RL agent server. - Run the Java class
job.TraSimSearch/TraRangeQuery/TraCluSearch
to collect the offline data. - Run
python/RL/offlineData.py
to process the offline data.
- Run
python/RL/test.py
to start the RL agent server. - Run the Java class
job.TraSimSearch/TraRangeQuery/TraCluSearch
to start the online process.
We use two real-world datasets: T-Drive, Chengdu Taxi and one synthetic dataset: BrinkHoff.