Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ortools version causing error? #2

Open
markrickert opened this issue Sep 15, 2020 · 0 comments
Open

ortools version causing error? #2

markrickert opened this issue Sep 15, 2020 · 0 comments

Comments

@markrickert
Copy link

I'm trying to get this all up and running and am having a problem running the solver. I've got my planets and sectors mapped but when i run the notebook, i get the following error:

TypeError                                 Traceback (most recent call last)
<ipython-input-5-178cad6ada88> in <module>
     39   return total_distance, best_ortools_path
     40 
---> 41 total_distance, best_ortools_path = solve_tsp_with_ortools(planet_pairwise_distances, 5000)
     42 
     43 print('Total distance: ' + str(total_distance))

<ipython-input-5-178cad6ada88> in solve_tsp_with_ortools(pairwise_distances, max_time)
     16 
     17   # create routing model
---> 18   routing = pywrapcp.RoutingModel(tsp_size, num_routes, depot)
     19   search_parameters = pywrapcp.RoutingModel.DefaultSearchParameters()
     20 

/usr/local/lib/python3.8/site-packages/ortools/constraint_solver/pywrapcp.py in __init__(self, *args)
   3603 
   3604     def __init__(self, *args):
-> 3605         _pywrapcp.RoutingModel_swiginit(self, _pywrapcp.new_RoutingModel(*args))
   3606     __swig_destroy__ = _pywrapcp.delete_RoutingModel
   3607 

TypeError: Wrong number or type of arguments for overloaded function 'new_RoutingModel'.
  Possible C/C++ prototypes are:
    operations_research::RoutingModel::RoutingModel(operations_research::RoutingIndexManager const &)
    operations_research::RoutingModel::RoutingModel(operations_research::RoutingIndexManager const &,operations_research::RoutingModelParameters const &)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant