Parameters and Parameter Groups
A Parameter in Aquantify is defined as a measurable feature or characteristic (physical, chemical or microbiological) for which Results are captured. For example you might define a Parameter for pH. Similarly you might define a Parameter for a Security Check, a Chemical Delivery, a Reservoir Check, a Vehicle Check, Instrument Maintenance etc.
Aquantify has the concept of Parameter Groups and Parameters which is a parent-child relationship.
Clicking on the Parameters>Parameters menu item displays the Parameter Group hierarchy on the left and the associated Parameters on the right for the selected Parameter Group.
New Parameter Groups and Parameters can be easily added to Aquantify at any time. You can associate a Parameter to an existing Parameter Group on this screen, or add the membership later through the Parameter’s Groups tab. When you add a Parameter Group you can create a hierarchical Parameter Group structure by selecting a parent Parameter Group from the existing groups. Parameters and Parameter Groups have an Active state. Dated associations use From and To separately.
Clicking on the Parameter Group on the left displays the associated Parameters on the right hand side of the screen. It is important to note that a Parameter can to belong to one or more Parameter Groups.
Parameter Details
When you click on the Add button to create a new Parameter, the following screen is displayed. On this screen you define the Details which include a unique Name, Description (optional), a unique Reference which is important if the Parameter is going to be used in an Expression, an Active state, a Data type and if required a Custom Attribute.
The Test methods tab is where you define the Default and any other Methods that are required. The Groups tab allows you to associate this Parameter to an existing Parameter Group.
Parameter Methods
Parameter Methods allow you to set up a single Parameter definition with one or more Methods, each with a Unit of Measurement, associated Instrument, Expression and associated Sample Point Groups or Sample Points.
The Test methods tab on the Parameter screen is where you set up a Default Method which will be used for all Sample Points unless there is another Method for specific Sample Point(s) or Sample Point Group(s). Parameter Methods may have an associated Unit of Measurement, Instrument and calculation Expression.
Examples -
- You may have set up a Parameter which only has the Default Method in place. This Method also has an Expression which uses the specific gravity of a chemical in the calculation. When a new lot of this chemical is delivered, you find that the specific gravity of the lot has changed. Therefore you would need to create a new Method with an Expression which uses the new specific gravity in the calculation. Associate the new Method with the applicable locations and From/To period; it will then override the Default Method for matching tasks.
- You may have a requirement for Aluminium to be measured in water using a Unit of Measurement of mg/L and for Aluminium to be measured in soil with a Unit of Measurement of mg/kg. In this instance you would need to define the Aluminium Parameter with one Method for soil and another Method for water, each with their respective Unit of Measurement.
- You may have a requirement for meter flow readings to be taken at many locations. In this instance you would define a single Meter Reading Parameter with several Methods, each with a specific Unit of Measurement, Instrument(meter) and associated Sample Point.
Before going into more detail on Parameter Methods, it is important to gain an understanding of Parameter Expressions as they are an integral part of Parameter Methods - see below after Parameter Groups
Parameter Groups
The Groups tab details current and previous Parameter Group associations. The association’s From and To dates determine when it applies.
Parameter Expressions
When you define a Parameter Method you can also define a Parameter Expression. An Expression is like a formula which is used to perform a calculation automatically. There are many functions in Aquantify that will assist you in setting up Expressions.
The Expression screen is accessed from a Parameter’s Test methods tab. Open the required method and choose Expression.
The Expression screen has an expression building area, Ctrl+Space autocomplete for functions and references, and hover help for additional details.
| Expression | Selection / purpose |
|---|---|
Latest(Param_1, g, SPoint_1) + 100
|
Use autocomplete and hover help in the current editor; the old separate function/reference selection tabs have been replaced. |
References, Functions and Operators
References
Aquantify allows you to define a Reference for a Parameter and a Sample Point. A Parameter and Sample Point Reference can then be combined with one or more Functions and Operators in an Expression. Using a Sample Point Reference in an Expression allows you to 'reference' a Result at a particular Sample Point. The Sample Point Reference is optional in an Expression. If there is no Sample Point reference used in an Expression, it is assumed that the referenced Parameter Result will be from the same Sample Point as the Parameter with the Expression. Some functions also allow you to include a list of Sample Point References (as separate arguments).
An Expression example -
| Expression | Selection / purpose |
|---|---|
Latest(Param_1, g, SPoint_1)
|
Read Param_1 at SPoint_1 rather than the calculated task’s own location. |
Functions
There are several custom and system Functions available in Aquantify which can be used in a Parameter Expression to automatically calculate a Parameter Result.
Custom functions generally have three parameters (or components) - but not always eg. DiffDays only has a Parameter Reference and a Sample Point Reference
Function(ParameterReference, UOM, SamplePointReference)
These are - Parameter Reference, UOM (Units of Measurement) and Sample Point Reference which is optional. If the latter is omitted, the Expression will retrieve the Parameter Result used in the Expression from the same Sample Point. When included, there can be one Sample Point Reference or more than one Sample Point Reference. In the current editor, pass multiple references as separate comma-separated arguments, without square brackets.
For example - Function(ParameterReference, UOM, SamplePointReference1, SamplePointReference2, SamplePointReference3)
For example, here are the three versions of the Latest custom function -
Latest(ParameterReference, UOM ) which does not have a Sample Point Reference
Latest(ParameterReference, UOM, SamplePointReference) which has a single Sample Point Reference
Latest(ParameterReference, UOM, SamplePointReference1, SamplePointReference2, SamplePointReference3) which has three Sample Point References
Custom functions which support multiple Sample Point References -
- Latest(ParameterReference, UOM, SamplePointReference )
Latest returns a Result from source tasks whose periods overlap the calculated task's range. It waits when the newest overlapping task (ordered by its start, then end) is pending. Once that task is submitted with a value, it selects the submitted overlapping Result with the latest Result date. Use LatestAvailable to skip pending tasks and No result entries.
LatestAvailable(ParameterReference, UOM, SamplePointReference)
LatestAvailable returns the submitted Result with the latest Result date from source tasks whose periods overlap the calculated task's range. It skips pending tasks and submitted No result entries, using an earlier submitted value when available. If no submitted value exists in the overlapping range, the calculation remains pending.
Omit the Sample Point Reference to use the calculated task's Sample Point, or pass one or more Sample Point References as separate comma-separated arguments, without square brackets. The UOM argument converts numeric values to the requested unit; leave it empty for unitless, text or lookup Results. Text and lookup values are also supported.
Examples: LatestAvailable(Chlorine, mg/L) uses the same Sample Point; LatestAvailable(Chlorine, mg/L, Inlet) uses Inlet; LatestAvailable(Chlorine, mg/L, Inlet, Outlet) chooses the latest submitted value across both points.
For example, if an overlapping task has a submitted value of 0.8 mg/L and a newer overlapping task is pending or has No result, LatestAvailable(Chlorine, mg/L) returns 0.8 mg/L. It does not search outside the overlapping task range. Selection uses the Result date; overlap uses the source task's period.
- Avg(ParameterReference, UOM, SamplePointReference)
This function is used to calculate the Average Result for a Parameter at the same Sample Point, a specific Sample Point, or from a number of Sample Points.
- RollingAvg(ParameterReference, UOM, SamplePointReference)
This function is used to calculate the Rolling Average Result for a Parameter at the same Sample Point, a specific Sample Point, or from a number of Sample Points.
- Median(ParameterReference, UOM, SamplePointReference)
This function returns the Median Result for a Parameter at the same Sample Point, a specific Sample Point, or from a number of Sample Points.
-
RollingMedian(ParameterReference, UOM, SamplePointReference)
This function returns the Rolling Median Result for a Parameter at the same Sample Point, a specific Sample Point, or from a number of Sample Points.
The following custom functions DO NOT support multiple Sample Point References -
- Diff(ParameterReference, UOM, SamplePointReference)
This function is used to calculate the Difference in value since the previous Parameter Results at the same Sample Point or a specific Sample Point
- DiffDays(ParameterReference, SamplePointReference) - This function is used to calculate the number of days between the latest Result and the previous Result
- Total(ParameterReference, UOM, SamplePointReference)
This function is used to calculate the Total change in value over time for a Parameter since the first Result at the same Sample Point or a specific Sample Point.
Operators
The most commonly used Operators are available in Aquantify.
These include -
- Add (+)
- Subtract (-)
- Multiply (*)
- Divide (/)
Expressions
An Expression is defined for a Parameter Method. The Expression field allows you to combine Functions, UOM, Parameter References, Sample Point References, Operators and numbers. The end result being that the Parameter Result will be automatically calculated using the defined Method Expression.
Building Up an Expression
Scenario - For Parameter_Two we want to set up an Expression that will get the latest Result for Parameter_One at SPoint_One and then add 100. Parameter_Two is tested at SPoint_Two . Both Parameters have been defined with an integer data type and a Default Method with a UOM of g. To do this we use a Reference for both Parameter_One and SPoint_One in the Calculation Expression.
The set up -
| Parameter |
Parameter Reference |
Sample Point |
Sample Point Reference |
Expression |
|---|---|---|---|---|
| Parameter_One | Param_1 | SPoint_One | SPoint_1 | |
| Parameter_Two | Param_2 |
SPoint_Two |
SPoint_2 | Latest( Param_1 , g, SPoint_1 ) + 100 |
On the Parameter’s Test methods tab, add or open the required Method, then open Expression. Type Latest or use Ctrl+Space autocomplete to select the function. Enter its arguments between the parentheses.
| Expression | Selection / purpose |
|---|---|
Latest()
|
Latest retrieves the latest applicable source Result. |
Enter the Parameter Reference Param_1 as the first argument, using autocomplete to find the defined reference.
| Expression | Selection / purpose |
|---|---|
Latest(Param_1)
|
Param_1 identifies Parameter_One. |
Enter the Unit of Measurement g as the second argument. It must be a defined, compatible unit.
| Expression | Selection / purpose |
|---|---|
Latest(Param_1, g)
|
Separate the Reference and unit with a comma. |
To add a Sample Point Reference, enter a comma and then SPoint_1, using autocomplete for the defined reference.
| Expression | Selection / purpose |
|---|---|
Latest(Param_1, g, SPoint_1)
|
Separate the unit and location with a comma. |
Then place the cursor outside of the function brackets and enter the Add operator + followed by 100.
| Expression | Selection / purpose |
|---|---|
Latest(Param_1, g, SPoint_1) + 100
|
The + 100 belongs outside Latest’s parentheses. |
To visualise the scheduled Parameters on the calendar -
| Tasks | Scheduling relationship |
|---|---|
| Parameter_One at SPoint_One | Schedule the required source measurements |
| Parameter_Two at SPoint_Two | Its period must cover the applicable source task periods |
On the Data Tasks screen -
| Parameter | Point | Result |
|---|---|---|
| Parameter_One | SPoint_One | 250 g |
| Parameter_Two | SPoint_Two | Latest(Param_1, g, SPoint_1) + 100 = 350 g |
Using the Avg Function in an Expression
You can define a Parameter that has an Expression which uses the Avg function to automatically calculate the average Result for another Parameter.
Scenario - Suppose we want to automatically calculate the average Result for Parameter A which has been tested over 5 days. Both Parameters have been defined with a decimal data type and a Default Method with a UOM of kg. To do this we need to define Parameter D which will use the Avg function in it's Expression.
The set up -
| Parameter | Reference | Expression |
|---|---|---|
| Parameter A | Parameter_A | |
| Parameter D | Avg(Parameter_A, kg) |
| Expression | Selection / purpose |
|---|---|
Avg(Parameter_A, kg)
|
Its default Method uses kg; no Sample Point Reference is needed at the same point. |
To visualise the set up on the Schedule calendar -
| Tasks | Scheduling relationship |
|---|---|
| Parameter A: five daily tasks | Schedule the required source measurements |
| Parameter D: one task covering all five days | Its period must cover the applicable source task periods |
On the Data>Tasks screen you will notice that Parameter D has a calculated-expression indication (calculated)which indicates that this Parameter has an Expression and that this Result will be automatically calculated.
| Parameter A | Parameter D |
|---|---|
| Some applicable tasks still Pending | Avg remains Pending |
When all the Results for Parameter A have been entered, the Result for Parameter D is automatically calculated. However you might find it more appropriate to use the Rolling Average function instead of the Average function so that you will be able to see the average for the Results entered so far rather than waiting until all Results have been entered. This function will be covered later in this section.
| Values (kg) | Average (kg) |
|---|---|
| 4, 5, 7, 8, 10 | 34 / 5 = 6.8 |
Using the Diff and Total Functions in Expressions
Scenario - Suppose we have a meter that we want to read every day and we want to know the volume that passes through the meter from one day to the next. Over time we also want to know the total volume that has passed through the meter.
To do this we can define a Parameter called ABC Meter Read with an associated Reference and a default Method with UOM of ML which will record the meter readings. We can also define another Parameter called ABC Meter Read Diff with a default Method with a UOM of ML and which also has an Expression that automatically calculates the difference between the current and previous reading in ML. The last Parameter needed is ABC Meter Vol Total with a default Method with a UOM of ML and also with an Expression which automatically calculates the total volume that has passed through the meter in ML.
The set up for this would be as follows -
| Parameter | Reference | Expression |
|---|---|---|
| ABC Meter Read | ABC_Read | |
| ABC Meter Read Diff | Diff(ABC_Read, ML) | |
| ABC Meter Vol Total | Total(ABC_Read, ML) |
To visualise the set up on the Schedule calendar -
| Tasks | Scheduling relationship |
|---|---|
| ABC Meter Read: daily readings | Schedule the required source measurements |
| ABC Meter Read Diff and ABC Meter Vol Total: matching calculation periods | Its period must cover the applicable source task periods |
After each Meter reading is entered, the Parameters with Expressions for volume difference and total volume are automatically calculated.
| Reading | Difference | Total since first reading |
|---|---|---|
| 680 | 0 | 0 |
| 999 | 319 | 319 |
| 220 — after rollover | 220 | 539 |
A More Complicated Example
To demonstrate a more complex example, the Ammonia Dose Rate will be automatically calculated using the Ammonia Flow Rate, the Raw Flow Rate and the Bore Flow Rate in a complex formula.
The set up for this would be as follows -
| Parameter | Reference | Expression |
|---|---|---|
| Ammonia Flow Rate | AmmoniaFlowRate | |
| Raw Flow Rate | RawFlowRate | |
| Bore Flow Rate | BoreFlowRate | |
| Ammonia Dose Rate |
(Latest(AmmoniaFlowRate, L/h) * 0.25 * 0.9) / (( (Latest(RawFlowRate, L/s) + Latest(BoreFlowRate, L/s)) * 3600 ) / 1000000) |
Sample Points Tab
The Default Method applies to all Sample Points, otherwise one or more additional Methods must be defined which can be associated to specific Sample Points and Sample Point Groups.
Setting up Methods
The Parameter Test methods tab is accessed via either the Add Parameter or Edit Parameter screen. If you are setting up a new Parameter you must firstly define the Default Method by selecting the Unit of Measuremen t(if appropriate), Instrument (if appropriate), and then the Expression (if appropriate) by opening Expressionbutton. Some Parameters may only ever need a Default Method, while other Parameters may need several Methods set up. Additional Methods can be set up by clicking on the Add Test Method button. Here you define the Unit of Measure, Instrument and Expression. You can also associate one or more Sample Points and Sample Point Groups, each with their own Effective and Expiry Dates if appropriate.
Incompatible Units of Measurement
During the set-up of Methods, check whether UOM Conversions exist between compatible Method Units of Measurement. Different dimensions, such as mg/L and mg/kg, need appropriate location-specific Methods rather than a numerical conversion.
| From | To | Factor |
|---|---|---|
| kg | g | 1000 |
For example, if the active Parameter Method at the time of Result entry has a UOM of g and the system has a UOM conversion defined for kg to g, you can enter the Result in kg instead of g and the system will automatically convert the Result to g.
Methods and Limit Breaches
When you set up a Limit for a Parameter/Sample Point, you choose the Unit of Measurement (UOM) from a drop down list of all UOM defined in the Parameter's Methods. In the following example the system has Limits for the Parameter defined in kg. At the time of Result entry the system will compare the Result to any active Limit that has been set up for the Parameter and Sample Point.
System defined UOM Conversions can also come into play if for example you choose to enter the Parameter Result in g instead of the UOM from the active Method which is kg. In this scenario the following is an example of the Limit Breach message, where the Result entered was 202g ( = 0.202 kg which breaches two Limits, one with a maximum of 0.15kg and the other with a maximum of 0.2kg).
| Entered Result | Converted Result | Maximum limits breached |
|---|---|---|
| 202 g | 0.202 kg | 0.15 kg and 0.2 kg |
Catch-All
The Parameter’s Default Method applies to all Sample Points when no higher-priority Method matches. The current editor uses explicit Sample Points and Sample Point Groups associations with From/To dates; it does not expose the Windows CATCH-ALL placeholder or its TAB shortcut.
| Method | Applicability |
|---|---|
| Default | Fallback for all locations |
| Additional | Matching location/group and From/To association; highest Priority wins |
Method Order of Precedence
When setting up Parameter Methods, the system uses Priority to determine the order of precedence. Additional Methods are listed with the highest Priority first; a newly created Method receives the next higher Priority. The Default Method has Priority 1 and remains the fallback. The current list does not provide the Windows drag-and-drop priority control.
| Priority order | Method unit | Location associations |
|---|---|---|
| Highest — Method 1 | g | 70 Graham St, Shepparton; Kyabram group |
| Next — Method 2 | mg | 45 Oswald St, Kyabram; 7 Manifold St, Nathalia; Shepparton and Tongala groups |
| Next — Method 3 | µg | 28 Mangan St, Tongala; Nathalia group |
| Default | kg | Fallback |
Method Selection
At the time of Result entry the system uses the Parameter Scheduled date to determine which Parameter Method to use by examining the -
- Method Priority (order)
- Method Sample Point or Sample Point Group association and their Effective/Expiry dates
Effective and Expiry Dates
Methods other than the Default Method have an association with one or more Sample Points and/or Sample Point Groups. These associations can also have Effective and Expiry dates which determine when the association is active. When neither date is present the association is always active. When the Expiry date is passed for all associated Sample Points and/or Sample Point Groups, the Method becomes inactive. When all Parameter Methods either do not have any matching Sample Point/Sample Point Group associations, or the associations are inactive, the system will automatically use the Default Method.
Method Priority in action
To explain how Method Priority works, the original example assumes Method 1 has the highest Priority, then Method 2, then Method 3, with the Default Method last. Its associations are as follows:
- Method 1 has a UOM of g and an associated Sample Points 70 Graham St, Shepparton and an associated Sample Point Group Kyabram.
- Method 2 has a UOM of mg and an associated Sample Points 45 Oswald St Kyabram and 7 Manifold St Nathalia and an associated Sample Point Groups Shepparton and Tongala.
- Method 3 defined with a UOM of ug and an associated Sample Point 28 Mangan St Tongala and an associated Sample Point Group Nathalia.
- Default Method with a UOM of kg.
| Location | Selected method | Reason |
|---|---|---|
| 45 Oswald St, Kyabram | Method 1 — g | Higher-priority Kyabram group association |
| 28 Mangan St, Tongala | Method 2 — mg | Higher-priority Tongala group association |
When you go to enter a Result for the Parameter scheduled at -
- 6 Tisdall Rd, Kyabram - Method 1 will be used with a UOM of g
- 24 Sutton Rd, Shepparton - Method 2 will be used with a UOM of mg
- 6 Church St, Nathalia - Method 3 will be used with a UOM of ug
- 34 Robinson St Murchison- Default Method will be used with a UOM of kg
- 45 Oswald St, Kyabram - Method 1 will be used with a UOM of g, since Method 1 which has an associated Sample Point Group of Kyabram has a higher precedence than Method 2 which is associated to Sample Point 45 Oswald St, Kyabram
- 28 Mangan St, Tongala - Method 2 will be used with a UOM of mg, since Method 2 which has an associated Sample Point Group of Tongala has a higher precedence than Method 3 which is associated to Sample Point 28 Mangan St, Tongala.
Parameter Methods in Action
Example 1 (Meter Replacement) -
A Meter Read Parameter that you use for meter readings MUST HAVE an Instrument (meter) associated to the Method being used. When a meter is to be replaced, a new Parameter Method is defined associated to the new Instrument (meter) and the same Sample Point.
Here is the set up for meter reading and replacement -
The Meter Read Parameter has a Method associated with the current Instrument(meter).
Replacing a Meter
To ensure that any volume calculations remain valid, the following procedure MUST BE followed in order when replacing a meter.
- Take a final meter reading for the Instrument (meter) which is going to be replaced and enter the Result into the system.
- Only do this if the above applies - On the Scheduler manually delete any future scheduled meter reads that are associated to the meter being replaced. This is because any future meter readings will still be associated to the meter being replaced.
- Select the meter Instrument Type and create a new uniquely named Instrument(meter).
- Go to the Meter Read Parameter and create a new Method associated to the new Instrument(meter) and the Sample Point.
| Setting | Selection |
|---|---|
| Instrument | New uniquely named meter |
| Sample point | Same physical meter location |
| From | Replacement date/time |
| Expression | Reading method; calculated Diff/Total parameters retain their own expressions |
- This step is only needed if you are manually scheduling via the Scheduler instead of a Program. Schedule future meter reads with the new meter starting from the date that the new meter was installed.
- Install the new meter.
- Take the initial meter reading of the new meter as soon as it is installed and enter this reading into the system.
Example -
| Date | Instrument / reading | Difference | Total |
|---|---|---|---|
| 18 May 2016 | Old meter: 400 | 0 | 0 |
| 19 May 2016 — first | Old meter final reading: 50 | 649 | 649 |
| 19 May 2016 — later | New meter initial reading: 200 | 649 — unchanged at the transition | 649 |
| 20 May 2016 | New meter: 375 | 175 | 824 |
Example 2 - Suppose you have two tanks at different Sample Points both holding alum coagulant and both require tank inventories as part of process monitoring. However, the way they are calculated is different.
| Scenario 1 | Scenario 2 |
The required calculations are -
| Sample point | Input reference | Output references | Inventory calculation |
|---|---|---|---|
| Tank 1 | A | B, C |
Latest(A, L) - Latest(B, L) - Latest(C, L)
|
| Tank 2 | A | B, C, D |
Latest(A, L) - Latest(B, L) - Latest(C, L) - Latest(D, L)
|
The Aquantify set up will look like this -
Create Parameters A, B, C and D with their respective references A, B, C and D.
Create Sample Points Tank 1 and Tank 2.
Scenario 1
Create a Parameter Alum Coagulant Tank Inventory with two Methods, one for each Scenario with the appropriate associated Sample Point and Expression.
| Parameter | Sample point | Expression |
|---|---|---|
| Alum Coagulant Tank Inventory | Tank 1 | Latest(A, L) - Latest(B, L) - Latest(C, L) |
Scenario 2
| Parameter | Sample point | Expression |
|---|---|---|
| Alum Coagulant Tank Inventory | Tank 2 | Latest(A, L) - Latest(B, L) - Latest(C, L) - Latest(D, L) |
Example 3 - For a Parameter like Aluminium you may need to measure it in water samples using a Unit of Measurement(UOM) of mg/L, and in soil samples using a UOM of mg/kg.
| Method | Unit | Location |
|---|---|---|
| Water | mg/L | Sample Point 1 |
| Soil | mg/kg | Sample Point 2 |
In Aquantify set up will look like this -
Create the Aluminium Parameter
Create Sample Point 1 and Sample Point 2.
Scenario 1
Create the Aluminium Parameter, firstly with a Water Method with UOM mg/L and associate this method to Sample Point 1.
Scenario 2
Create a Soil Method with a UOM of mg/kg and associate this method to Sample Point 2.
| Method | Unit | Location |
|---|---|---|
| Soil | mg/kg | Sample Point 2 |
File Import and Methods
In the above example you would schedule the Aluminium Parameter at both Sample Points with a Testing Organisation of External Lab if appropriate. The lab import file will contain a record for Aluminium at Sample Point 1 with a UOM of mg/L and another record for Aluminium at Sample Point 2 with a UOM of mg/kg. During the lab import the system will find the Method with the highest Priority with matching criteria and this Method will be used. Otherwise the default Method will be used. If a problem is experienced during the Result import an error will be produced and the Result will NOT be imported.
See - How to Add a Parameter Group, How to Add a Parameter , How to Add an Existing Parameter to a Parameter Group , How to Delete a Parameter from a Parameter Group, Parameter Expressions, How to Add an Instrument Type, How to Add an Instrument
