% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model.R
\name{add_vehicle_type}
\alias{add_vehicle_type}
\title{Add a vehicle type to the model}
\usage{
add_vehicle_type(
  model,
  num_available,
  capacity,
  fixed_cost = 0,
  tw_early = 0,
  tw_late = Inf,
  max_duration = Inf,
  unit_distance_cost = 1,
  unit_duration_cost = 0,
  depot = 1L,
  start_depot = depot,
  end_depot = depot,
  reload_depots = integer(0),
  max_reloads = Inf
)
}
\arguments{
\item{model}{A \code{vrpr_model}.}

\item{num_available}{Number of vehicles available of this type.}

\item{capacity}{Vehicle capacity.}

\item{fixed_cost}{Fixed cost per vehicle used.}

\item{tw_early, tw_late}{Vehicle shift time window (start/end). \code{tw_late = Inf}
leaves the end of the shift unconstrained.}

\item{max_duration}{Maximum route duration. \code{Inf} = unconstrained.}

\item{unit_distance_cost, unit_duration_cost}{Variable cost per unit of
distance and of duration for this type. Varying these (and \code{capacity},
\code{fixed_cost}) across calls enables a \strong{heterogeneous fleet}.}

\item{depot}{Index (1-based) of the depot vehicles of this type start from and
return to. Shortcut to set \code{start_depot} and \code{end_depot} together.}

\item{start_depot, end_depot}{Indices (1-based) of the start and end depots, in
the order of \code{\link[=add_depot]{add_depot()}}. Varying them across types enables the
\strong{MDVRP} (multiple depots).}

\item{reload_depots}{Indices (1-based) of depots where vehicles of this type
may reload/empty mid-route, enabling \strong{multi-trip} routes. Empty (default)
= no reloading.}

\item{max_reloads}{Maximum number of reloads per route. \code{Inf} = unconstrained.}
}
\value{
The updated \code{vrpr_model}.
}
\description{
Add a vehicle type to the model
}
\details{
Call \code{add_vehicle_type()} several times for a fleet with multiple
vehicle types (different capacities, costs, shifts or depots).
}
