Skip to main content
FRAMES NO FRAMES

IloSelectSmallest

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

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


IloSelectSmallest

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

This function returns a selector of integer variables that selects at least minNumber variables having the smallest 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) 9, (B) 5, (C) 6, (D) 3, (E) 8, (F) 1, (G) 3, (H) 2. When ordered by increasing evaluation, this gives: (F) 1, (H) 2, (D) 3, (G) 3, (B) 5, (C) 6, (E) 8, (A) 9. If minNumber is 1, then variable F would be selected, if it is 2, then variables F and H would be selected, and if it is 3 or 4 then F, H, D and G would be selected. Note that when minNumber is 3, both D and G 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 fewer 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:


IloSelectSmallest

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

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

See Also:


IloSelectSmallest

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

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

See Also:


IloSelectSmallest

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

This function 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.

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:


IloSelectSmallest

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

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

See Also: