Component Guide II: Containers

From Numerus
Revision as of 19:33, 13 March 2018 by Rsalter (talk | contribs) (Created page with "==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 o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 DataInputs and DataOutputs (i.e., the Interface) of the constituent Capsule type(s), although some Containers add pins. Pin connection uses a common dialog format for all Containers and is shown below.

Pins are addressed using dot notation. If Container X has Pin Y, then X.Y is a reference for the 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 realized by a set of primitive operators (primops) provided by the Container. (We refer to such primops as service providers.) The data structure of the container together with the service providers comprise an abstract data type that effects a specific topological environment.

Every aggregator has a means for uniquely identifying its members. We'll refer to this as its Aggregator Id.

Examples
  • A Chip binds the property Super 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.
  • 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.