From 8cb2838ee218c4dcbbb87b84e5e695a6a9968009 Mon Sep 17 00:00:00 2001 From: dan-du-car <62157949+dan-du-car@users.noreply.github.com> Date: Mon, 1 Jul 2024 11:27:06 -0400 Subject: [PATCH] Update actions with start and stop locations at PVL lab (#619) # PR Details ## Description Update V2X Hub Port Drayage Plugin actions with new start/stop locations for testing in PVL Lab: - PICKUP location: [3.7, -5.8] - EXIT_STAGING_AREA location: [0.0, 0.2] Latitude is mapped to Y axis, and longitude is mapped to X axis. The locations are picked from the pvl graph: https://github.com/usdot-fhwa-stol/c1t_bringup/blob/develop/graphs/pvl_graph.geojson?short_path=4609dc2 ## Related Issue https://usdot-carma.atlassian.net/browse/CF-495 ## Motivation and Context NA ## How Has This Been Tested? NA ## Types of changes - [ ] Defect fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that cause existing functionality to change) ## Checklist: - [ ] I have added any new packages to the sonar-scanner.properties file - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [x] I have read the **CONTRIBUTING** document. [V2XHUB Contributing Guide](https://github.com/usdot-fhwa-OPS/V2X-Hub/blob/develop/Contributing.md) - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. --- configuration/mysql/pvl_lab/README.md | 11 +++++ configuration/mysql/pvl_lab/port_drayage.sql | 49 ++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 configuration/mysql/pvl_lab/README.md create mode 100644 configuration/mysql/pvl_lab/port_drayage.sql diff --git a/configuration/mysql/pvl_lab/README.md b/configuration/mysql/pvl_lab/README.md new file mode 100644 index 000000000..f96ce81ac --- /dev/null +++ b/configuration/mysql/pvl_lab/README.md @@ -0,0 +1,11 @@ +# PVL Actions +These are Port Drayage actions created for the PVL Lab for testing of C1T functionality. + +## Instructions +Replace the port_drayage.sql file in docker-compose.yml with the file in this directory. +``` +db: + image: mysql:8.0 + volumes: + - ./mysql/pvl_lab/port_drayage.sql:/docker-entrypoint-initdb.d/port_drayage.sql +``` diff --git a/configuration/mysql/pvl_lab/port_drayage.sql b/configuration/mysql/pvl_lab/port_drayage.sql new file mode 100644 index 000000000..b1426768e --- /dev/null +++ b/configuration/mysql/pvl_lab/port_drayage.sql @@ -0,0 +1,49 @@ +-- MySQL 8.0 for Linux amd64 (x86_64) and arm64 (aarch64) +-- +-- Host: 127.0.0.1 Database: PORT_DRAYAGE +-- ------------------------------------------------------ +-- Server version 7.6.0 +-- Current Database: `PORT_DRAYAGE` +-- + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `PORT_DRAYAGE` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `PORT_DRAYAGE`; + +-- +-- Table structure for table `first_action` +-- + +DROP TABLE IF EXISTS `first_action`; +CREATE TABLE `first_action` ( + `cmv_id` varchar(20) NOT NULL, + `cargo_id` varchar(20) DEFAULT NULL, + `destination_lat` decimal(9,7) NOT NULL, + `destination_long` decimal(9,7) NOT NULL, + `operation` varchar(20) NOT NULL, + `action_id` varchar(36) NOT NULL, + `next_action` varchar(36) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +LOCK TABLES `first_action` WRITE; +INSERT INTO `first_action` VALUES ('C1T-1','CARGO_A',-5.8,3.7,'PICKUP','4bea1c45-e421-11eb-a8cc-000c29ae3c1t','32320c8a-e422-11eb-a8cc-000c29ae3c1t'); +UNLOCK TABLES; + +-- +-- Table structure for table `freight` +-- + +DROP TABLE IF EXISTS `freight`; +CREATE TABLE `freight` ( + `cmv_id` varchar(20) NOT NULL, + `cargo_id` varchar(20) DEFAULT NULL, + `destination_lat` decimal(9,7) NOT NULL, + `destination_long` decimal(9,7) NOT NULL, + `operation` varchar(20) NOT NULL, + `action_id` varchar(36) NOT NULL, + `next_action` varchar(36) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +LOCK TABLES `freight` WRITE; +INSERT INTO `freight` VALUES ('C1T-1',NULL,0.2,0.0,'EXIT_STAGING_AREA','32320c8a-e422-11eb-a8cc-000c29ae3c1t','4ace39e6-ee36-11eb-9a03-0242ac130c1t'); +UNLOCK TABLES;