hi_solver_add_cols | R Documentation |
This function adds new variables (columns) to the optimization model.
hi_solver_add_cols(solver, costs, lower, upper, start, index, value)
solver |
An object of class "highs_solver". |
costs |
A numeric vector of objective coefficients. |
lower |
A numeric vector giving the lower bounds of the new variables. |
upper |
A numeric vector giving the upper bounds of the new variables. |
start |
An integer vector of starting positions in the sparse matrix. |
index |
An integer vector of row indices. |
value |
A numeric vector of coefficient values. |
The solver instance with new variables added.
solver <- example_solver()
hi_solver_add_cols(solver, c(1), c(0), c(10), c(0, 1), c(0), c(2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.