Skip to content

Commit

Permalink
Merge pull request #1 from 52North/feature/TrafficSeparationScheme
Browse files Browse the repository at this point in the history
Feature/traffic separation scheme
  • Loading branch information
MartinPontius authored May 15, 2024
2 parents 8341e05 + 35d9e5d commit e410bf1
Show file tree
Hide file tree
Showing 14 changed files with 1,156 additions and 10 deletions.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Optional variables (default values provided and don't need to be changed normall
- `ISOCHRONE_PRUNE_SYMMETRY_AXIS`: symmetry axis for pruning. Can be 'gcr' or 'headings_based'
- `ROUTER_HDGS_INCREMENTS_DEG`: increment of headings
- `ROUTER_HDGS_SEGMENTS`: total number of headings (put even number!!); headings are oriented around the great circle from current point to (temporary - i.e. next waypoint if used) destination
- `ROUTE_POSTPROCESSING`: enable route postprocessing to follow the Traffic Separation Scheme in route postprocessing
- `SHIP_TYPE`: options: 'CBT', 'SAL'
- `TIME_FORECAST`: forecast hours weather

Expand Down Expand Up @@ -278,7 +279,7 @@ Route segments are organised in groups before the pruning is performed. Segments
4. *branch-based*: Route segments of one *branch* form a group. Thus all route segments are considered for the pruning. For a particular routing step, a branch is the entity of route segments that originate from one common point.
<figure>
<p align="center">
<img src="figures_readme/branch_based_pruning.png" width="400" " />
<img src="figures_readme/branch_based_pruning.png" width="400" />
</p>
</figure>
<br>
Expand Down Expand Up @@ -422,6 +423,35 @@ The arguments that are passed for the second routing step are the start and end
- lon_end = (lon_end<sub>&#945;</sub>, lon_end<sub>&#946;</sub>,lon_end<sub>&#947;</sub>,lon_end<sub>&#948;</sub>, lon_end<sub>&#949;</sub>,lon_end<sub>&#950;</sub>)

i.e. the latitudes of the end points from the first routing step are now the start coordinates of the current routing step. In contrast to the first routing step, the start coordinates of the second routing step differ for several route segments.
### Route Postprocessing
When the optional config variable `ROUTE_POSTPROCESSING` is enabled, the route is forwarded for postprocessing to follow Traffic Separation Scheme(TSS) rules.
Pgsnapshot schema with Osmosis were used to import OpenSeaMap data into the PostGIS+PostgreSQL database to retrieve TSS related data. The key OpenSeaMap TSS tags considered for route postprocessing are `inshore_traffic_zone`, `separation_boundary`, `separation_lane`, `separation_boundary` and `separation_line`.
The primary TSS rules have been addressed in the current development phase are:
1. If the current route is crossing any Inshore Traffic Zone or other TTS element, then the route should enter and leave the nearest sepeartion lane which is heading to the direction of destination.

<figure>
<p align="center">
<img src="figures_readme/follow_separation_lane.png" height="400" />
</p>
<figcaption> </figcaption>
</figure>

2. If the current route is intersecting the Traffic Separation Lanes and the angle between the route nodes before the intersection and after the intersection is between 60° to 120°, the new route segment is introduced as it is perpendicular to the separation lane and extends towards the last route segment, perpendicularly.

<figure>
<p align="center">
<img src="figures_readme/right_angle_crossing.png" height="400" />
</p>
<figcaption> </figcaption>
</figure>

Furthermore, if the starting node or the ending node is located inside a traffic separation zone, route postprocessing is not further executed.

#### Useful links:

- https://en.wikipedia.org/wiki/Traffic_separation_scheme
- https://wiki.openstreetmap.org/wiki/Seamarks/Seamark_Objects
- Szlapczynski, Rafal. (2012). Evolutionary approach to ship's trajectory planning within Traffic Separation Schemes. Polish Maritime Research. 19. 10.2478/v10012-012-0002-x.<https://www.researchgate.net/publication/271052992_Evolutionary_approach_to_ship's_trajectory_planning_within_Traffic_Separation_Schemes>

## Developing

Expand Down
2 changes: 2 additions & 0 deletions WeatherRoutingTool/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
'ISOCHRONE_PRUNE_SEGMENTS': 20,
'ROUTER_HDGS_INCREMENTS_DEG': 6,
'ROUTER_HDGS_SEGMENTS': 30,
'ROUTE_POSTPROCESSING': False,
'SHIP_TYPE': 'CBT',
'TIME_FORECAST': 90,
'UNDER_KEEL_CLEARANCE': 20
Expand Down Expand Up @@ -92,6 +93,7 @@ def __init__(self, init_mode='from_json', file_name=None, config_dict=None):
self.ROUTER_HDGS_INCREMENTS_DEG = None # increment of headings
self.ROUTER_HDGS_SEGMENTS = None # total number of headings (put even number!!)
self.ROUTE_PATH = None # path to json file to which the route will be written
self.ROUTE_POSTPROCESSING = None # Route is postprocessed with Traffic Separation Scheme
self.SHIP_TYPE = None # options: 'CBT', 'SAL'
self.UNDER_KEEL_CLEARANCE = None # vertical distance between keel and ground
self.TIME_FORECAST = None # forecast hours weather
Expand Down
Loading

0 comments on commit e410bf1

Please sign in to comment.