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

RuntimeError: SWIG std::function invocation failed. #2

Open
yratof opened this issue Jul 6, 2018 · 4 comments
Open

RuntimeError: SWIG std::function invocation failed. #2

yratof opened this issue Jul 6, 2018 · 4 comments

Comments

@yratof
Copy link

yratof commented Jul 6, 2018

Hitting an error whenever i'm not using greedy:

Initial cost: 1175670.59166
Cost after greedy optimization: 51105.4291514
Traceback (most recent call last):
  File "/usr/local/bin/penkit-optimize", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/penkit_optimize/cli.py", line 79, in main
    run_optimizer(**vars(args))
  File "/usr/local/lib/python2.7/site-packages/penkit_optimize/cli.py", line 33, in run_optimizer
    vrp_solution = vrp_solver(path_graph, greedy_solution, runtime)
  File "/usr/local/lib/python2.7/site-packages/penkit_optimize/vrp_solver.py", line 58, in vrp_solver
    search_parameters = pywrapcp.RoutingModel.DefaultSearchParameters()
RuntimeError: SWIG std::function invocation failed.

Any ideas to why invocation failed?

@paulgb
Copy link
Owner

paulgb commented Jul 19, 2018

Hi @yratof, sorry for the slow reply, I was away. What OS are you using, and how did you install or-tools?

Thanks

@yratof
Copy link
Author

yratof commented Jul 19, 2018

macOS and via pip. Possibly attempted via brew too, but I don’t believe had any luck finding it

@paulgb
Copy link
Owner

paulgb commented Jul 20, 2018

Hmm, that should work (I'm using the same setup) -- might be a version mismatch.

What do you get if you run pip freeze | grep ortools?

Here's my output:

~/Projects/penkit/optimizer: pip freeze | grep ortools
ortools==6.7.4973
ortools-examples==6.4.4495

@yratof
Copy link
Author

yratof commented Jul 23, 2018 via email

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

2 participants