Class: IndexedSimulationResult

IndexedSimulationResult(innerData)

Drop-in replacement for ReportDataWrapper that indexes the raw results by scenario, year, application, and substance instead of re-scanning the full results array on every query. ReportDataWrapper._applyFilterSet performs up to four sequential Array.filter passes over the entire raw results array on every call, with no caching, even for a repeated identical filter. For large simulations (many years/applications/substances/trials), the UI re-issues many such queries per interaction (once per year for the chart, once per identifier for each dimension card), making that cost visible as UI lag on every click. This class builds indexes once (lazily, per import/export attribution mode) and memoizes filtered/aggregated results, while inheriting all other behavior (metric strategies, unit conversion, error recovery) unchanged from ReportDataWrapper.

Constructor

new IndexedSimulationResult(innerData)

Create a new indexed simulation result.
Parameters:
Name Type Description
innerData Array.<EngineResult> The raw report data to wrap.
Source:

Methods

getScenarios(filterSet) → {Set.<string>}

Get the set of distinct scenario names. Overridden because ReportDataWrapper's un-filtered branch maps over the entire raw array on every call instead of going through _applyFilterSet; here it is served directly from the scenario index.
Parameters:
Name Type Description
filterSet FilterSet The filter criteria to apply.
Source:
Returns:
Set of scenario names.
Type
Set.<string>