You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a project where we need weight constraints to propagate only in one direction. Weight constraints created with create_only_btb or create_only_bfb do not behave as expected. When constraints are created with create_explicit the constraint behaves as expected if only one thread is used.
With explicit disabled the result is as if bfb or btb are not given
* Weight constraints created with flag `create_only_btb` or
`create_only_bfb` must not be transformed to a set of clauses.
* WeightConstraint::cloneAttach() failed to add watch for constraint
if original was created with `create_only_btb` or `create_only_bfb`.
* Solver::hasWatch() failed to handle empty watch list correctly.
Yes, this seems to work. In your commit you wrote that you cannot transform to clauses if only one propagation direction is requested. Wouldn't it be enough to only add "half" of the clauses?
I'm sure you are right and the commit is probably a little lazy. However, I'm not fully convinced that it's actually worth to complicate the code even further.
We have a project where we need weight constraints to propagate only in one direction. Weight constraints created with
create_only_btb
orcreate_only_bfb
do not behave as expected. When constraints are created withcreate_explicit
the constraint behaves as expected if only one thread is used.With explicit disabled the result is as if
bfb
orbtb
are not givenadd_weight_constraint(a, [(b, 1), (c, 1)], 1, bfb)
add_weight_constraint(a, [(b, 1), (c, 1)], 1, btb)
With explicit enabled the result is as expected
add_weight_constraint(a, [(b, 1), (c, 1)], 1, explicit+bfb)
add_weight_constraint(a, [(b, 1), (c, 1)], 1, explicit+btb)
With threads and
explicit
enabled it fails completelyadd_weight_constraint(a, [(b, 1), (c, 1)], 1, explicit+bfb)
add_weight_constraint(a, [(b, 1), (c, 1)], 1, explicit+btb)
Current workaround
To achieve
btb
, I currently add an auxiliary literal (bfb
can be achieved by invertingl
in the weight constraint):Of course this adds an unnecessary literal...
The text was updated successfully, but these errors were encountered: