Edit Queries Dialog (Active Topology)
The Edit Queries Dialog is where you define Active Topology Queries (to be used for determining the active/inactive status of elements in the system).
Navigation: Click the Edit Queries button on the Edit Active Topologies Mode Dialog to access this dialog.
Template Year Installed / Year Retired Query
A common way to configure active topology queries is to utilize the built-in Year Installed / Year Retired fields. Here is the template of that query you can use:
Physical_InstallationYear <= 2000 AND (Physical_RetirementYear > 2000 OR Physical_RetirementYear = 0)
Automatically include connected elements
- When this option
is On, you only need to define queries for Pipes and (optionally)
Customer Meter elements. The active/inactive status of connected/associated
elements will be determined automatically (e.g., start/stop nodes, isolation
valves, taps, laterals, customer meters, SCADA elements, etc).
The Customer Meter query is optional. You only need to define this query if you would like to control the inactive status independently of the associated pipe. For instance, if the associated pipe is active and some Customer Meters associated with that pipe should be inactive (e.g. if some Customer Meters were installed later than the pipe and represent a future system configuration that you want to exclude for the current simulation).
- When this option is Off, you will define queries for each element type that exists in the system (that you would like to control the active/inactive status for). No additional processing will be performed. Element status will be based on the results of the queries (elements matching the query will be active, the rest will be inactive).
Refer to Active Topology Queries for more detailed information.
Element Queries List
The list at the top half of the dialog allows you to manage active topology queries for the various element types.
The New and Delete toolbar buttons above the list are provided to allow you to add and delete queries respectively. When you create a new query, you will be prompted to choose an element type (you can only define one query per element type).
Query Statement Field
The query statement field at the bottom half of the dialog allows you to edit the SQL query for the selected element type.
There are 4 toolbar buttons above the query statement field: Query Builder, Copy, Paste, and Validate.
The Query Builder button opens the Query Builder Dialog which provides a list of all available fields and operators to assist you when defining queries.
The Validate button allows you to check if your query is valid and working as expected. An informational message will be displayed to help you correct invalid queries.
Validate on OK
Keep this option on to automatically validate all queries when you click the OK button. Invalid queries will be highlighted giving you the opportunity to correct issues before continuing.