This method creates an alternative constraint between interval variable a and the set of interval variables in the array bs.

Namespace: ILOG.CP
Assembly: oplall (in oplall.dll)

Syntax

C#
public IAlternative Alternative(
	IIntervalVar a,
	IIntervalVar[] bs,
	string name
)

Parameters

a
Type: ILOG.Concert..::..IIntervalVar
bs
Type: array<ILOG.Concert..::..IIntervalVar>[]()[][]
name
Type: System..::..String

Remarks

An alternative constraint between an interval variable a and a set of interval variables {b1,...,bn} models an exclusive alternative between {b1,...,bn}. If interval a is present, then exactly one of intervals {b1,...,bn} is present and a starts and ends together with this specific interval. Interval a is absent if and only if all intervals in {b1,...,bn} are absent.

For more information about alternative constraints, refer to the concept Constraints on Groups of Interval Variables in the C++ Reference Manual.

Note: This constraint cannot be used in a logical constraint.

See Also