hi_solver_add_rows | R Documentation |
This function adds new constraints (rows) to the optimization model.
hi_solver_add_rows(solver, lhs, rhs, start, index, value)
solver |
An object of class "highs_solver". |
lhs |
A numeric vector of left-hand side bounds. |
rhs |
A numeric vector of right-hand side bounds. |
start |
An integer vector of starting positions in the sparse matrix. |
index |
An integer vector of column indices. |
value |
A numeric vector of coefficient values. |
The solver instance with new constraints added.
solver <- example_solver()
hi_solver_add_rows(solver, c(-Inf), c(10), c(0, 2), c(0, 1), c(1, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.