Saturday 16 February 2013

How is the field -Life to Date for Asset(ASSETMETER.LIFETODATE)-calculated?


The assetmeter.lifetodate (Life to Date for Asset) calculation is done in a java class (DeployedMeter.class) that can be found in the Maximo root directory, e.g:
\Maximo\applications\maximo\businessobjects\classes\psdi\app\meter folder.
In this class, the method (calculateAverageALL) will do the calculation.

It first gets the meter lifetodate.

Then it will check if (newDate !=null && newDate.before(earliestReadingDate))

If it is true, then it will set:

lifetodate = lifetodate - new Meter Reading

Otherwise, it will set:

lifetodate = lifetodate - oldest DB Reading

At last, it will return the Average ALL as:

return lifetodate / denominator

With the Denominator being the date Delta between earliest and recent time.