use of org.openlca.core.results.Contribution in project olca-app by GreenDelta.
the class ImpactChecksPage method flatNodes.
/**
* Returns a flat list of flow nodes that have no characterization factor in any
* of the LCIA categories.
*/
private List<Contribution<?>> flatNodes() {
List<Contribution<?>> nodes = new ArrayList<>();
for (var flow : result.getFlows()) {
boolean allZero = true;
for (ImpactDescriptor impact : result.getImpacts()) {
double f = result.getImpactFactor(impact, flow);
if (f != 0) {
allZero = false;
break;
}
}
if (allZero) {
Contribution<?> c = Contribution.of(flow);
c.amount = result.getTotalFlowResult(flow);
nodes.add(c);
}
}
return nodes;
}
Aggregations