def add_release_constraint(self, log_list: List[LogEntry]): if len(log_list): var_set = [ Variable.release_var(log_entry) for log_entry in log_list ] self.rel_constraints_.add(VariableList(var_set)) self.rel_cs_list_.append(var_set)
def add_release_constraint(self, log_list: List[LogEntry], objid: int): if len(log_list): var_set = [Variable.release_var(log_entry) for log_entry in log_list if not log_entry.is_sleep_ ] self.rel_constraints_.append(VariableList(var_set, LogEntry.int_to_objid[objid])) self.rel_cs_list_.append(var_set)