Skip to content

Commit

Permalink
fix subcircuit with variables. Add todo in globals
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout4 committed Jun 6, 2024
1 parent a1da5c4 commit e4feaf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpmpy/expressions/globalconstraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ def decompose(self):

args, precedence = self.args
if not isinstance(args, NDVarArray):
args = cpm_array(args)
args = cpm_array(args) #TODO i think we can do this in the init, also should go to master
constraints = []
for s,t in zip(precedence[:-1], precedence[1:]):
for j in range(len(args)):
Expand Down
2 changes: 1 addition & 1 deletion xcsp3/executable/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ def ctr_clause(self, pos: list[Variable], neg: list[Variable]): # not in XCSP3-
self._unimplemented(pos, neg)

def ctr_circuit(self, lst: list[Variable], size: None | int | Variable): # size is None in XCSP3 competitions
self.cpm_model += cp.SubCircuitWithStart(lst, start_index=0)
self.cpm_model += cp.SubCircuitWithStart(self.get_cpm_vars(lst), start_index=0)

# # # # # # # # # #
# All methods about objectives to be implemented
Expand Down

0 comments on commit e4feaf8

Please sign in to comment.