powered by
This function adds new variables (columns) to the optimization model.
hi_solver_add_cols(solver, costs, lower, upper, start, index, value)
The solver instance with new variables added.
An object of class "highs_solver".
A numeric vector of objective coefficients.
A numeric vector giving the lower bounds of the new variables.
A numeric vector giving the upper bounds of the new variables.
An integer vector of starting positions in the sparse matrix.
An integer vector of row indices.
A numeric vector of coefficient values.
solver <- example_solver() hi_solver_add_cols(solver, c(1), c(0), c(10), c(0, 1), c(0), c(2))
Run the code above in your browser using DataLab