
|
Tutorial
13.3 - User
Interface for Scenario Form
|
|
|
Please Note: Our Scenario Engine, AKA Hal, was created to perform virtually any Scenario the operator wishes to create, its potential limited only by need and the imagination. It is extremely straightforward to use, once the basic premises become familiar to you. We strongly suggest that you at least View (and preferably mimic) the Video on Building Scenarios below this page. This step by step scenario construction introduces the techniques needed for most scenarios, and will make you familiar with all the tools you will need to turn your own ingenuity loose, create your own stock scenarios, then Play "What If" to your heart's content. Most of the scenario items are operational, a few likely never used items may remain unusable. If you see any not yet thought of items that you would like created for your uses, please let us know as we wish to expand it relative to need. |
|
|
The list control has Six columns. This file details the intent and operation of each column.
|
|
|
1.
Rule Column: We can define
a very complex condition, by having a combination of IF, AND, or OR. The
following are some samples of conditions: a. IF X [ DO Z1 DO Z2 DO Z3] - means if condition X is satisfied, changes in the directly following DO lines, Z1, Z2, and Z3 will be applied. b. IF X AND IF Y DO Z - means if both condition X and condition Y are satisfied, changes in Z will be applied. c. IF
X OR [IF Y AND IF Z] DO W - means if just condition X or both of
conditions Y and Z are satisfied, then changes in W will be applied. To define these conditions in a scenario, each IF or logic operators is in a separate line. Condition
- IF X OR [IF Y AND IF Z] DO W is constructed as follows: |
|
|
2. Any/All Column: Note: The terms "Any and All" refer to those Objects Selected in the Object Column, and not to "Any or All" Objects in the drawing) a. In every
"IF" condition line; ALL = ALL of the hydraulic elements in the "Objects" column list must satisfy the condition to consider the result as true. E.g. 1: If
"ALL Nodes" were selected, all Types of nodes in the "Object"
List are considered, and every Node in the list must meet the requirement
for the DO to take place. ANY = if ANY single element in the list of objects of this rule, satisfies the condition, the result of the rule is true. E.g.: If
we wished to turn off a Pump if ANY single Node in a group of nodes in
the "Any / All" Column, we select "ANY" Node, Junction
etc. b. In every
ALL condition line; |
|
|
3. Objects Column: In this column, we can introduce hydraulic elements which are subject to evaluation for a condition or applying a change. There
are several ways to place Objects into the Objects" Column: 1. Type their
IDs separated by comma 2. Select
them in the drawing using AutoCAD methods, or by Hydraulic QuickSelect
or "Selection Sets". Then, to add the Objects, click "Copy
Selected Objects" and the list of all selected objects is added to
the rule. 3. By pressing
SHIFT key then clicking in this column a ComboBox containing the list
of all Saved Selection Sets will appear. By selecting one of them, the
IDs of all the objects in that selection set will be copied to this rule. Viewing and Checking an Object Column List: For a large list of objects, field shows only " " . Verifying all the objects in the list, just by their IDs is very tedious and not practical. If we want to check the objects introduced to a rule, we can click on "Select Objects" when that rule is selected. So it selects all the objects in that rule. To check
all the selected objects one by one, there is a button in "Selection
Set" Tab of HydrauliCAD palette named "Copy Selected Elements
to Trace". By clicking on that button, it copies the list of selected
elements to trace list, so by clicking on "Next" To clear the list of objects in a rule, we can clear the edit box or simply deselect objects in the drawing, then click on "Copy Selected Objects". |
|
| 4.
Controls: By clicking in this column, a ComboBox is shown, which contains all the properties of the type of elements we chose in "Any/All" column. |
![]() |
| 5.
· > ? < It specifies the type of comparison we want to make between an object's property and the value we enter in the next column. |
|
|
6. Value To evaluate if a complex condition is satisfied, we need to know how logical expressions are evaluated. |
|
|
Logical Expressions: Relational Operators Table
1: Relational Operators Example
Logical
Expressions: Logical Operators Table
3: Logical Operators Example
Rules:
· A .or. (B .and. C) = (A .or. B) .and. ( A .or. C) · .not. ( A .and. B) = (.not. A) .or. (.not. B) · .not. (A .or. B) = (.not. A) .and. (.not. B) · [A .and. (B .or. C)] is not necessarily equal to [(A .and. B) .or. C] To keep logical
expressions in Query of HydrauliCAD simple, only .and. and .or. operators
are used. The logical operator introduced at the start of every rule,
is between the result of last rule and the result of the same rule which
operator is in. |
|
![]() |
|