Data point groups

Instead of drawing the same calculation for different data points over and over again, you can leverage the system names of your data points and have Avelon create all these formulas automatically for you. You only have to draw the formula once, and the system will automatically fill the shapes with the right data points.

To find matching data points, the system uses regular expressions. This means that the system name of your data points must be designed in a specific way. Especially, all data points that are used in a single calculation should share a common prefix.

To create a formula with automatic data point assignments, proceed as follows:

  1. Open the Library sidebar on the left side and select the Shapes tab.

  2. Scroll down the list and drag one or more data-point-group Data Point Group shapes on your page.

  3. Open the Properties sidebar on the right side and set an appropriate Label for each of these shapes. This will help you identify the correct shape in the next step.

  4. Select an output data point group shape, or a function shape with the option Output to Single Data Point enabled.

    Note

    If you select any other shape, you will only be able to see the current data point assignments in the next step, and you can generate a preview of the new assignments, but you won’t be able to save them.

  5. Open the Data Point Assignment panel at the bottom of the screen.

  6. For the selected shape and all connected shapes upstream that are Data Point Group shapes, a column is displayed in the table with the name of the shape and its system name expression below it. Change this regular expression so the system can find appropriate data points for the corresponding shape.

    Example:

    Assume you have ten rooms with 4 meters each, numbered ROOM_01_METER_1 through ROOM_10_METER_4, and you want to calculate the sum of the four meters for each of the ten rooms as data points ROOM_01_SUM through ROOM_10_SUM respectively. Place five Data Point Group shapes on the page and use the regular expressions ROOM_(\d*)_METER_1, ROOM_(\d*)_METER_2, ROOM_(\d*)_METER_3, ROOM_(\d*)_METER_4 and ROOM_(\d*)_SUM respectively. In this case, (\d*) denotes a consecutive string of digits and will match each of the ten rooms from 01 to 10. Make sure to put the part of the system name that is unique to each data point in parentheses, as in the previous example. Only one pair of parentheses is allowed per input field though.

  7. After you’ve entered all the regular expressions, click on Refresh on the right. The system will then search for all data points that match the pattern, and present each unique combination of data points as individual rows in the table. Depending on your previous configuration, each cell will be colored according to its new state:

    State of the assignment

    .

    Invalid input. Hover over the cell to see the error message.

    .

    The regular expression matched several times in the same system name. This usually means that the regular expression was not unique enough.

    New entry

    Updated entry

    Deleted entry

  8. If some of the inputs are invalid or the system didn’t find the data points you expected, try to edit the individual regular expressions and press Refresh again to update the grid.

  9. If you’re happy with the data point assignments, click on Save on the right. If, however, you would like to revert to the previous assignments instead, click Revert.

Note

If you use data point groups in your calculation, the output also has to be a data point group. If your calculation contains a function shape with the option Output to Single Data Point enabled, however, the output must be a single data point.

Warning

If you add, edit or remove data points after you’ve already saved the data point assignments of your data point groups, you’ll need to repeat steps 4 through 9 above if you want the changes to be reflected in your data point calculation.

Warning

You cannot modify your calculation after you’ve saved the data point assignments. In order to edit the calculation, you have to clear all existing data point assignments first.

Output to single data point

By default, calculations involving data point group shapes will return one result for each set of data points matching the regular expressions of all the shapes involved in the calculation.

If you want to combine all inputs of a calculation into a single data point, select the Function shape (Sum, Product, And, Or) and enable the option Output to Single Data Point in the Properties sidebar on the right. The output of that shape can then be used like a single data point.

Note

The option Output to Single Data Point has to be enabled before you assign any data points to the shapes of the calculation.

Warning

Once there are data points assigned to a calculation, it is not possible to add, edit or delete connections in the calculation or to change the option Output to Single Data Point. In order to make any changes to the calculation, you have to clear all data point assignments, make the changes, and assign the data points again. You can clear data point assignments by clicking on Clear All on the right.

Example:

Say you have ten rooms with a counter each that are numbered from ROOM_01_COUNTER to ROOM_10_COUNTER, and you want to calculate the sum of all these counters. Place a data point group on the page and enter the regular expression ROOM_(\d*)_COUNTER in the Data Point Assignment panel. In this example, (\d*) will capture a sequence of numbers that corresponds to the room number of each of these rooms. Connect the output of this data point group with a Sum shape and enable the option Output to Single Data Point on that shape. The output of the sum shape can now be connected to a single calculated data point (purple) or for further calculation.

Note

If you nest multiple calculations with the option Output to Single Data Point enabled, you will need to save the data point assignments in the order of the calculation, so that the required assignments are available for the subsequent function shape. Conversely, data point assignments cannot be cleared if a subsequent shape in the same calculation still has data point assignments, which means you have to clear those data point assignments first, starting from the last shape in your calculation that contains data point assignments.