[ library(eplex) | Reference Manual | Alphabetic Index ]

# sos2(?Vars)

# EplexInstance:sos2(?Vars)

Constrains all but two consecutive elements of Vars to be zero.

Vars
  A collection of variables

## Description

Constrains all but two consecutive elements of Vars to be zero. In MIP terminology this is called a Special Ordered Set (SOS) of type 2.

If the variables are also required to be integral, this must be separately declared using integers/1. Similarly for bounds.

## See Also

sos1 / 1, integers / 1