powered by
This function adds new constraints (rows) to the optimization model.
hi_solver_add_rows(solver, lhs, rhs, start, index, value)
The solver instance with new constraints added.
An object of class "highs_solver".
A numeric vector of left-hand side bounds.
A numeric vector of right-hand side bounds.
An integer vector of starting positions in the sparse matrix.
An integer vector of column indices.
A numeric vector of coefficient values.
solver <- example_solver() hi_solver_add_rows(solver, c(-Inf), c(10), c(0, 2), c(0, 1), c(1, 2))
Run the code above in your browser using DataLab