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.
-
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.)
-
With the object types created, we add some instances of each type:
(See Creating new object instances for information on adding object instances.)
- 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.)
-
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:
-
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:
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.
-
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:
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.)
- In OBJECT PLACEMENT, we drag some workstation instances out onto the map ready for products to be placed in them.
-
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.)
If you drag a product out of the workstation, the relevant row is deleted because the statement is no longer true.