TUDelft-CITG / halem

HALEM is a python package for optimizing shipping routes. This package provides an algorithm for optimizing the route for a given hydrodynamic model.
https://halem.readthedocs.io
MIT License
12 stars 4 forks source link

Examples in docs need to import halem.Base_functions #9

Open kevinrosa opened 2 years ago

kevinrosa commented 2 years ago

Describe the bug The Examples code calls several functions which it does not import:

halem.HALEM_time
halem.HALEM_space
halem.HALEM_cost
halem.HALEM_co2
halem.plot_timeseries2

https://github.com/TUDelft-CITG/HALEM/blob/f7fdb51919654361843dade4f583a0c4a36a17fb/docs/examples.rst

To Reproduce Try running the code as-written in the Examples doc.

My workaround

import halem.Base_functions as Base

path_t, time_t, dist_t = Base.HALEM_time(start, stop, t0, v_max, Roadmap_t)
path_s, time_s, dist_s = Base.HALEM_space(start, stop, t0, v_max, Roadmap_t)
path_c, time_c, dist_c = Base.HALEM_cost(start, stop, t0, v_max, Roadmap_t)
path_p, time_p, dist_p = Base.HALEM_co2(start, stop, t0, v_max, Roadmap_t)

Base.plot_timeseries2(path_t, time_t, Roadmap_t, 'r')

Note Just learned about your thesis, looks like nice work. Currently I'm trying out VISIR and HALEM. Would be happy to discuss further if you're interested.