Difference between revisions of "Component Guide II: Containers"

From Numerus
Jump to navigation Jump to search
Line 10: Line 10:
;Examples:
;Examples:


*A Chip binds the property <tt>Super</tt> to reference the State Object of the Chip's parent (a State Object is a NovaScript object that binds each component in a Capsule to its value in the current timestep). This is used by the Chip's DataInputs to channel component data from that parent into the Chip.
*A Chip binds the property <tt>Super</tt> to reference the [[Scope]] of the Chip's parent. This is used by the Chip's Input Pins to channel component data from that parent into the Chip.
*An AgentVector assigns a unique '''Agent Id''' to each element (or agent) and provides the means for interaction between agents using these ids for indentification. It also represents location and trajectory parameters in the virtual space provided by the AgentVector in which its agents dwell. An AgentVector also supports agent lifetime management (i.e., births and deaths).
*An AgentVector assigns a unique '''Agent Id''' to each element (or agent) and provides the means for interaction between agents using these ids for indentification. It also represents location and trajectory parameters in the virtual space provided by the AgentVector in which its agents dwell. An AgentVector also supports agent lifetime management (i.e., births and deaths).
*A CellMatrix assigns matrix '''Coordinates''' to each of its elements and supports interaction between its members (or cells) using these coordinates for identification.
*A CellMatrix assigns matrix '''Coordinates''' to each of its elements and supports interaction between its members (or cells) using these coordinates for identification.

Revision as of 19:46, 13 March 2018

Overview

Containers are components that hold one or more instances of a Capsule for use within a host (or parent) Capsule. The elements of a Container are called members or elements. Containers interface with the components in their parent through Connector Pins, which are represented as horizontal lines on the left and right side of the container body. (Left and right sides correspond to input and output pins, respectively.) Every Connector Pin is given a label, and they correspond roughly to the Input Pins and Output Pins of their Capules, although some Containers add pins.

Pins are addressed using dot notation. If Container X has Pin Y, then X.Y is a reference for that Pin.

Each container type extends and enriches the environment of its elements by assigning new functionalities that are only valid within the context of the container. These new functionalities are introduced through a set of primitive operators (Primops) provided by the Container. (In the language of computer science these kinds of Primops are called service providers.) The data structure of the container together with the service providers create a topological environment for the constituent Capsules. For example, the CellMatrix container holds a set of Capsules in a lattice or grid structure. Each Capsule is assigned row and column indices, and neighborhoods of Capsules can be identified and manipulated.

Every aggregator (i.e. a container hold more than one Capsule) assigns some form of identification to each of its constituents. For example, in the case of the CellMatrix, the index pair serves to uniquely specify a particular element. We'll use the term Aggregator Id to uniformly refer to this identification strategy.

Examples
  • A Chip binds the property Super to reference the Scope of the Chip's parent. This is used by the Chip's Input Pins to channel component data from that parent into the Chip.
  • An AgentVector assigns a unique Agent Id to each element (or agent) and provides the means for interaction between agents using these ids for indentification. It also represents location and trajectory parameters in the virtual space provided by the AgentVector in which its agents dwell. An AgentVector also supports agent lifetime management (i.e., births and deaths).
  • A CellMatrix assigns matrix Coordinates to each of its elements and supports interaction between its members (or cells) using these coordinates for identification.
  • A SimWorld combines an AgentVector with a CellMatrix, so that the virtual agent space of AgentVector corresponds to the topological space created by the CellMatrix.

Service provider details are given with each entry below. They are also described in depth in Properties and Primops Reference.