Highlights of Source Version 4.9 include:
- fixing the problem of different machines giving different results (for two models)
- 'removal' script for plugins
- improvements to the Geographic Map tool,
- Lascam plugin
- calibration performance improvements
- filter on data sources
- timeseries flux for on-farm storages
- calculation of total distribution losses
- run period of the model should not be limited by observed data
- recorder sets
- ownership recorders in weirs and off allocation
- saved run information in the Results Manager
- changes to stop Modelled Variables breaking when the Function they point at is moved
- improving the handling of distribution system loss with travel time
- improvements to Weirs, including mass balance for constituents with lumped routing
- charting improvements
This is most but not all of the things listed in the beta release notes, I don't really know what's important! All of the stuff that had content is copied below.
The table of contents seems to automatically generate, not sure how I get all the above into it.
The problem of different results on different machines has been fixed!
Source uses the Microsoft .NET framework, the problem was caused by 2 functions in the System.Math library. Both System.Math.Pow() and System.Math.Exp() can give different results for some number combinations on different machines. For individual function calls, different results occurred at 0.09% of the time with our randomly generated test data. We believe the issue is from different CPU’s implementing different optimisations to perform the operations as efficiently as possible. The functions are not implemented directly within the Microsoft .NET framework, instead, they are implemented in the Microsoft C run-time libraries which are used by the .NET framework, as well as by a number of other languages including C++. So the nature of the .NET framework, which is an interpreted language, wasn’t part of the issue and the same results would have been obtained if implemented in C++. We have since tested all available System.Math functions and these are the only two we have found that can produce different results on different machines. The vast majority of models don’t see the issue since the differences are very minor and for an individual operation, the difference is only at the last decimal place. However, for very large models with lots of feedback in the model, when the issue occurs it can snowball into meaningful result differences.
To fix it, we implemented new versions of the two functions that produce consistent results on different machines. The problem has only been detected in 2 Source models, which happen to be 2 of the largest and most complicated. With the fix, we are now getting consistent results for both models, across different machines that were previously giving different results. There will be changes for Plugin developers to use the same functions we are using, instead of the inbuilt System.Math functions when using Pow or Exp. We recommend plugin developers to use the new implementations of the functions which are in the TIME.Science.ConsistentMaths class within the TIME assembly.
We have approached Microsoft about the issue and they are yet to respond: Microsoft Developer Community: Math.Pow and Math.Exp produce inconsistent results
This was a really difficult problem to isolate and fix. We are VERY happy that we worked it out!!
Plugins that need persistence can now include a removal script so plugins can remove themselves from a project when they are not needed or have been added accidentally. The tool is available in: Tools \ Remove Plugin from Project File.
There is an example provided in the Example Node model plugin.
Map tool improvements
The tool is available under Tools > Analysis Windows > Map... It now works better for constituents and comparing multiple runs.
The Lascam plugin now includes better value ranges to help determine appropriate ranges to use when calibrating.
Calibration performance improvements
Geoff - is there anything to put here?
Data Sources Filter
There is now a filter for when looking for a data source or its usage:
TimeSeries Flux for On-Farm Storages
On-Farm storages at a water user node now have a"Timeseries Flux". Water added to the On-Farm Storage by the Timeseries Flux functionality only occurs during the Flow Phase. This is in addition to any other Water User Ordering and extractions. The water delivered by the timeseries flux is not actually extracted from the Supply Point”.
- Changes to "Safe Release" functionality for storages with multiple outlets. See: Storage node - OperatingConstraints
- Projects that modify Annual Accounting carryover rules need to be updated when we introduced the ability to modify carryover rules over time. See: Annual accounting - Carryover
Calculation of Total Distribution Losses
We have modified how distribution losses are calculated.
Run period of the model should not be limited by observed data
The run period was constrained when some observed data had been included. We have removed this restriction to allow the model run period to be longer than observed data in the model.
Model changes to carryover over time.
We are currently on .net 4.6.2, which hasn't changed from Source 4.7. We are planning on moving to C# 7, Visual Studio 2019 and .NET 4.8.0 soon, so you will need to make sure you have updated Visual Studio to continue developing plugins in the beta versions. We also intend to move to .NET 5 in 2020, with .NET 5 which will enable the Source command line and service interface to run on Linux.
Results and Configuration Changes
Some results have changed between Source 4.7 and Source 4.9. Result changes are mostly around Annual Accounting, Weirs and specific ordering settings. The eWater development team maintains a detailed system to track when results vary between different version of Source. The details at the following link will help you work out why the results have changed, and any alterations you may need to make to your model configuration. Details of result changes: 4.9 Result Changes from 4.7