Documentation

Model.getSOS()


Model.getSOS()

getSOS ( sos )

Retrieve information about an SOS constraint. The result is a tuple that contains the SOS type (1 or 2), the list of participating Var objects, and the list of associated SOS weights.

Arguments:

sos: The SOS object of interest.

Return value:

A tuple that contains the SOS type (1 or 2), a list of participating Var objects, and a list of associated SOS weights.

Example usage:

  (sostype, vars, weights) = model.getSOS(s)