3

I have installed the ortools exactly as mentioned in this link.

After that, I copied vehicle routing problem from the documentation and tried to execute.I am using python 2.7.12 in my system.

I ended up with the below error:

   >>python or_test.py 
      Traceback (most recent call last):
      File "or_test.py", line 120, in <module>
      main()
      File "or_test.py", line 52, in main
     search_parameters = pywrapcp.DefaultRoutingSearchParameters()
   AttributeError: 'module' object has no attribute 
  'DefaultRoutingSearchParameters'

Example problem link : https://developers.google.com/optimization/routing/tsp/vehicle_routing

James Z
  • 12,209
  • 10
  • 24
  • 44
Neelesh I
  • 415
  • 1
  • 5
  • 14

1 Answers1

4

Based on the example from the repo, you can get default parameters like this instead:

 search_parameters = pywrapcp.RoutingModel.DefaultSearchParameters()
Norrius
  • 7,558
  • 5
  • 40
  • 49