Skip to main content
FRAMES NO FRAMES

IloSelectLargest

public IloVarSelector IloSelectLargest(IloIntVarEval eval)
Definition file: ilcp/cp.h
Returns a selector which selects variables with the largest evaluation.

This function returns a selector of integer variables that selects all variables having the largest evaluation according to the evaluator eval.


IloSelectLargest

public IloVarSelector IloSelectLargest(IloNum minNumber, IloIntVarEval eval)
Definition file: ilcp/cp.h
Returns a selector which selects variables with the largest evaluation.

This function returns a selector of integer variables that selects at least minNumber variables having the largest evaluation according to the evaluator eval. The parameter minNumber must be at least 1.

For example, suppose that eight variables (A-H) have evaluations (A) 5, (B) 8, (C) 3, (D) 9, (E) 2, (F) 8, (G) 1, (H) 7. When ordered by decreasing evaluation, this gives: (D) 9, (B) 8, (F) 8, (H) 7, (A) 5, (C) 3, (E) 2, (G) 1. If minNumber is 1, then variable D would be selected, if it is 2 or 3, then variables B and F would be selected, and if it is 4 then D, B, F, and H would be selected. Note that when minNumber is 2, both B and F 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 variable.

It is still possible that this selector can select less variables than minNumber if there are less than minNumber variables supplied to it for selection, in which case all supplied variables are selected.

See Also:


IloSelectLargest

public IloVarSelector IloSelectLargest(IloIntVarEval eval, IloNum tol)
Definition file: ilcp/cp.h
Returns a selector which selects variables with the largest evaluation.

This function returns a selector of integer variables that selects all variables whose evaluations are in the range [max - tol, max], where max is is the maximum valuation by eval over the variables to be evaluated. The parameter tol must be non-negative.

See Also:


IloSelectLargest

public IloValueSelector IloSelectLargest(IloIntValueEval eval)
Definition file: ilcp/cp.h
Returns a selector which selects values with the largest evaluation.

This function returns a selector of value assignments to a variable that selects all values having the largest evaluation according to the evaluator eval.

See Also:


IloSelectLargest

public IloValueSelector IloSelectLargest(IloNum minNumber, IloIntValueEval eval)
Definition file: ilcp/cp.h
Returns a selector which selects values with the largest evaluation.

This function returns a selector of value assignments to a variable that selects at least minNumber values having the largest evaluation according to the evaluator eval. The parameter minNumber must be at least 1.

For example, suppose that eight domain values (1-8) have evaluations (1) 5, (2) 8, (3) 3, (4) 9, (5) 2, (6) 8, (7) 1, (8) 7. When ordered by decreasing evaluation, this gives: (4) 9, (2) 8, (6) 8, (8) 7, (1) 5, (3) 3, (5) 2, (7) 1. If minNumber is 1, then value 4 would be selected, if it is 2 or 3, then values 2 and 6 would be selected, and if it is 4 then values 4, 2, 6, and 8 would be selected. Note that when minNumber is 2, both 2 and 6 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 fewer domain 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:


IloSelectLargest

public IloValueSelector IloSelectLargest(IloIntValueEval eval, IloNum tol)
Definition file: ilcp/cp.h
Returns a selector which selects values with the largest evaluation.

This function returns a selector of integer variable assignments that selects all domain values whose evaluations are in the range [max - tol, max], where max is is the maximum valuation by eval over the domain values to be evaluated. The parameter tol must be non-negative.

See Also: