Reply To: OpenCmpnts – Overwrite a User Defined Simulation (Tran) Result – post EOD calc

Peter Fox


Thanks for the reply.

Result: a custom result
Version: V14_1

Still unclear regarding the “// Set your amended result back” – step – and would be much better to use OC and avoid any JVS

Presume the method to add amended results back in is;

This implies that the amended value is to be set on a com.olf.openrisk.simulation.ResultType
This is where the API is unclear – no setValue, or getTable (not getConstTable) methods on which to set the required value.

Current snippets – allow to retrieve the correct ResultType – but as above, no obvious methods to set the amended value

SimResults simresults = simulationFactory.retrieveSimulationResults(…, EnumSimulationRunType.Eod, …., false);
RevalResults baseResults = simresults.getScenarioResults(“Base”);
ResultType targetCustomResult = simulationFactory.getResultType(“Custom Result”);

ResultTypes resultTypes = baseResults.getResultTypes();
for (ResultType resultType : resultTypes)
// how to amend the value on target com.olf.openrisk.simulation.ResultType
// or use KeyDescriptions, MeasureDescriptions, etc.

Download PDF version

This field is for validation purposes and should be left unchanged.