Learn R Programming

scip (version 1.10.0-2)

scip_add_linear_cons: Add a linear constraint to a SCIP model

Description

Adds lhs <= sum(coefs * x[vars]) <= rhs.

Usage

scip_add_linear_cons(model, vars, coefs, lhs = -Inf, rhs = Inf, name = NULL)

Value

Integer; 1-based constraint index.

Arguments

model

A SCIP model.

vars

Integer vector; 1-based variable indices.

coefs

Numeric vector; coefficients (same length as vars).

lhs

Numeric; left-hand side. Default -Inf.

rhs

Numeric; right-hand side. Default Inf.

name

Character; constraint name. Default auto-generated.