RLTrajPart is a reinforcement learning driven grid 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.pyto start the RL agent server. - Run the Java class
job.TraSimSearch/TraRangeQuery/TraCluSearch/TraKnnQuery/TraJoinQueryto collect the offline data. - Run
python/RL/offlineData.pyto process the offline data.
- Run
python/RL/test.pyto start the RL agent server. - Run the Java class
job.TraSimSearch/TraRangeQuery/TraCluSearch/TraKnnQuery/TraJoinQueryto start the online process.
We use two real-world datasets: T-Drive, Chengdu and one synthetic dataset: BrinkHoff.