Skip to content

Python Interface

All methods are provided through the PWSolver class (src/wrapper_python/wrapper.pyx).

from bin.wrapper import PWSolver
pathwyse = PWSolver()

Return codes

Setter methods return PW_OK (1) on success and PW_FAIL (0) on failure:

from bin.wrapper import PW_OK, PW_FAIL

Reference

  • Problem — reading, creating and configuring the problem (topology, objective, resources)
  • Algorithms — setup, enable/disable, reset, and solve
  • Solutions — accessing, ranking and printing solutions
  • Query — getters for graph, objective and resource data