Hi all,
I have calculated the value for PMHF_estimated in a profile property 'pmhf_est'. Now I want to sum the values for the failure rates for the component.
I have the following Java Script with is summing the spfFailureRates for the component but I get the script not modified for the values in the profile property 'pmhf_est'
function calculatePmhf(self) {
// Collect underlying failure modes
var failureModes = {};
for (var i = 0; i < self.failureModes.size(); i++) {
var proxy = self.failureModes.get(i);
failureModes[proxy.element] = java.math.BigDecimal("0.0");
}
for (var i = 0; i < self.failureModes.size(); i++) {
var proxy = self.failureModes.get(i);
if (proxy.evaluatedFor.size() == 0) {
if (failureModes[proxy.element] < proxy.spfFailureRate) {
failureModes[proxy.element] = proxy.spfFailureRate;
}
}
}
var totalPmhf = java.math.BigDecimal("0.0");
for (var k in failureModes) {
totalPmhf = totalPmhf.add(failureModes[k]);
}
return totalPmhf;
}
calculatePmhf(self);

The sum for spfFailureRate shall be replaced by sum of pmhf_est. In the example above the sum shall show the same value as in the left column.
How need the script be modified?
Kind regards Günter