Set limit on the number of conflicts.
771040
def conf_budget(self, budget):
        

        if self.maplesat:
            pysolvers.maplesat_cbudget(self.maplesat, budget)
212451
def set_limits(self, limits):
        

        # First task, build the checksum of the new limits
        chksum = hashlib.md5()  # sufficient for our purposes
        for lim in limits:
            chksum.update(lim)
        new_sum = chksum.hexdigest()

        # Now install it
        with self.limit_lock:
            if self.limit_sum == new_sum:
                # No changes
                return
            self.limit_data = [msgpack.loads(lim) for lim in limits]
            self.limit_sum = new_sum
295637
def _rlimit_min(one_val, nother_val):
    """"""
    if one_val < 0 or nother_val < 0 :
        return max(one_val, nother_val)
    else:
        return min(one_val, nother_val)
367688
private void applyVerticalLimit()
    {
        if (mover.getY() < limitBottom && limitBottom != Integer.MIN_VALUE)
        {
            mover.teleportY(limitBottom);
        }
        else if (mover.getY() > limitTop && limitTop != Integer.MAX_VALUE)
        {
            mover.teleportY(limitTop);
        }
    }
1111033
private <T> void addLimit(ElementDescriptor<T> descriptor, T limit)
	{
		if (mLimit == null)
		{
			mLimit = new HashMap<ElementDescriptor<?>, Object>(6);
		}
		mLimit.put(descriptor, limit);
	}
368711
def set_out(self, que_out, num_followers):
        """"""
        self._que_out = que_out
        self._num_followers = num_followers
860428
def setbpf(self, bpf):
        """"""
        self._bpf = min(bpf, self.BPF)
        self._rng_n = int((self._bpf + self.RNG_RANGE_BITS - 1) / self.RNG_RANGE_BITS)
129516
def set_timelimit(self, timelimit):
        """"""
        super().set_timelimit(timelimit)
        self.qparams["wall_clock_limit"] = qu.time2loadlever(timelimit)
1033647
public void setLinearUpperLimits(float limitX, float limitY, float limitZ) {
        Native3DGenericConstraint.setLinearUpperLimits(getNative(), limitX, limitY, limitZ);
    }
425336
def _EnforceProcessMemoryLimit(self, memory_limit):
    
    # Resource is not supported on Windows.
    if resource:
      if memory_limit is None:
        memory_limit = 4 * 1024 * 1024 * 1024
      elif memory_limit == 0:
        memory_limit = resource.RLIM_INFINITY

      resource.setrlimit(resource.RLIMIT_DATA, (memory_limit, memory_limit))
1339847
public SearchOptions setLimit(int limit) {
    if (limit <= 0) {
      this.limit = MAX_LIMIT;
    } else {
      this.limit = Math.min(limit, MAX_LIMIT);
    }
    return this;
  }
436226
def update_values(self, min=None, max=None, conflict='warning'):
		
		conflict_txt = None
		if min is not None:
			if min > self.min:
				if min > self.max:
					self.max = self.highest
					self.prefer_highest = False
					conflict_txt = 'Minimum {0:s} conflicts with maximum {1:s}; minimum is higher so it takes precedence, but lower values in range are not preferred.'.format('{0:d}.{1:d}'.format(*self.to_tup(min)), '{0:d}.{1:d}'.format(*self.to_tup(self.max)))
				self.min = min
		if max is not None:
			if max < self.max:
				if max >= self.min:
					self.max = max
				else:
					self.prefer_highest = False
					conflict_txt = 'Maximum {0:s} conflicts with minimum {1:s}; minimum is higher so takes it precedence, but lower values in range are now preferred.'.format('{0:d}.{1:d}'.format(*self.to_tup(max)), '{0:d}.{1:d}'.format(*self.to_tup(self.min)))
		if conflict_txt:
			version_problem_notify(conflict_txt, conflict=conflict)
848174
def first_failing(conflict_set_size, crs, continuous: false, max_iterations: nil)
      min_idx = conflict_set_size
      max_idx = crs.nb_constraints - 1

      loop do
        unless max_iterations.nil?
          return min_idx..max_idx if max_iterations <= 0
          max_iterations -= 1
        end
        half_constraint_idx = (max_idx + min_idx) / 2
        # puts "Refining: [#{min_idx}:#{max_idx}] -> #{half_constraint_idx}"
        crs2 = crs.restrict_to_n_constraints(half_constraint_idx + 1)
        problem = Problem.from_compressed_row_storage(crs2, continuous: continuous)
        if infeasible?(problem)
          max_idx = half_constraint_idx
          # puts "                                INFEAS"
        else
          min_idx = half_constraint_idx + 1
          # puts "                                FEAS"
        end
        next if max_idx != min_idx
        return nil if max_idx > crs.nb_constraints
        return min_idx..max_idx
      end
      # Shouldn't come here if the whole problem is infeasible
      nil
    end
746130
public function limitToOnline()
    {
        $this->leftJoin('cc._mainnode', 'mp');
        $this->andWhere('mp._state IN (:states)')
             ->setParameter('states', array(Page::STATE_ONLINE, Page::STATE_ONLINE | Page::STATE_HIDDEN));
        $this->andWhere('mp._publishing < :today OR mp._publishing IS NULL')
             ->setParameter('today', new \DateTime());
    }
897777
def limiter(self, gain=3.0):
        
        self.command.append('gain')
        self.command.append('-l')
        self.command.append(gain)
        return self
542496
protected function controlLimit(array &$product_ids)
    {
        $limit = $this->getLimit();

        if (!empty($limit)) {
            $product_ids = array_slice($product_ids, 0, $limit);
        }
    }
909523
def q_limited(self):
        
        if (self.q >= self.q_max) or (self.q <= self.q_min):
            return True
        else:
            return False