Model.Sos2 Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Creates a constraint for a special ordered set reference row.
Namespace: Microsoft.SolverFoundation.Services
Assembly: Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)
Syntax
'Declaration
Public Shared Function Sos2 ( _
referenceRow As Term _
) As Term
public static Term Sos2(
Term referenceRow
)
public:
static Term^ Sos2(
Term^ referenceRow
)
static member Sos2 :
referenceRow:Term -> Term
public static function Sos2(
referenceRow : Term
) : Term
Parameters
- referenceRow
Type: Microsoft.SolverFoundation.Services.Term
A reference row.
Return Value
Type: Microsoft.SolverFoundation.Services.Term
A constraint for a special ordered type 2 set.
Remarks
The input must be a constraint of the form x == c1 * d1 + c2 * d2 + ...
where cN are constants and dN are decisions. The order of the equality matters. None of the constants can be zero, and the same constant cannot appear more than once. The result of this is the equality constraint given, with additional requirements: the sum of the dN decisions must be 1, at most two of the dN decisions can be nonzero, and any nonzero dN decisions must be adjacent in the list that is produced by sorting the dN decisions by the corresponding cN constraints.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.