Solves the problem and returns the optimal objective value. After solving,
variable values can be retrieved with value, constraint
dual values with dual_value, and solver information with
solver_stats.
Usage
psolve(
problem,
solver = NULL,
gp = FALSE,
qcp = FALSE,
verbose = FALSE,
warm_start = FALSE,
...
)Arguments
- problem
A
Problemobject.- solver
Character string naming the solver to use (e.g.,
"CLARABEL","SCS","OSQP","HIGHS"), orNULLfor automatic selection.- gp
Logical; if
TRUE, solve as a geometric program (DGP).- qcp
Logical; if
TRUE, solve as a quasiconvex program (DQCP) via bisection. Only needed for non-DCP DQCP problems.- verbose
Logical; if
TRUE, print solver output.- warm_start
Logical; if
TRUE, use the current variable values as a warm-start point for the solver.- ...
Solver options passed to
solver_opts(). Includes chain-construction options (use_quad_obj), standard tolerances (feastol,reltol,abstol,num_iter), and solver-specific parameters (e.g.,eps_abs,scip_params). Seesolver_optsfor details. For DQCP problems (qcp = TRUE), additional arguments includelow,high,eps,max_iters, andmax_iters_interval_search.
Value
The optimal objective value (numeric scalar), or Inf /
-Inf for infeasible / unbounded problems.
