-
Notifications
You must be signed in to change notification settings - Fork 1
SizeExpectation
Note: this property will be available in GeoDMS 20.10.0 or later. In earlier versions an undocumented predecessor was registered under the name SizeEstimator; that name is no longer recognised.
With the SizeExpectation property a modeller declares the expected number of elements of a domain unit whose count is not yet known — a point estimate that may err in either direction — as a calculation rule that is much cheaper to evaluate than the actual count.
SizeExpectation = "expression", configured on a domain unit, declares the expected element count of the unit. The expression must result in a single numeric value (a parameter, so with a void domain). Keep it cheap: reference only parameters, counts of source domains, or simple aggregates of small, already available data.
Where SizeUpperbound declares a bound that resource-aware scheduling may reserve memory on, SizeExpectation declares the typical size. It is never used for reservations; it informs cost estimates and the ordering of work, and supersedes the engine's default assumption for units whose count cannot be derived yet. When the unit's data is ready, the actual count is used and the declaration is ignored.
The two properties compose: the expected size comes from SizeExpectation, the reservable bound from SizeUpperbound. Declare an expectation in addition to a bound when the bound is much larger than the typical size; most models that declare anything will want only the bound.
unit<uint32> ODpairs := select_uni(within_reach)
, SizeExpectation = "#origins * TypicalDestsPerOrigin"
, SizeUpperbound = "#origins * MaxDestsPerOrigin";
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.