170 likes | 261 Views
SAVMOV AND ADDMOV. SITES SOFTWARE APPLICATION SEMINAR. __________________________ SITES 2005.1.4 INTEGRATED DEVELOPMENT ENVIRONMENT for WATER RESOURCE SITE ANALYSIS. Data Class Diagram. Project. 0..n. 1. Run. Summary Table. 0..n. 0..n. 0..n. 0..n. 1. Structure (STR).
E N D
SAVMOV AND ADDMOV SITES SOFTWARE APPLICATION SEMINAR __________________________ SITES 2005.1.4 INTEGRATED DEVELOPMENT ENVIRONMENT for WATER RESOURCE SITE ANALYSIS
Data Class Diagram Project 0..n 1 Run Summary Table 0..n 0..n 0..n 0..n 1 Structure (STR) Watershed (WSD) Reach (RCH) Junction (JCT) Watershed Schematic
How are elements processed? • Elements are processed from upstream to downstream using a postorder traversal; e.g., an element is processed only after all upstream elements have been processed. • Intermediate results are stored on a stack; the last set of hydrographs placed on the stack is the first set to be removed (LIFO). • How many elements can be pushed onto the stack? 100
Postorder Traversal STR WSD WSD JCT RCH STR
Example SITES 05/01/2000 SAVMOV 0 101 SAVMOV 101 1 SAVMOV 2 101 3 SAVMOV 0 101 SAVMOV 101 1 SAVMOV 2 101 5 SAVMOV 0 101 SAVMOV 101 1 SAVMOV 2 101 6 ADDMOV 004 ADDMOV SAVMOV 101 2 SAVMOV 2 101 2 SAVMOV 101 1 SAVMOV 2 101 1 ENDJOB 6 5 B C 3 4 A B+C 2 D C 0 0 B B+C 0 D E A 1 A+B+C Stack E
SAVMOV Command • The revised SAVMOV command uses: • columns 11-13 and 16-18 for hydrograph storage location numbers. • an Element Reference Numberin columns 21-25, and • an Element Identifier in columns 41-50. • For each element, the system allows for output of hydrographs to validate the simulation. 21-25 41-50
Hydrograph Storage Location Numbers • The storage location “101” denotes the stack. • Commonly Used Commands: • SAVMOV 0 101 - push a set of “zero” null hydrographs onto the stack. • SAVMOV 2 101 - push a set of “output” hydrographs onto the stack. • SAVMOV 101 1 or SAVMOV 101 2 - pop a set of hydrographs off of the stack.
Example: basex.d2c Element ID Element Ref. # Going to a structure or subwatershed(1), or going to a reach (2) Element Type is stored in column 71 (1 = STR, 2 = WSD, 3 = RCH, 4 = JCT)
0 0 Example: Watershed Schematic Subwatershed: W2 Structure: 256B4 Bifurcation Point: J1 Reach: S2 Structure: 256B5
ADDMOV Command • The ADDMOV command uses columns 11-13 for an optional Element Reference Number, and 31-34 for Element ID, and 71 for Element Type. • The ADDMOV command tells the simulator to add the top two sets of hydrographs on the stack and store the result on the stack for routing; e.g., Push(Stack, Pop(Stack) + Pop(Stack)).
Example SITES 05/01/2000 SAVMOV 0 101 SAVMOV 101 1 SAVMOV 2 101 3 SAVMOV 0 101 SAVMOV 101 1 SAVMOV 2 101 5 SAVMOV 0 101 SAVMOV 101 1 SAVMOV 2 101 6 ADDMOV 004 ADDMOV SAVMOV 101 2 SAVMOV 2 101 2 SAVMOV 101 1 SAVMOV 2 101 1 ENDJOB 6 5 B C 3 4 A B+C 2 D C 0 0 B B+C 0 D E A 1 A+B+C Stack E
Summary The key point is that the interface will generate the model and commands necessary to take care of the series routing.