- Transportation Gateway Deployment System
- Table of Contents
- Demo
- Usage
- Environment Configuration
- Deployment steps
- Directory Structure Description
- Contributors
- License
- Citation
- Contact Information
This system is an experimental platform for simulating and analyzing roadside traffic. It uses the data resources and traffic information provided by Baidu Maps API to simulate the roadside traffic environment and collect relevant data. It can be used to evaluate the implementation effect of the relay node deployment algorithm in actual traffic scenarios.
Gateway deployment planning consists of two key steps: roadside sensor node coordinate collection and relay node optimal deployment location calculation. This system provides 8 test datasets that can be used for testing. You can also use the mark mode in the system to mark node coordinates for relay node calculations.
If you only need to run this project for traffic gateway deployment, then only need to configure runtime environment。You can download the version that does not include the matlab algorithm in the release. After downloading, execute the following code to deploy the gateway by accessing localhost:8081
.
java xxx.jar -ak xxxxx
This project supports calling matlab algorithm for calculation, but needs to configure the matlab runtime environment.
- JRE 1.8
- MATLAB Runtime R2016b (9.1)
For deploying applications, Docker can be utilized. The Docker configuration should match the following:
- Docker version: 27.3.1
To deploy the application, navigate to the project's root directory and execute the following command in your terminal:
docker-compose up
This command pulls the required images from Docker Hub based on the docker-compose.yml
file and deploys the application. Please note that due to the size of the data, the deployment process may take approximately 20 minutes. Once the deployment is complete, the service can be accessed through a web browser atlocalhost:8081
If you need to modify the back-end code or modify the front-end page, you need to configure the following environment
- Java Version: Temurin JDK 1.8
- Node.js Version:v16.15.1
- npm Version:9.6.5
- vite Version: 4.4.4
To configure the database for the project, modify the application.properties
file within the src/main/resources
directory with the following details:
spring.datasource.url=jdbc:mysql://<db-host>:<port>/<database-name>
spring.datasource.username=<db-username>
spring.datasource.password=<db-password>
Replace <db-host>, <port>, <database-name>, <db-username>, and <db-password> with your actual database settings. Ensure that your MySQL server is running and accessible at the provided URL and port. The database should be set up with the necessary tables and permissions for the user specified.
The code currently uses the Marks2
database in the local database by default, with the following account and password configuration:
spring.datasource.url=jdbc:mysql://${DB_HOST:localhost}:3306/Marks2?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=${DB_USERNAME:mytest2}
spring.datasource.password=${DB_PASSWORD:12345Qq@}
You can create a new database locally according to the above configuration, and initialize the tables in the database through the init.sql
file to complete the database configuration.
Clone this repository and navigate inside the project root folder.
If you want to modify the style of the front end, please enter the project root directory, and then execute the following code.
cd ./vue
npm install
After installing the dependencies, you can modify the front-end related code in mytestv2/vue/src/App.vue
, and then execute the following command to view the front-end interface.
npm run dev
After the front-end interface is modified, you can compile the static file.
npm run build
Then a static file will be generated in the dist directory, and the spring boot project can be started after moving it to themytest_v2/src/main/resources/static
directory, which can be moved directly through the script
python .\move_build_output.py
The move_build_output.py file will automatically replace the compiled static files in your project. Additionally, it modifies a specific line within the [root project]\src\main\resources\static\index.html file to ensure that the latest version of the static files is served by the Spring Boot application. This automation streamlines the process of updating your web application's frontend without manually handling file transfers or edits.
|-- README.md // help
|-- src // Backend processing related
|-- vue // Front-end vue code
|-- images
|-- mvnw
|-- mvnw.cmd
|-- pom.xml
|-- LICENSE
Thanks goes to these wonderful people (emoji key):
drggboy 💻 📖 |
grtm77 💻 📖 |
|||||
Add your contributions |
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT license.
If you integrate or utilize the datasets provided through our web service in your research or projects, we kindly ask that you acknowledge our contribution by citing the following:
Zhang S, Zhang Z, Yuan H, et al. Relay Node Deployment in Roadside Traffic Detection System Based on Improved Genetic Algorithm[C]//2023 9th International Conference on Computer and Communications (ICCC). IEEE, 2023: 373-378.
If you have any inquiries or require further assistance regarding the dataset, please feel free to contact us.