Skip to content

Commit d071cf8

Browse files
committed
add docstring to run_DTALite()
- fix a minor bug in specifying the path of _dtalitemm_dll for Apple Silicon.
1 parent be59da4 commit d071cf8

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

path4gmns/dtaapi.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
_dtalitemm_dll = os.path.join(os.path.dirname(__file__), 'bin/DTALiteMM_x86.dylib')
2323
else:
2424
_dtalite_dll = os.path.join(os.path.dirname(__file__), 'bin/DTALite_arm.dylib')
25-
_dtalite_dll = os.path.join(os.path.dirname(__file__), 'bin/DTALiteMM_arm.dylib')
25+
_dtalitemm_dll = os.path.join(os.path.dirname(__file__), 'bin/DTALiteMM_arm.dylib')
2626
else:
2727
raise Exception('Please build the shared library compatible to your OS\
2828
using source files')
2929

30-
_dtalitemm_engine = ctypes.cdll.LoadLibrary(_dtalitemm_dll)
3130
_dtalite_engine = ctypes.cdll.LoadLibrary(_dtalite_dll)
31+
_dtalitemm_engine = ctypes.cdll.LoadLibrary(_dtalitemm_dll)
3232

3333

3434
_dtalite_engine.network_assignment.argtypes = [ctypes.c_int,
@@ -139,6 +139,29 @@ def perform_network_assignment_DTALite(assignment_mode,
139139

140140

141141
def run_DTALite():
142+
""" Python interface to call the latest DTALite
143+
144+
This version of DTALite includes all-new Logbook, enhanced scenarios
145+
handling, improved I/O functionality, and so on.
146+
147+
Its source code can be found at https://github.com/asu-trans-ai-lab/DTALite.
148+
149+
Parameters
150+
----------
151+
None
152+
153+
Returns
154+
-------
155+
None
156+
157+
WARNING
158+
-------
159+
It is not compatible with the classic DTALite and the corresponding data sets
160+
from https://github.com/jdlph/Path4GMNS/tree/dev/data.
161+
162+
Run it only with data sets from
163+
https://github.com/asu-trans-ai-lab/DTALite/tree/main/dataset_v1.
164+
"""
142165
print('\nDTALite run starts\n')
143166

144167
proc_dta = Process(target=_dtalitemm_engine.DTALiteAPI())

0 commit comments

Comments
 (0)