add cp_model proto to the sat solver

This commit is contained in:
Laurent Perron
2017-05-29 14:45:17 +02:00
parent d11343b465
commit e3d72e5b3b
31 changed files with 5380 additions and 313 deletions

View File

@@ -187,7 +187,7 @@ class SumArray(LinearExpr):
"""Represents the sum of a list of LinearExpr."""
def __init__(self, array):
self.__array = map(CastToLinExp, array)
self.__array = [CastToLinExp(elem) for elem in array]
def __str__(self):
return '({})'.format(' + '.join(map(str, self.__array)))