[ library(ic_global) | Reference Manual | Alphabetic Index ]

ordered_sum(+List, ?Sum)

The list elements are ordered and their sum is Sum
List
List of integers or domain variables
Sum
Variable or integer

Description

This constraint is declaratively equivalent to:
	ordered_sum(List, Sum) :-
	    ordered(=<, List),
	    sum(List) #= Sum.
However, additional propagation is performed.

Any input variables which do not already have finite bounds will be given default bounds of -10000000 to 10000000.

See Also

ordered / 2, sumlist / 2