TimeIntervalLink

From OpenCog
Jump to: navigation, search

The TimeIntervalLink is a link type used to represent temporal intervals. It is derived from the IntervalLink

It is typically used by AtTimeLink similarly to how TimeNode is used, as well as in PredictiveImplicationLink and so on.

SEMI-DEPRECATED (Under review)! The Value subsystem provides a superior mechanism for storing, recording, and working with fleeting and time-changing data. There are multiple problems with using Atoms for transient data, including: (a) it is CPU-intensive to create an Atom. Creating Values is much faster. (b) it is CPU-intensive to insert an Atom into the AtomSpace. Values are not stored in the atomsapce. There is no functional need for the indexing services that the AtomSpace provides, so its pointless to store fleeting data there, anyway. (c) it can become very difficult, sometimes impossible to remove Atoms from the atomspace. This can happen when an Atom become a part of the outgoing set of another atom; in such a case, it would be illegal to delete the atom. For these three reasons, use Values instead. They just work better. See also SpaceServer for additional space-time management ideas.

There are some valid limited-use cases for TimeIntervalLinks; however, these use-cases are not entirely clear, and given the steep overhead of using Atoms instead of Values, it is not at all clear that one would want to do temporal reasoning using atoms. Atoms are expensive.

Format

TimeIntervalLink
  TimeNode t1
  TimeNode t2

where t1 <= t2. Generally you want to have t1 < t2, but it might be possible that the empty interval, t1 = t2, be useful as well.

See Also