Page tree
Skip to end of metadata
Go to start of metadata

The changes in this beta will be available in the next Source production release due out at the end of June 2022.

This release includes:

  • Additional functions for Data Sources and Probability Of Exceedance,
  • improvements to constraints downstream of Storage nodes,
  • Backwards Euler Release Method is now available for Weirs, and 
  • changes for Plugin developers.

Functions for Data Sources and Probability Of Exceedance

There are four new built-in Functions:

  • GetDataPeriod - Gets data from a Data Source between the start and end dates. Data is returned as an array.
  • GetDataTimeSteps - Gets data from a Data Source using a start date and the number of time steps. Data is returned as an array.
  • ProbabilityOfExceedanceFlow - Gets the percentage value for the given flow from the probability of exceedance curve.
  • ProbabilityOfExceedancePercentage - Gets the flow value for the given percentage from the probability of exceedance curve.

Example usage:

//Data Sources functions

//Arguements are: Data Source (for files, Name.ColumnName), start year, start month, start day, end year, end month, end day
GetDataPeriod("MyDataSource_csv.Column1", 2000, 1, 1, 2020, 12, 31)
//Returns an array of values in the units of MyDataSource_csv.Column1.

//Arguements are: Data Source (For files, name and column name), start year, start month, start day, number of time steps
GetDataTimeSteps("MyDataSource_csv.Column1", 2000, 1, 1, 365)
//Returns an array of values in the units of MyDataSource_csv.Column1.

//These methods can then be used with other built in functions that take an array such as sum, median, average, min, max etc. e.g:
sum(GetDataTimeSteps("MyDataSource_csv.Column1", 2000, 1, 1, 365))

//Probability Of Exceedance

//Arguements are: Array of values, flow value (in the units of Flow_res_csv.Runoff)
ProbabilityOfExceedanceFlow(GetDataTimeSteps("Flow_res_csv.Runoff", 2000, 1, 1, 365),10)
//Returns the percentage value.

//Arguements are: Array of values, percentage
ProbabilityOfExceedancePercentage(GetDataTimeSteps("Flow_res_csv.Runoff", 2000, 1, 1, 365),20)
//Returns the flow value in the units of Flow_res_csv.Runoff.

//You can also use a modelled variable to provide the array of values
ProbabilityOfExceedanceFlow($Previous30DaysFlow,10)

Backwards Euler Release Method now available For Weirs

Backward Euler Method is now available for Weirs!   This wasn't a small development and requires testing from the jurisdictions. 

It's enabled under Edit \ Scenario options \ Storages:

Storages have had the option of using the Backward Euler Method for a while now and it's the default for new models. However, the Piecewise-linear Integral Method is still available, see Storage Node - SRG for details. 

Moving the Weir over to the Backward Euler Method enables other features:

  • Outlet Priorities can now be used,
  • Weirs now include the concepts of a Safe Release capacity for Operating Constraints, and
  • Ordering Priorities will now work with Weirs.

Improvements to Minimum Constraints downstream of Storages

For Rules-based ordering, we have improved the Constraint calculations downstream of Storages. This is how the Constraint Phase in Storages was previously calculated:

  1. The Storage Node Model calculates a Predicted Volume for the storage. This is done by taking the Current Storage Volume and adding the Ordering Minimum Constraint from upstream.
  2. It uses this to determine a Minimum Release and a Maximum Release for each of the Outlet Paths, by comparing the Predicted Volume against the Outlet definitions (e.g. spillways, valves, etc)
    • There is a special case if the Predicted Volume exceeds the Full Supply Volume
    • In this case, the Minimum Release is the Predicted Volume - Dead Storage Volume - Full Supply Volume (which looks wrong: RM-17722)
  3. The Minimum Release and a Maximum Release would become the Ordering Minimum Constraint and an Ordering Maximum Constraint for downstream.

We have now added a Volume Above Maximum Operating Constraints

  • Volume Above Maximum Operating Constraints = Predicted Volume - Maximum Operating Constraint
  • Then it is constrained so New Minimum Release = MIN( Maximum Release, MAX( Minimum Release, Volume Above Maximum Operating Constraints ) )

So that New Minimum Release becomes the Ordering Minimum Constraint.

Plugin Developers

The API for Custom functions has been extended:

  • You can now include strings and arrays as arguments for custom functions.
  • You can now return an array from a custom function, rather than just a single double value.

This was implemented to enable the function improvements listed above, however can now be used in any custom function. For details please see: Extensions to Custom Functions in 5.13beta

As we are moving to .net 6, we have now updated the .csproj format that is used by Source.  Please see: Csproj Format to go through the conversion process.

To compile Source you now require:

Regression Testing

There is no tolerance in our regression test suite to allow for earlier identification of results being different on different machines or versions of operating systems. 

Regression test repository changes since the first Source 5.10:

(warning)  0 Project updated results
(warning)  0 Project files updated

Details here: 5.13 Regression Test Changes

Insight

To run Insight, you also need to install the 32bit version of Microsoft Visual C++ 2010 Redistributable Package.
This installer is for 32bit machines and 64bit machines since the library we use is 32bit: Microsoft Visual C++ 2010 Redistributable Package (x86).

Full Release Documentation

T Key Status Summary Assignee Reporter
Loading...
Refresh