First released in version: 3.3

Example of spatial monitoring

With the spatial relationship capabilities of SmartSpace Core, you can create objects with spaces, define spatial relationships between them, and see changes in these relationships all within SmartSpace Config. In an installation with SmartSpace Core and no access to the Business rules feature, monitoring spatial relations uses the implicit spatial property rule. This allows you to define properties which show the objects currently contained by a space and which can be automatically filled when spatial relationships become true.

In the following example, we show how we can track two object types, workstations and the products placed within them, and monitor which products are in which workstation by creating a complex property to define the containment relationship.

  1. In TYPES / OBJECTS, create two new types and create a space property for each of them. Here the Workstation type has a space property called area and the Product type has a space property called extent. (See Creating a custom type and adding a space property for further details on how to do this.)

    screen shot of definitons of product + extent and workspace + area

  2. With the object types created, we add some instances of each type:

    screen shot showing instances of workstations and products listed in the object browser

    (See Creating new object instances for information on adding object instances.)

  3. We import and assign representations to the types. (See Importing an object representation and Adding a representation to a type if you need more information on how to do this.)
  4. In SPATIAL PROPERTIES we draw an extent for the two space properties, Workstation area and Product extent. These are default extents (defined in the top panel of the Spatial properties workspace) because instances of workstation areas and product spaces will have standard dimension based on their type. (See Configure space properties of types for additional help.) For example, the workstation's area might be drawn like this:

    screen shot of space being defined for the workstation type

  5. Also in SPATIAL PROPERTIES, we need to request that interactions between the two spaces are monitored. To do this, at the bottom of the workspace, double-click <Add new request> and select area of 'Workstation' as the Container and extent of 'Product' as the Contained extent:

    screen shot showing how to create a monitored containment

    This monitored spatial relation will now be listed at the bottom of the screen. It is shown as being requested by SmartSpace Config, because we created it here; other spatial relations may be listed here that have been requested by other SmartSpace features.

    screen shot of the new monitored relation in the list

  6. We need to create a complex property whose name matches the interaction we have just defined. In TYPES / OBJECTS, double-click <Create new complex property>. Enter the details:

    screen shot showing complex proerty definition for the workstation and product interaction

    What you type here must match exactly the monitored spatial relation we created as listed at the bottom of the SPATIAL PROPERTIES workspace. (You can enable Floating windows to view the two windows for comparison.)

  7. In OBJECT PLACEMENT, we drag some workstation instances out onto the map ready for products to be placed in them.
  8. With the objects and their relationships defined, we can now test their interactions.

    In TYPES / OBJECTS, drag the new complex property definition out into the object browser. Then in OBJECT PLACEMENT, drag a product into a workstation. You can see a new row is added to the 'Workstation' area contains 'Product' extent relation. (Use Floating windows so you can see what is happening in the two screens.)

    scren shot showing a product being dragged into a workspace with the result of a row being added to a property

    If you drag a product out of the workstation, the relevant row is deleted because the statement is no longer true.