From Planimate Knowledge Base
Jump to navigation Jump to search

This page is about how Planimate Objects and Items interact together. For articles on user interaction in a UI context, look at [Category:Interaction_(UI)]].

Planimate models consist of objects laid out on panels. The objects are joined together using directional flow lines. As a model runs, items flow along these lines, entering and exitting objects along the flow line.

Planimate's objects enable a wide variety of things to happen as the items move in and out of them. When an item arrives at an object, what happens is called an interaction.

Interactions are where things happen

When watching the animation of items along flows, its important to notice that no simulation time passes while the item moves along a flow from object to object. An item moving from one object to another is making an instantaneous transition, leaving the previous object and entering the next one without any interruption possible. A flow is not a road or train track. These are modelled using objects.

Capacity and Interactions

Some objects (queues, splitters, multiservers) can hold one or more items within them. This lets simulation time pass whilst the item is in the object - ie: the interaction occurs over time.

Other objects (switch, change) do not "hold" an item at them, the item waits behind them at the previous object and only flows through them when the model allows it. In these objects the interaction is instantaneous and uninterruptable as far as time in the model is concerned, but this does not mean that complex things cannot happen. For example a change object can execute an algorithm in a routine, call DLLs, perform file reads and writes and access ODBC databases. These might be long time consuming processes but from the model's point of view no time passes and the item has moved instantly through the object.

Lookahead and Interactions

A unique feature of Planimate compared to traditional programming languages is that a branch of logic represented as a Planimate flow can be "tested" by an item to determine whether its "worth taking". If change objects and blockable switches are in this flow, their interaction will be evaluated even before the item actually moves through them.

The first "test" evaluation is called a lookahead and its used to determine whether a flow can be taken by an item. If the lookahead succeeds, the item begins moving through the objects in the flow, towards the destination object which indicated it would accept the item during lookahead.

Scope and Interactions

When an item interacts with an object, quite a bit of information is made available to the modeller. This information is particularly useful in attribute references and routines because it provides context, much like the parameters to a function call in C.

This information includes:

  • item attributes, modeller defined attributes that the item carries with it
  • system item attributes, Planimate maintained information and properties that all items posses
  • portal attributes, tables. All the portal based attributes and tables that exist at the panel where the interaction is occuring, and all its parent portals, right up to the top of the model's hierarchy
  • other system attributes (eg: the simulation clock)
  • the label index identifying the portal which the interaction is in. This is useful in network models as it identifies the location where something is happening