Learn R Programming

highs (version 1.10.0-1)

hi_solver_add_rows: 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)

Value

The solver instance with new constraints added.

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.

Examples

Run this code
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