% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stop.R
\name{vrpr_stop}
\alias{vrpr_stop}
\alias{max_runtime}
\alias{max_iterations}
\alias{no_improvement}
\alias{first_feasible}
\title{Solver stopping criteria}
\usage{
max_runtime(seconds)

max_iterations(max_iters)

no_improvement(n)

first_feasible()
}
\arguments{
\item{seconds}{Maximum run time, in seconds.}

\item{max_iters}{Maximum number of iterations.}

\item{n}{Number of consecutive iterations without improvement before stopping.}
}
\value{
An object of class \code{vrpr_stop}: a function
\verb{function(best_cost, feasible)} returning \code{TRUE}/\code{FALSE}.
}
\description{
Control when the iterated local search loop should terminate. Each function
returns a callable object (closure) that the solver invokes every iteration,
receiving the cost of the current best solution and returning \code{TRUE} to stop.
}
\details{
These are the R equivalent of PyVRP's \code{pyvrp.stop} module.
}
