đ§Ž ValuationCalculation Documentation
đ§Ž QUICK DOCUMENTATIONâ
- File Path: Various handlers in
/Application/Assets/EventHandlers/*and command handlers in/Application/Assets/Commands/* - Primary Purpose: Performs valuation calculations for assets and components based on configured assumptions and profiles
- Key Methods:
RefreshAssetValuationDataEventHandler.Handle(): Recalculates asset valuation dataGetValuationProfileEventHandler.Handle(): Retrieves and applies the appropriate valuation profileRefreshJobDataCommand.Handle(): Recalculates all valuations for a job
- Used By:
AssetController: For asset valuation operationsComponentController: For component valuation operationsJobController: For job-wide valuation operationsReportsController: For report generation
- Related Models:
Asset: Assets being valuedComponent: Components being valuedValuationProfile: Valuation profile parametersAssetAssumptions/ComponentAssumptions: Valuation assumptionsValuationMethod: Results of valuation calculations
đī¸ DETAILED DOCUMENTATIONâ
đ§Ž Overviewâ
The ValuationCalculation service is a collection of event handlers and command handlers that implement the core business logic for asset and component valuation. It performs complex calculations based on configured valuation approaches, using inputs such as condition scores, replacement costs, and valuation profiles to determine financial values. This service is the heart of the Asset Valuer Pro system, transforming raw asset data into financial values compliant with accounting standards.
đ§ Service Detailsâ
- Namespace: Various namespaces in AVP.Application.Assets
- Pattern: CQRS with Event Handlers
- Key Components:
- Asset Valuation Event Handlers
- Component Valuation Event Handlers
- Job-level Valuation Commands
- Valuation Method Implementations
đ§Ž Valuation Approachesâ
đ Cost Approachâ
The cost approach calculates asset values based on replacement cost and depreciation:
-
Apportionment Method
- Calculates component values as percentages of total asset replacement cost
- Uses component condition scores and valuation profiles to determine depreciation
- Aggregates component values to determine total asset value
-
Direct Cost Method
- Calculates component values directly from component replacement costs
- Uses component-specific measurement data and unit rates
- Applies condition-based depreciation through valuation profiles
-
Historical Cost Method
- Based on original acquisition cost
- Applies indices for time value adjustments
- Uses a standardized depreciation schedule
đ Market Approachâ
- Uses comparable sales data
- Adjusts for specific asset characteristics
- Applies market factors defined in MarketApproach entity
đ Income Approachâ
- Based on income-generating capacity
- Uses cash flow projections and capitalization rates
- Adjusts for operating expenses and vacancies
đ Calculation Processâ
đ§Ž Asset Valuation Flowâ
-
Initialization
- Identify valuation approach based on ValuationType
- Retrieve relevant assumptions (AssetAssumptions, ComponentAssumptions)
- Determine valuation profiles through ValuationProfileRules
-
Core Calculations
- For cost approaches:
- Calculate replacement costs
- Apply condition-based depreciation
- Calculate accumulated depreciation and current value
- For market approach:
- Apply comparable adjustment factors
- Calculate market-based value
- For income approach:
- Calculate present value of income streams
- Apply capitalization rates
- For cost approaches:
-
Result Storage
- Create AssetValuation records
- Create ComponentValuation records
- Link to appropriate Job
đ Business Contextâ
đ Core Valuation Approachesâ
According to the legacy documentation, Asset Valuer Pro supports three primary valuation approaches as defined in accounting standards:
"Under the accounting standards the valuations may be delivered by one of or a combination of - Market approach (used when there is an open and active market - eg residential properties/cars), Income approach (used when value is driven by income earning potential. Eg commercial highrise), Cost approach (where there is no market and assets are used to deliver community benefits e.g roads)"
This ValuationCalculation service implements all three approaches, with particular focus on the Cost approach which has multiple variants (Apportionment, Direct, Historical).
đ Calculation Process Flowâ
The legacy documentation describes the calculation process flow that this service implements:
"Once all data is populated the valuer refreshes all the calculations. This process reads the raw data (such as asset hierarchy), accesses relevant information (based on the hierarchy) from the assumptions table and populates relevant fields (such as valuation profiles, unit rates, useful life, residual value, depreciation profile, obsolescence profile), [and] uses the populated data to run the various algorithms and produce valuations."
This describes exactly what the ValuationCalculation service does: it reads asset data, applies assumptions based on hierarchy, and runs valuation algorithms.
đ Valuation Frameworkâ
The legacy documentation emphasizes the importance of the "valuation framework" which includes:
"The asset hierarchy is an essential element. It requires all assets to be described based on Asset Class, Asset Type, Asset Sub-Type. Based on that combination we specify what the 'components' will be and for each 'component' to specify the Component Type, Component Sub-Type."
The ValuationCalculation service uses this hierarchy to apply the correct assumptions and valuation profiles to each asset and component.
đ Assumption Typesâ
The legacy documentation lists specific types of assumptions that must be applied during valuation:
"The types of assumptions include: Entity level assumptions (valuation profiles), Asset Class level assumptions (valuation profile rules), Asset Level assumptions (asset level unit rates, indices, apportionment), Component level assumptions (component level unit rates, short-life and long-life splits, useful life, residual value)"
This service incorporates all these assumption types into the valuation calculation process, applying them at the appropriate level (entity, asset class, asset, or component).
⥠Performance Considerationsâ
The valuation calculation process can be resource-intensive, especially for jobs with many assets and components. Some optimizations include:
-
Batch Processing
- Assets are processed in manageable batches
- Results are saved incrementally
-
Calculation Caching
- Common calculation results are cached where possible
- Valuation profiles are loaded once per job
-
Database Optimization
- Bulk database operations are used for saving results
- Indices on frequently queried fields improve performance
đ Regulatory Complianceâ
âšī¸ Note: The valuation calculation implements accounting standards including:
- IFRS 13/AASB 13: Fair Value Measurement
- IFRS 16/AASB 16: Leases
- IPSAS 17: Property, Plant and Equipment