% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/problem_data.R
\name{vrp_problem_data}
\alias{vrp_problem_data}
\title{Assemble the problem data (ProblemData) from a model}
\usage{
vrp_problem_data(model, distance = NULL, duration = NULL)
}
\arguments{
\item{model}{A \code{\link[=vrp_model]{vrp_model()}} with at least one depot and one vehicle type.}

\item{distance, duration}{Matrices (\code{numeric}, \verb{n x n}, locations in
depots-then-clients order) of distance and duration. If \code{NULL}, they are
computed as the rounded Euclidean distance between coordinates; \code{duration}
defaults to \code{distance}.}
}
\value{
A \code{vrpr_problem_data} object (a wrapper around a C++ external pointer).
}
\description{
Builds PyVRP's C++ \code{ProblemData} structure from a \code{\link[=vrp_model]{vrp_model()}}. Locations
follow PyVRP's convention: depots first (low indices), then clients.
}
\details{
Integer measures (distance, duration, cost, load) travel as R \code{numeric} with
integer semantics; non-integer values are rejected at the C++ boundary. Use
\code{Inf} for "unconstrained" limits (e.g. \code{tw_late}).
}
