User GuidesMatrix Forge

← Previous: Output matrices Next: Testing →

Output variables

Output variables run after all output matrices. They are used for post-calcs, summaries, and stat calcs on matrix columns (e.g. sum, min, max, average).

Purpose

  • Summarize a matrix column — e.g. total premium, max value, average over all rows.
  • Post-calcs — Single values derived from matrices (e.g. IRR of a column, or a weighted average).
  • Expose to schema — Like matrices, each output variable can be marked include in schema so it appears in the Data Schema for downstream steps.

Formula context

Output variable formulas can use:

  • Input.*, Var.* — Form/flow data and pre-calc variables.
  • Matrix("MatrixName").Rows — The full list of rows. Use LINQ-style expressions: e.g.
    Matrix("CashValues").Rows.Select(r => Convert.ToDouble(r["TotalCSV"])).Sum()
    or
    Matrix("ParIllustration").Rows.Select(r => Convert.ToDouble(r["Premium"])).Average().
  • Rate(...), DataSheet(...), DataSheetLookup(...) — Same as in Formula syntax.
  • RangeSum, RangeMin, RangeMax, RangeAvg — Aggregate a sequence of numbers (e.g. from Range(...) or from a matrix column).
  • IRR(...) — Internal rate of return; overloads accept a matrix and column name (and optional row count).

They do not have RowNum, PreviousRow, or Col (those are only defined per row inside matrix column formulas).

Include in output

  • Each output variable has an include in schema checkbox. When checked, the variable is added to the engine’s output and appears in the Data Schema under the calc engine’s object for use in forms, layouts, and reports.

User GuidesMatrix Forge

← Previous: Output matrices Next: Testing →