Skip to content

Commit

Permalink
Fix bool_search in the linear library
Browse files Browse the repository at this point in the history
  • Loading branch information
cyderize committed Nov 27, 2023
1 parent 7aa94be commit 53f2eac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions share/minizinc/linear/redefinitions.mzn
Original file line number Diff line number Diff line change
Expand Up @@ -676,9 +676,8 @@ function var 0..1: fVarInBigSetOfInt(var int: x, set of int: s)
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%

annotation bool_search(array[$X] of var bool: x, ann:a1, ann:a2, ann:a3) =
let { array[int] of var bool: xx = array1d(x) } in
int_search([bool2int(xx[i]) | i in index_set(xx)],a1,a2,a3);
annotation bool_search(array[int] of var bool: x, ann: a1, ann: a2, ann: a3) =
int_search([bool2int(x_i) | x_i in x], a1, a2, a3);

annotation warm_start( array[int] of var bool: x, array[int] of bool: v ) =
warm_start( [ bool2int(x[i]) | i in index_set(x) ], [ bool2int(v[i]) | i in index_set(v) ] );
Expand Down

0 comments on commit 53f2eac

Please sign in to comment.