Creates and returns the new constraint (c1 => c2) && (! c1 => c3), that is, if the first constraint is satisfied, it implies the second, and if it is violated, it implies the third.

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

Syntax

C#
public virtual IConstraint IfThenElse(
	IConstraint c1,
	IConstraint c2,
	IConstraint c3
)
Visual Basic
Public Overridable Function IfThenElse ( _
	c1 As IConstraint, _
	c2 As IConstraint, _
	c3 As IConstraint _
) As IConstraint

Parameters

c1
Type: ILOG.Concert..::..IConstraint
The condition constraint.
c2
Type: ILOG.Concert..::..IConstraint
The constraint implied if the condition is satisfied.
c3
Type: ILOG.Concert..::..IConstraint
The constraint implied if the condition is not satisfied.

See Also