I have noticed that if no feasible path is found, the following exception is raised:
Exception: Please call the .run() method first
This can happen in at least two situations:
if min_res (or max_res) is too restrictive
when the algorithm did not have enough time to find a path (with time_limit)
I think it would be nice to return None (in bidirec.path/bidirec.total_cost, etc), instead of raising the Exception. This way the user would know that there is nothing wrong with his data, its just that there is no feasible path. Also the current exception may be misleading as the .run()method was called, but it was just not able to find a path successfully.
Hi David,
I have noticed that if no feasible path is found, the following exception is raised:
Exception: Please call the .run() method first
This can happen in at least two situations:
min_res
(ormax_res
) is too restrictivetime_limit
)I think it would be nice to return None (in bidirec.path/bidirec.total_cost, etc), instead of raising the Exception. This way the user would know that there is nothing wrong with his data, its just that there is no feasible path. Also the current exception may be misleading as the
.run()
method was called, but it was just not able to find a path successfully.