% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scip.R
\name{scip_solve}
\alias{scip_solve}
\title{Solve a linear or mixed-integer program using SCIP}
\usage{
scip_solve(obj, A, b, sense, vtype = "C", lb = 0, ub = Inf, control = list())
}
\arguments{
\item{obj}{Numeric vector of length \code{n}; objective coefficients.}

\item{A}{Constraint matrix (\code{m x n}). Can be a dense matrix,
\code{dgCMatrix}, or \code{simple_triplet_matrix}.}

\item{b}{Numeric vector of length \code{m}; constraint right-hand side.}

\item{sense}{Character vector of length \code{m}; constraint sense.
Each element must be \code{"<="}, \code{">="}, or \code{"=="}.}

\item{vtype}{Character; variable types. Either a single value applied to all
variables, or a vector of length \code{n}. Values: \code{"C"} (continuous),
\code{"B"} (binary), \code{"I"} (integer). Default \code{"C"}.}

\item{lb}{Numeric; lower bounds for variables. Single value or vector of
length \code{n}. Default \code{0}.}

\item{ub}{Numeric; upper bounds for variables. Single value or vector of
length \code{n}. Default \code{Inf}.}

\item{control}{A list of solver parameters, typically from \code{\link{scip_control}}.}
}
\value{
A named list with components:
\describe{
\item{status}{Character; solver status (e.g., "optimal", "infeasible", "unbounded").}
\item{objval}{Numeric; optimal objective value (or \code{NA} if no solution).}
\item{x}{Numeric vector; primal solution (or \code{NULL} if no solution).}
\item{sol_count}{Integer; number of solutions found.}
\item{gap}{Numeric; relative optimality gap.}
\item{info}{List with additional solver information (solve_time, iterations, nodes).}
}
}
\description{
One-shot interface to the SCIP solver. Formulates and solves:
\deqn{\min_{x} \; obj' x}
subject to constraint rows defined by \code{A}, \code{b}, \code{sense},
with variable types \code{vtype} and bounds \code{lb}, \code{ub}.
}
