R/set.constr.type.R

Defines functions set.constr.type

Documented in set.constr.type

set.constr.type <- function(lprec, types, constraints = 1:m)
{
  m <- dim(lprec)[1]

  if(length(types) != length(constraints))
    stop(sQuote("types"), " and ", sQuote("constraints"),
         " are not the same length")

  if(is.character(types))
    types <- match(types, c("<=", ">=", "="), nomatch = 0)

  .Call(RlpSolve_set_constr_type, lprec, as.integer(constraints),
        as.integer(types))

  invisible()
}

Try the lpSolveAPI package in your browser

Any scripts or data that you put into this service are public.

lpSolveAPI documentation built on Sept. 3, 2023, 5:07 p.m.