Skip to content

Commit 0f7d093

Browse files
pcaspersjenkins
authored andcommitted
QPR-11641 speed up scenario report
1 parent 1fe8d58 commit 0f7d093

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

OREAnalytics/orea/app/reportwriter.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,12 +1042,9 @@ void ReportWriter::writeScenarioReport(ore::data::Report& report,
10421042
for (const auto& [tradeId, i] : tradeIds) {
10431043

10441044
Real baseNpv = npvCube->getT0(i);
1045-
for (Size j = 0; j < scenarioDescriptions.size(); j++) {
1045+
for (const auto& [j, scenarioNpv] : npvCube->getTradeNPVs(i)) {
10461046
auto scenarioDescription = scenarioDescriptions[j];
1047-
1048-
Real scenarioNpv = npvCube->get(i, j);
10491047
Real difference = scenarioNpv - baseNpv;
1050-
10511048
if (fabs(difference) > outputThreshold) {
10521049
report.next();
10531050
report.add(tradeId);

0 commit comments

Comments
 (0)