This method returns a selector of integer variable assignments that selects at least minNumber domain values having the smallest evaluation according to the evaluator eval. The parameter minNumber must be at least 1.

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

Syntax

C#
public virtual IValueSelector SelectSmallest(
	double minNumber,
	IIntValueEval e
)

Parameters

minNumber
Type: System..::..Double
e
Type: ILOG.CP..::..IIntValueEval

Remarks

For example, suppose that eight domain values (1-8) have evaluations (1) 9, (2) 5, (3) 6, (4) 3, (5) 8, (6) 1, (7) 3, (8) 2. When ordered by increasing evaluation, this gives: (6) 1, (8) 2, (4) 3, (7) 3, (2) 5, (3) 6, (5) 8, (1) 9. If minNumber is 1, then value 6 would be selected, if it is 2, then values 6 and 8 would be selected, and if it is 3 then values 6, 8, 4 and 7 would be selected. Note that when minNumber is 3, both values 4 and 7 are selected as both are considered equivalent. In addition, it is possible to specify a non-integer value of minNumber. In this case, at least floor(minNumber) selections are made, with probability minNumber - floor(minNumber) of selecting an additional value. It is still possible that this selector can select less values than minNumber if there are less than minNumber values supplied to it for selection, in which case all supplied values are selected.

See Also