Price change report
As the price of any resource can change during the simulation from an external price schedule file (see Price data reader) or any activity that needs to modify prices, it may be necessary to report all these changes to ensure prices are managed correctly.


You will need to add an APSIM Report component to your simulation. In future we may develop an automated version of this report.
Once this report is added you will need to assign the following settings.

[Clock].Today as Date
[Resources].LastPriceChange.PriceChanged.PreviousPrice as Previous
[Resources].LastPriceChange.PriceChanged.CurrentPrice as Current
[Resources].LastPriceChange.PriceChanged.Name as PriceComponent
[Resources].LastPriceChange.PriceChanged.Resource.Name as Resource
[Resources].LastPriceChange.ChangedBy.Name as ChangedBy
This report utilises the LastPriceChanged property of the Pricing Component and provides access to the Price component (PriceChanged property) which has the current and previous price, a name and the resource the price relates to. The LastPriceChanged property also provides the model performing the change. You can use the Resource holder [Resources] or an individual pricing component [ResourceTypeName].ComponentName as the reporting level and this need only be changed in the report event field.

[Resources].PriceChangeOccurred

Run your simulation and this report will be in the datastore with the same name as given to the report component
See also