3.1. SafeTrack Server
SafeTrack Server receives, processes and provides data to other components of the model.
The server architecture, shown in Fig. 2, is divided into three layers.
The first one is the Services Layer, which provides interfaces to other components to allow them to access the server functionalities and stored data.
This layer is further divided in four modules, which represent distinct groups of functions for the Carrier Station, Website, Delivery Provider and Depot Station.
The Carrier Station Interface contains functions that the mobile devices use to send data about their current position, the vehicle’s velocity and regarding the loads.
This interface also has methods for sending alarms, such as shutting down the device or the GPS and when the mobile application is closed. Additionally, the Carrier Station Interface does the access control of Carrier Stations via a hash table.
This table has all the IMEI encrypted codes with a SHA-1 algorithm of all mobile devices that are registered in the model.
When a Carrier Station sends information to the SafeTrack Server, the component verifies if the SHA-1 code is in the hash table.
If it is contained, it sends the information to the Logical Layer, otherwise it discards that information.
The Website Interface provides tools for administrative actions, such as planning routes, registration of drivers, monitors, Carrier Stations and Depot Stations.
It also provides information to the Website Monitoring and Management be able to perform real-time monitoring of vehicles and loads.
The Delivery Provider Interface supplies methods to the component Delivery Provider.
These methods let the provider to send a new batch of information to be stored into the database.
Furthermore, it allows the Delivery Provider to read, edit, and erase batches from the database.
The Depot Station Interface enables the Depot Stations to read the batches that are going to be sent, and also confirms the deliveries already done.
All the interfaces interact with other components of the model through SOAP messages, that are sent by HTTPS protocol.
The SOAP is used because it is a W3C standard (W3C, 2012), being widely employed by the industry.
The use of HTTPS as a transport protocol allows a transmission where the data is encrypted, being able to verify the authenticity between the described interfaces and other components of the model by digital certification.
The second layer is the Logical Layer, which processes and manages data.
It has algorithms for position calculations, Geofence, initialization and finishing travels, loads management, and also decision-making for alarms sending in case of inconsistencies in logistics flow, detour routes and optimizations for loads delivery.
The SafeTrack uses the Travel Manager and Geofencing Checker modules developed in SWTrack .
The Travel Manager module is in charge of initializing and finalizing travels automatically using Geofence concepts through the POI (Point of Interest) technique .
The Geofencing Checker analyzes continuously if the vehicles are following the planned route using two different Geofence solutions also proposed in SWTrack .
Moreover, we developed two modules that do the load’s management (Goods Manager) and optimization of deliveries (Delivery Optimizer).
The Goods Manager module controls and manages the delivery of a loads’ set during the logistics chain, allowing the sending of automatic alarms when some nonconformities occur in the load’s flow, such as loads that are delivered at wrong places or removed at disallowed spots.
Moreover, it does the initialization and finalizing of loads in an automatic way, without any user interaction with the SafeTrack.
The Goods Manager employs the POI technique adding an interest point at each Depot Station that the Carrier Station will pass by.
In Fig. 3 we show two green circumferences that limit the points where the Carrier Station has to do pickups and deliveries.
For all entering events of load in Carrier Station, the Goods Manager verifies in database if the load belongs to a set to be transported by the vehicle.
It checks if all loads were picked up by the Carrier Station, and then the Goods Manager initializes the set.
The finalizing of sets is done in similar way.
For each leaving event of a load in the Carrier Station, the Goods Manager verifies in database if the load belongs to a set that has to be delivered in the Depot Station. After verifying that all the loads left the Carrier Station, the Goods Manager does the finalizing of a set.
Furthermore, the Goods Manager detects the occurrence of errors Fig. 2. SafeTrack Server architecture.
during the logistics flow, respectively: location;
When SafeTrack detects the occurrence of an error, the Goods Manager saves an alarm in database through the Data Access Layer, so the responsible for monitoring can visualize it in the Website Monitoring and Management. Moreover, it returns a warning code to Carrier Station, so the SafeTrack Mobile can send alarms to the load’s responsible.
The module Delivery Optimizer is in charge of doing optimizations in set’s delivery.
The ideal solution calculates the optimization when a new set arrives, through the Delivery Provider, and creates a new route to the closest Carrier Station from the set’s origin.
However, it does not apply in fact, because the ongoing route’s alternative is not viable, since it is not always possible to reestablish a new route during a travel. This is due to structural problems, such as one way streets, impossibility of U-turns, difficulties in maneuvering a truck, among others.
Moreover, an unexpected information can distract the driver attention while driving.
To avoid this problem, we adopted an approach that does the optimization in two ways: creating optimal routes for set’s delivery and verifying if exists a new set to be delivered on the planned route, whenever it enters in a Depot Station.
This work does not aim at presenting a new solution for creation of deliveries routes, because many solutions tackled this issue.
Among the proposals for creation of routes, we highlight which obtained optimal solutions and with low computational costs.
These algorithms calculate the best route to be done by the vehicle, disposing of information such as weight and volume supported by the vehicle, pickup and delivery spot of the set, timewindow, and weight and volume of the set.
The logistics planner can automatically create delivery routes or plan them manually by the Website Monitoring and Management.
With the automatic creation, the website requests the SafeTrack Server to delegate the task to the module Delivery Optimizer.
Then the Delivery Optimizer requests to the database the necessary information for the route creation, and calculates and returns to the website the route to be traveled.
The Delivery Optimizer can also be executed in an ongoing travel, aiming to check if there is another set that can be delivered on the planned route.
When a Carrier Station enters in a Depot Station to pick up or to deliver, the Depot Station always makes a call to the SafeTrack Server that delegates to the Delivery Optimizer the task of checking if the database has a new set that can be delivered by a vehicle on its planned route, also considering its limitations of weight and volume.
If exists, the SafeTrack Server returns to the Depot Station the set’s code. With that, the operator of the Depot Station and the driver can confirm if the attribution of the set is viable.