Representing Hierarchies

I’ve been working and experimenting on the Define module of myActivo. The questions that I’m trying to answer for the design of this module are:

  • what would be the best way to represent the structure of asset information?
  • how should this information be presented to the user?
  • how should this information be stored in the back-end systems?
  • how will these structures will be used as a “common language” throughout the application?

If you are eager to see what my latest experiment looks like, you can head to to have a look.

As you can see from this example, there are two aspects that I believe are important to this module, the visualisation of the structure and the format of the data.

For the formatting aspect I had a choice of creating one from scratch or using something already available. I chose the latter. I decided to use the json-schema format to capture the structure of this data.

The advantage of using this format is that there is a number of tools already available to validate and check that a given dataset conforms to the structure defined in the schema.

This schema is text-based and can be edited using any text editor. I would like to build a “back-end” view with the text representation of the asset structure. The snapshot below shows how this could look like.

Asset Data Structure Schema Editor

One mode of interaction with the Define module would be the user directly typing the asset structure into this text editor. The editor will have to have the functionality of checking the syntax and correctness of the asset structure according to a predetermined set of semantic rules.

With regards to the visual representation of the hierarchy, I settled on the tried and tested tree visualisation. Whilst there are other possibilities that can be used to visualised a hierarchical structure, the tree seemed to be the most intuitive to use. The screenshot below shows what this part of the module would look like.

Asset Data Structure Visualisation

The user should be able to interact with this tree by creating new nodes, dragging and dropping nodes and deleting nodes. Each node could represent a number of arbitrary and more abstract concepts specifically related to assets such as health indicators, nameplate attributes, condition states, etc.

This module will have to have logic to maintain the two views synchronised and allow the user to modify either view and see her changes immediately reflected on the other view.

This means the user should be able to go to the text editor, add a new node by typing and, if the entry is valid, see that immediately displayed on the tree visualisation window.

Conversely, if the nodes are manipulated in the visual tree, the text representation should follow suit.

The schema defined by this file can the be stored on a database or downloaded as a *.json file. These files will be then used as the foundation for building the rest of the user interface and options available to the rest of the modules in myActivo.

By Carlos Gamez

As an Mechanical and Electrical Engineer by profession and Computer Programmer by passion I’ve been building my own software tools for over 20 years. My career has taken me across multiple engineering areas including Design, Manufacturing, Field Operations, Maintenance, Refurbishment, Product Development, Asset Management, Customer Service, Process Improvement, Consulting and Software Development. Mainly driven by challenges that I’ve faced on my day-to-day work and my own laziness and refusal to do repetitive and menial tasks, I always find myself creating software applications to automate the boring parts of my job. I quite enjoy the process of facing a brand new challenge, thinking about the best way to solve it, designing the architecture of the application and then implementing it. It is very satisfying to then see peers and colleagues use and benefit from my tools to make their lives easier and ease their workload.

Leave a comment

Your email address will not be published.

%d bloggers like this: