hi_solver_add_rows: Add Constraints to Model

View source: R/solver-api.R

hi_solver_add_rowsR 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))


highs documentation built on June 8, 2025, 10:36 a.m.