ankane / or-tools-ruby

Operations research tools for Ruby
Apache License 2.0
171 stars 20 forks source link

Adding support for OnlyEnforceIf and AddAssumptions #14

Closed braindeaf closed 3 years ago

braindeaf commented 3 years ago

would it be possible to add support for OnlyEnforceIf and AddAssumptions?

RobL

ankane commented 3 years ago

Added

braindeaf commented 3 years ago

Excellent, thank you :)

braindeaf commented 3 years ago

Ever seen this sucker before? I did let MacOSX upgrade the other day and command line tools were definitely not right afterwards.

Robs-MacBook-Pro:or-tools rl$ bundle exec rake test TEST=test/assumptions_sample_sat_test.rb Run options: --seed 3997

Running:

dyld: lazy symbol binding failed: Symbol not found: __ZN19operations_research3sat14CpModelBuilder14AddAssumptionsEN4absl14lts_2020_09_234SpanIKNS0_7BoolVarEEE Referenced from: /Users/rl/repos/or-tools/lib/or_tools/ext.bundle Expected in: flat namespace

dyld: Symbol not found: __ZN19operations_research3sat14CpModelBuilder14AddAssumptionsEN4absl14lts_2020_09_234SpanIKNS0_7BoolVarEEE Referenced from: /Users/rl/repos/or-tools/lib/or_tools/ext.bundle Expected in: flat namespace

rake aborted! SignalException: SIGABRT

ankane commented 3 years ago

Hmm, haven't seen that. Try bundle exec rake clobber compile to see if that fixes it.

braindeaf commented 3 years ago

solved. I had an outdated master branch for starters, needed to uninstall my or-tools installed by brew as well.

Tried adding a test for assumptions but something isn't quite right, would it also be possilbe to add SufficientAssumptionsForInfeasibility ?

https://github.com/ankane/or-tools/pull/17

All the best

ankane commented 3 years ago

Added in 3e31da05b7873129cde5907daab7ddfc6acb83ab.

braindeaf commented 3 years ago

Thanks again.