Hi,
Gerd's suggestion was to set min(cap_value, children_found). From such point of view 0 can be a valid value.
I am lost now :) How can we use the capability to reserve "more" buses since children-found will be always the smaller value?
I think you should use max(cap_value, children_found) to ensure you always reserve enough buses for existing children.
Was about to point out the same ;)
Yes, should be max(reserve-buses, child-buses-found). And reserve- buses is actually a minimum, because the result can't be smaller than reserve-buses.
cheers, Gerd