def _get_constraint_matrix(self, hosts, filter_properties):
        num_hosts = len(hosts)
        num_instances = filter_properties.get('num_instances', 1)
        solver_cache = filter_properties['solver_cache']
        # initialize constraint_matrix
        constraint_matrix = [[True for j in xrange(num_instances + 1)]
                            for i in xrange(num_hosts)]
        solver_cache['constraint_matrix'] = constraint_matrix
        constraint_objects = [cons() for cons in self.constraint_classes]
        constraint_objects.sort(key=lambda cons: cons.precedence)
        precedence_level = 0
        for constraint_object in constraint_objects:
            if precedence_level > constraint_object.precedence:
                # update constraint matrix in the solver cache
                solver_cache['constraint_matrix'] = constraint_matrix
                precedence_level = constraint_object.precedence
            this_cons_mat = constraint_object.get_constraint_matrix(hosts,
                                                        filter_properties)
            if not this_cons_mat:
                continue
            for i in xrange(num_hosts):
                constraint_matrix[i][1:] = [constraint_matrix[i][j + 1] &
                        this_cons_mat[i][j] for j in xrange(num_instances)]
        # update constraint matrix in the solver cache
        solver_cache['constraint_matrix'] = constraint_matrix

        return constraint_matrix
dataset/ETHPy150Open openstack/nova-solver-scheduler/nova_solverscheduler/scheduler/solvers/pulp_solver.py/PulpSolver._get_constraint_matrix/swapped operands of `>`