hi_solver_add_rows {highs} | R Documentation |
Add Constraints to Model
Description
This function adds new constraints (rows) to the optimization model.
Usage
hi_solver_add_rows(solver, lhs, rhs, start, index, value)
Arguments
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. |
Value
The solver instance with new constraints added.
Examples
solver <- example_solver()
hi_solver_add_rows(solver, c(-Inf), c(10), c(0, 2), c(0, 1), c(1, 2))
[Package highs version 1.10.0-2 Index]