Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ SecurityAnalysisResult runSimulationsOnAllComponents(LfNetworkList networks, Lis
PreContingencyResult mergedPrecontingencyResult =
new PreContingencyResult(result.getPreContingencyResult().getStatus(),
new LimitViolationsResult(preContingencyViolations),
mergedPreContingencyNetworkResult);
mergedPreContingencyNetworkResult, Double.NaN);
return new SecurityAnalysisResult(mergedPrecontingencyResult, postContingencyResults, operatorStrategyResults);
}

Expand Down Expand Up @@ -291,7 +291,7 @@ void mergeSecurityAnalysisResult(SecurityAnalysisResult resultToMerge, Map<Strin

PostContingencyResult mergedPostContingencyResult =
new PostContingencyResult(originalResult.getContingency(), originalResult.getStatus(),
new LimitViolationsResult(violations), mergedNetworkResult, originalResult.getConnectivityResult());
new LimitViolationsResult(violations), mergedNetworkResult, originalResult.getConnectivityResult(), Double.NaN);

postContingencyResults.put(contingencyId, mergedPostContingencyResult);
} else {
Expand All @@ -317,7 +317,7 @@ void mergeSecurityAnalysisResult(SecurityAnalysisResult resultToMerge, Map<Strin

OperatorStrategyResult.ConditionalActionsResult mergedConditionalActionResult
= new OperatorStrategyResult.ConditionalActionsResult(conditionalActionsResult.getConditionalActionsId(),
conditionalActionsResult.getStatus(), new LimitViolationsResult(violations), mergedNetworkResult);
conditionalActionsResult.getStatus(), new LimitViolationsResult(violations), mergedNetworkResult, Double.NaN);
conditionalActionsResults.add(mergedConditionalActionResult);

} else {
Expand Down Expand Up @@ -818,8 +818,8 @@ protected SecurityAnalysisResult runSimulations(LfNetwork lfNetwork, List<Propag
new PreContingencyResult(
preContingencyLoadFlowResult.toComponentResultStatus().status(),
new LimitViolationsResult(preContingencyLimitViolationManager.getLimitViolations()),
preContingencyNetworkResult.getBranchResults(), preContingencyNetworkResult.getBusResults(),
preContingencyNetworkResult.getThreeWindingsTransformerResults()),
new NetworkResult(preContingencyNetworkResult.getBranchResults(), preContingencyNetworkResult.getBusResults(),
preContingencyNetworkResult.getThreeWindingsTransformerResults()), Double.NaN),
postContingencyResults, operatorStrategyResults);
}
}
Expand Down Expand Up @@ -895,10 +895,10 @@ protected PostContingencyResult runPostContingencySimulation(LfNetwork network,

return new PostContingencyResult(contingency, status,
new LimitViolationsResult(postContingencyLimitViolationManager.getLimitViolations()),
postContingencyNetworkResult.getBranchResults(),
new NetworkResult(postContingencyNetworkResult.getBranchResults(),
postContingencyNetworkResult.getBusResults(),
postContingencyNetworkResult.getThreeWindingsTransformerResults(),
connectivityResult);
postContingencyNetworkResult.getThreeWindingsTransformerResults()),
connectivityResult, Double.NaN);
}

protected void logPostContingencyStart(LfNetwork network, LfContingency lfContingency) {
Expand Down Expand Up @@ -952,11 +952,14 @@ protected OperatorStrategyResult runActionSimulation(LfNetwork network, C contex

logActionEnd(network, operatorStrategy, stopwatch);

return new OperatorStrategyResult(operatorStrategy, status,
return new OperatorStrategyResult(operatorStrategy,
List.of(new OperatorStrategyResult.ConditionalActionsResult(operatorStrategy.getId(), status,
new LimitViolationsResult(postActionsViolationManager.getLimitViolations()),
new NetworkResult(postActionsNetworkResult.getBranchResults(),
postActionsNetworkResult.getBusResults(),
postActionsNetworkResult.getThreeWindingsTransformerResults()));
postActionsNetworkResult.getThreeWindingsTransformerResults()),
Double.NaN)
));
}

protected void logActionStart(LfNetwork network, OperatorStrategy operatorStrategy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ private PostContingencyResult computePostContingencyResultFromPostContingencySta
return new PostContingencyResult(contingency,
PostContingencyComputationStatus.CONVERGED,
new LimitViolationsResult(postContingencyLimitViolationManager.getLimitViolations()),
postContingencyNetworkResult.getBranchResults(),
new NetworkResult(postContingencyNetworkResult.getBranchResults(),
postContingencyNetworkResult.getBusResults(),
postContingencyNetworkResult.getThreeWindingsTransformerResults(),
connectivityResult);
postContingencyNetworkResult.getThreeWindingsTransformerResults()),
connectivityResult, Double.NaN);
}

/**
Expand Down Expand Up @@ -277,11 +277,17 @@ private OperatorStrategyResult computeOperatorStrategyResultFromPostContingencyA
woodburyContext.limitReductions, woodburyContext.violationsParameters);
postActionsViolationManager.detectViolations(lfNetwork, isBranchDisabledDueToContingency);

return new OperatorStrategyResult(operatorStrategy, PostContingencyComputationStatus.CONVERGED,
new LimitViolationsResult(postActionsViolationManager.getLimitViolations()),
new NetworkResult(postActionsNetworkResult.getBranchResults(),
return new OperatorStrategyResult(operatorStrategy,
List.of(
new OperatorStrategyResult.ConditionalActionsResult(
operatorStrategy.getId(), PostContingencyComputationStatus.CONVERGED,
new LimitViolationsResult(postActionsViolationManager.getLimitViolations()),
new NetworkResult(postActionsNetworkResult.getBranchResults(),
postActionsNetworkResult.getBusResults(),
postActionsNetworkResult.getThreeWindingsTransformerResults()));
postActionsNetworkResult.getThreeWindingsTransformerResults()),
Double.NaN)
)
);
}

/**
Expand Down Expand Up @@ -512,8 +518,8 @@ protected SecurityAnalysisResult runSimulations(LfNetwork lfNetwork, List<Propag
return new SecurityAnalysisResult(
new PreContingencyResult(LoadFlowResult.ComponentResult.Status.CONVERGED,
new LimitViolationsResult(preContingencyLimitViolationManager.getLimitViolations()),
preContingencyNetworkResult.getBranchResults(), preContingencyNetworkResult.getBusResults(),
preContingencyNetworkResult.getThreeWindingsTransformerResults()),
new NetworkResult(preContingencyNetworkResult.getBranchResults(), preContingencyNetworkResult.getBusResults(),
preContingencyNetworkResult.getThreeWindingsTransformerResults()), Double.NaN),
postContingencyResults, operatorStrategyResults);
}
}
Expand Down
Loading