Vectorised Calculations

This article explains vectorised calculations in Model Reef formulas.

You will learn:

  • What vectorised calculations are.

  • How they differ from cell based spreadsheet formulas.

  • How to think about time series when writing formulas.

In Model Reef, formulas operate on entire time series at once, not on individual cells.

1

What vectorised means

Vectorised means that:

  • Each operand in a formula represents a full time series across the model horizon.

  • Operations are applied period by period.

  • You do not need to loop over periods or reference specific cells.

For example, Revenue = Units × Price computes revenue for every period using the respective units and price in that period.

2

No cell references

Unlike spreadsheets:

  • You do not write formulas such as A1 * B1.

  • You do not copy formulas down or across.

Instead, one formula defines the relationship for all periods simultaneously.

This avoids a whole class of errors related to misaligned cell references.

3

Alignment of time series

When combining series:

  • Model Reef aligns them on the model's time index.

  • If a series does not have a value in a particular period, default rules or interpolation may determine how it behaves, depending on configuration.

In normal use, all referenced series share the same period structure because they belong to the same model.

4

Implications for model design

Vectorised calculations encourage you to:

  • Think in terms of relationships between variables rather than individual period tweaks.

  • Use drivers to represent key assumptions over time.

  • Avoid logic that depends on previous period values being referenced explicitly.

For lag or lead like behaviour you typically rely on the timing engine and schedule configurations instead of direct period shifting in formulas.

5

Previewing vectorised outputs

The Formula editor preview shows:

  • A sample of the resulting time series as a chart or table.

  • Whether the shape behaves as expected over time.

Use the preview to confirm that your vectorised logic is producing the patterns you intend.


Last updated