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
Based on the example from the repo, you can get default parameters like this instead:
search_parameters = pywrapcp.RoutingModel.DefaultSearchParameters()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With