View source: R/132_problems_problem.R
| psolve | R Documentation |
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.
psolve(
problem,
solver = NULL,
gp = FALSE,
qcp = FALSE,
verbose = FALSE,
warm_start = FALSE,
feastol = NULL,
reltol = NULL,
abstol = NULL,
num_iter = NULL,
...
)
problem |
A |
solver |
Character string naming the solver to use (e.g.,
|
gp |
Logical; if |
qcp |
Logical; if |
verbose |
Logical; if |
warm_start |
Logical; if |
feastol |
Numeric or |
reltol |
Numeric or |
abstol |
Numeric or |
num_iter |
Integer or |
... |
Additional solver-specific options passed directly to the
solver. If a solver-native parameter name conflicts with a standard
parameter (e.g., both |
The optimal objective value (numeric scalar), or Inf /
-Inf for infeasible / unbounded problems.
Problem, status,
solver_stats, solver_default_param
x <- Variable()
prob <- Problem(Minimize(x), list(x >= 5))
result <- psolve(prob, solver = "CLARABEL")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.