Hello,

For some reason, I need to check the elements in the domain of a variable of IloIntVarAray, one by one in a loop like:

for (i=0; i<X[var].getDomainSize(); i++){

if (distance[var][X[var].Domain[i]])<min){

min=distance[var][X.Domain[i]];

val=i;

}

} where distance is a from-to distance matrix, var, and val are int.

In fact, at each step, I need to find the closest node (value) to each variable (X[var] a IloIntVar, which shows the successor of the node var) at anytime during the search. Bt this, I mean once a value is removed from the domain, I don't want to have access to it any more, in other words, I need the updated domain of the variable.

So I wonder if there exist any function through which I could have access to the elements in a variable domain. I came across getDomain(), but I don't think it helps.

Thanks!