(self, *args)
return self.And(constraints)
At most one of the bool expressions can be true at anytime.

        This using a quadratic encoding:
           A -> !(B \\/ C)
           B -> !(C)
At most one of the bool expressions can be true at anytime.
At most one of the bool expressions can be true at anytime .
def AtMostOne(self, *args):
        """ At most one of the bool expressions can be true at anytime.

        This using a quadratic encoding:
           A -> !(B \\/ C)
           B -> !(C)
        """
        bool_exprs = self._polymorph_args_to_tuple(args)
        constraints = []
        for (i, elem) in enumerate(bool_exprs[:-1], start=1):
            constraints.append(self.Implies(elem,
                                            self.Not(self.Or(bool_exprs[i:]))))
        return self.And(constraints)
def AtMostOne ( self , * args ) : bool_exprs = self . _polymorph_args_to_tuple ( args ) constraints = [ ] for ( i , elem ) in enumerate ( bool_exprs [ : - 1 ] , start = 1 ) : constraints . append ( self . Implies ( elem , self . Not ( self . Or ( bool_exprs [ i : ] ) ) ) ) return self . And ( constraints )