This project contains a cgo-based API for using Google's Operations Research
tools. Code is generated in the ortoolsswig
folder, but the generated code is
ugly, so most people will want to use the ortoolsgo
package, which is written
on top of the swig bindings.
The library compiles with bazel. For example, the tests can be run with this command:
ibazel test //ortoolsswig:go_default_test
For now, some generated files are checked in. They can be regenerated using this command if or-tools and abseil-cpp are checked out:
bazel run //third_party:bazel-swig -- \
-v -go -cgo -c++ -intgosize 64 \
-I/home/red/git/or-tools \
-I/home/red/git/abseil-cpp \
-o /home/red/git/or-tools-go/ortoolsswig/linear_solver_go_wrap.cc \
-module ortoolsswig \
/home/red/git/or-tools-go/ortoolsswig/linear_solver.i
It will be necessary to clone absl and or-tools: