R/class-constraint.R

Defines functions new_constraint

#' A class representing a constraint
#'
#'
#' @noRd
new_constraint <- function(lhs,
                           sense,
                           rhs) {
  stopifnot(sense %in% c("<=", "==", ">="))
  structure(list(lhs = lhs,
                 sense = sense,
                 rhs = rhs),
            class = "model_constraint")
}
dirkschumacher/romp documentation built on Oct. 6, 2018, 4:36 a.m.