genthalili / searoute-py

A python package to calculate the shortest sea route between two points on Earth.
Apache License 2.0
63 stars 14 forks source link

Incorrect routes with restrictions on babalmandab #32

Closed Niloufar375 closed 3 weeks ago

Niloufar375 commented 2 months ago

``Hello, As you know with the current situation of the red sea crisis, most of the vessels are passing through the cape of good hope instead of taking the babalmandab region . My problem is concerning routes for origin/destination ports such as Singapore and Jeddah , where the vessels are passing through the cape of good hope then suez canal to meet the port call Jeddah. However, with the current argument in the route calculation function the restriction for 'babalmandab' does not seem to have any effect as I still get the route that passes through this region ( babalmandab ) .

route = sr.searoute(origin, destination,restrictions=['babalmandab'])

Screenshot 2024-04-30 173349

genthalili commented 3 weeks ago

Hi @Niloufar375, This was obviously a bug in the marnet network which had a hidden connected line on top of "babalmandab" passage, now it's fixed and will be visible in version 1.4.0 from pypi.

Meanwhile you can use this commit https://github.com/genthalili/searoute-py/commit/4dce9f57ea435a3ca2beefe7e3249b02496d011e

image

Thanks for reporting this!

Niloufar375 commented 3 weeks ago

Hey @genthalili !

Thanks for making the change , can I ask if you have a rough idea of when you will release the new version ?

genthalili commented 3 weeks ago

it should be ready during coming days, latest next week.

there is a need to test some new functionalities as some important changes have been made, also feel free to test at your end for your specific case.