The parent elements on which this universe depends.
The active elements in the universe.
Add an element to the element collection.
Add an element to the element collection.
All the elements in this collection.
All the elements in this collection.
Returns all resolutions of the given reference.
Returns all resolutions of the given reference. Considers all possible values of each of the elements on the path and all elements with each name on the path. Along with each possible resolution, it returns the contingency (values of elements along the path) required to make that resolution be the one.
Assert the given evidence on the given reference.
Assert the given evidence on the given reference. The third argument is an optional contingency. This method makes sure to assert the evidence on all possible resolutions of the reference.
Assert the given evidence associated with references to elements in the collection.
Assert the given evidence associated with references to elements in the collection.
Clear the universe of all elements.
Clear the universe of all temporary elements.
Clear the universe of all temporary elements. I.e., elements that were created as the result of expanding a chain.
Clear the universe of all elements with no explicit name.
Clear the universe of all elements with no explicit name. This is useful, e.g., in dynamic models, where only named elements can influence subsequent time steps.
Elements in the universe that have had a condition applied to them.
Elements in the universe that have had a constraint applied to them.
Safely deactivate all the given elements.
Deregister an algorithm.
Returns the set of elements that are directly used by the given element, without recursing.
Generate values for the elements in the universe, making sure to generate arguments before their dependent elements.
Generate values for the elements in the universe, making sure to generate arguments before their dependent elements. This method should be called by algorithms that need elements to be initialized with values.
Returns a reference element representing the single-valued reference.
Returns a reference element representing the single-valued reference.
Returns a reference element representing the aggregate applied to the multi-valued reference.
Returns a reference element representing the aggregate applied to the multi-valued reference.
Gets the first element in the chain contained by the reference, together with an optional remaining reference.
Gets the first element in the chain contained by the reference, together with an optional remaining reference. If the reference is simply a name, the element is the referred to element and the remainder is None.
Returns true if the reference is resolvable on this collection.
Returns true if the reference is resolvable on this collection. This will always use the most recent element with the reference name.
Returns the elements in the given set that are independent of all other elements in the set.
Returns the elements in the given set that are independent of all other elements in the set. I.e., they do not use any of the elements in the set in their generation. Also returns the remaining non-independent elements.
Returns a list of layers of elements in the given set of elements, where the elements in each layer can be generated independently of each other given elements in previous layers.
The parent elements on which this universe depends.
Elements in the universe that are not defined in the context of another element.
Selects a non-deterministic element uniformly at random.
Register a map so that elements are removed from it when they are deactivated.
Register a map so that elements are removed from it when they are deactivated. This avoids memory management problems.
Register algorithms that use this universe.
Register algorithms that use this universe. When the Universe is cleared, all previous algorithms are no longer valid, so they must be killed (if still running)
Register the maps that this universe is used as a key.
Register the maps that this universe is used as a key. Needed to make sure Universe is garbage collected when cleared and dereferenced
Remove an element from the element collection.
Remove an element from the element collection.
Remove any evidence on the given reference.
Remove any evidence on the given reference. The second argument is an optional contingency. This method makes sure to remove evidence from all possible resolutions of the reference. Note: this method removes all conditions and constraints, no matter when they were added.
The active non-deterministic elements in the universe.
The universe to which elements in this universe belongs, which is, of course, this universe.
The universe to which elements in this universe belongs, which is, of course, this universe.
Returns the set of elements that use the given element in their generation, either directly or recursively.
Returns the set of elements that the given element uses in its generation, either directly or recursively.
A universe is a collection of elements that can be used by a reasoning algorithm.
Ordinarily, the arguments of elements in a universe must also belong to the universe. You can optionally supply a list of parent elements that contains other elements that can be arguments.