Originally posted by: SystemAdmin
[vblanchard said:]
Hi,
you can use the method "find(...)" on the set of tuples and check whether it returns a tuple or null
if (pairCst.find(t.i, t.v, t.bc,t.DrivingTime, t.DrivingDistance, t.BreakTime, t.DutyPeriod) == null)) {
pairCst.add(t)
}
However, note that duplicates in the set are automatically filtered. So whether or not you test that the tuple is in the set or not before adding it, the result set will not have any duplicate (by definition of a set).
#DecisionOptimization#OPLusingCPOptimizer