Latest Activity

Profile Icon
Kashif Ali replied to Kashif Ali's discussion '10,000+ subcatchments to be assigned with outlets'
Hello Robert, Here is the .inp file for your review, if you can see how large data can be handled by excel add-on http://www.mediafire.com/?a5u64plrksd3tec
1 hour ago
Profile Icon
Profile Icon
Kashif Ali replied to Kashif Ali's discussion '10,000+ subcatchments to be assigned with outlets'
Thanks Rui for your time and efforts to go through this project, By using GIS functions and adding fields in attribute files, the sub catchments are now linked with their appropriate outlets.  Also, rather than, loading all hydrologic and…
1 hour ago
Profile Icon
Kashif Ali replied to Kashif Ali's discussion '10,000+ subcatchments to be assigned with outlets'
Thanks Robert, It really what I needed - without reading the manual, I was trying each option in the swmm to see if there is way to export the data in excel format. However, data being too large, excel simply says sorry with this message (This…
2 hours ago
Profile Icon
Rui Daniel Pina replied to Kashif Ali's discussion '10,000+ subcatchments to be assigned with outlets'
Please try inp.PINS and select inpTools --> Subcatchments connection (https://sites.google.com/site/inppins/) You can also edit inp text file, or even use GIS functions.
20 hours ago
Profile Icon
Rui Daniel Pina commented on MeHa's blog post 'ArcGIS data into SWMM'
inp.PINS worked just fine! Kashif, Please see the message I send you with my results data. The data you send me needed to be "SWMM formated". I did some of this: 1 - Assign invert elevation to nodes from links shp - GIS join; 2 - Define…
20 hours ago
Profile Icon
Robert Dickinson commented on Robert Dickinson's group 'Stream of Information'
After Hours: 120,900 radar images of US weather systems stitched together to form a 14-year weather time-lapse. [reddit.]
yesterday
Profile Icon

Maximum Surcharge Height Over Crown Explanation

Note:   Maximum Surcharge Height Over Crown Explanation Here is an example of how the Maximum Surcharge Height over the Node Crown is calculated.     Consider a manhole with an invert of 10 feet,  one incoming pipe (Pipe A), one outgoing pipe (Pipe B), both pipes with a diameter of 2 feet, but the invert  of Pipe A is 10 feet and the invert of Pipe B is 11 feet.  What is the Maximum Surcharge height if the HGL at the node is 17…See More
Blog post by Robert Dickinson Wednesday
Profile Icon
ash is now a member of SWMM5 - Stormwater Management Model Tuesday
Profile Icon
Robert Dickinson commented on Robert Dickinson's group 'Stream of Information'
A flood warning sign starts to disappear below floodwaters near Charleville, Australia. (Reuters / Queensland Police Service)
Tuesday
Profile Icon
Robert Dickinson replied to Kashif Ali's discussion '10,000+ subcatchments to be assigned with outlets'
You can save the SWMM 5 input file to Excel using this tool and then use Excel to populate the OUTLET column http://www.swmm2000.com/xn/detail/2039064:Note:1021
Tuesday
Profile Icon

10,000+ subcatchments to be assigned with outlets

Hi experts,I am to assign outlet to some 10,000 sub catchments, manually doing it doesn't seem professional.Luckily, name of subcatchment is same name of junction (outlet)i.e.Subcatcment              Junction177119                      177119177123                      177123177126                      177126263803                      263803263806                      263806These are not in particular sequence but name of subcatchment is always same as of junction.Any clueThanks in advanceSee More
Discussion posted by Kashif Ali Tuesday
Profile Icon
Robert Dickinson commented on Robert Dickinson's group 'ExtraVariables'
QA/QC version based on v22 of EPA SWMM 5 with the ability to read older SWMM 5 OUT files. swmm5.dll Epaswmm5.exe
Monday
Profile Icon
Robert Dickinson commented on Robert Dickinson's group 'Stream of Information'
Video: How Snowflakes Are Formed February 4th, 2012 | Posted by Jaime Menchén in Science Videos This time-lapse video lasts 11 seconds, with no music or voice-over. And still you’ll want to see it over and over again. The…
Monday
Profile Icon
4 blog posts by Robert Dickinson were featured Monday
Profile Icon
Blog posts by Robert Dickinson Monday
Profile Icon

[gickr.com]_cf9284f4-d453-2834-0dff-67895a933b33

Photo posted by Robert Dickinson Monday
Profile Icon

This is a galaxy

This is a galaxy. Or is it? A remix of material originally produced for BBC Stargazing Live 2012 If you liked this video, follow me on twitter to hear about ...
Video posted by Robert Dickinson Sunday
Profile Icon
2 blog posts by Robert Dickinson were featured Feb 5
Profile Icon
Blog posts by Robert Dickinson Feb 5
Upaka

"GetSwmmResults" function

  • Rating: No Rating
Hi,
I am bit confused on calling the results of the SWWM using the above function. 
Interfacing guide explains it as follows; but I guess I am confusing specially shown at bold-italic letters.
If anyone knows how to call the results using the above function please be kind enough to explain me using an example.

Thanks alot.
Upaka



The function GetSingleResult, which is included in the example code files that accompany this guide, demonstrates the
code needed to retrieve the computed result for a particular variable for a
given object at a specific point in time. The arguments to the function are:


itemType
the class of item being sought (input)
itemIndex
the index of the item being sought (input)
varIndex
the index of the variable being sought (input)
period
the index of the time period being sought, starting from 1(input)
value
the value of the result being sought (output).


The function returns a value of 1 if it was successful or a value of 0 if was not.

The choices for
itemType can be:

· 0 for Subcatchments,  
· 1 for Nodes  
· 2 for Links  
· 3 for System  

The
itemIndex argument identifies items of a given class that are reported on by consecutive numbers
starting from 0, which are assigned in the same order as the item appeared in
the SWMM 5 input file. As an example, suppose that a system contains 5 junction
nodes with ID names J1, J2, J3, J4, and J5 that are listed in this same order in
the project's input file, but output results are only requested for junctions J2
and J4.
Then an
itemIndex of 0
would retrieve results for J2 while an
itemIndex of 1 would
do the same for J4.
Any other values for
itemIndex would be
invalid. For System items the
itemIndex argument
is ignored. 

Views: 21

Reply to This

Replies to This Discussion

Hi, Are you getting this code from the Delphi code of SWMM 5?
There is a feature in SWMM 5 that allows you to either save ALL of the junction information or only a portion of the junction information. If you just save two junctions then you can only retrieve the values from two junctions.
This the help file and Pascal code for the SWMM 5 Interfacing Guide
Attachments:
Hi,
Thanks for the replies.

I am using Microsoft Visual C++ 6.0 to get the results (I mean linking SWMM to another software and to call the results) using C++. (I have downloaded the SWMM5.0 interfacing guide from the EPA web site)

Think I should explain more the problem what I have.

Let us assume there are 5 weirs and 2 orifices at one problem and I wanna get the flow rate through the weirs.

Is the following coding in c++ correct?

OpenSwmmOutFile("f3.out");

GetSwmmResults(2, 1, 0, t, A);

GetSwmmResults(2, 2, 0, t, B);

GetSwmmResults(2, 3, 0, t, C);

GetSwmmResults(2, 4, 0, t, D);

GetSwmmResults(2, 5, 0, t, E);

CloseSwmmOutFile();

In this case I am not sure how I can use the "itemIndex" which is the second number. Since both weirs and orifices are under the category of links it is bit confusing.

Thanks alot.
Can you please explain this particular feature on saving portion of the junction information?
Thanks
I found the answer for my own question and would like paste it here if anyone needs it in future.


When results for all links are saved, then the ItemIndex is the order
(starting from 0) in which the Link is first defined in the input file.
For example, suppose your input file looked as follows:

[CONDUITS]
A
B
C

[WEIRS]
W1
W2

]PUMPS]
P1
P2

[ORIFICES]
O-A
O-B

Then the ItemIndex for weir W1 would be 3 while that for orifice O-B is
8.

If in the [REPORT] section you specify that results are only saved for
weir W1 and orifices O-A and O-B, then the item index of W1 is 0 and
that of O-B is 2 (even if you listed them as O-B, W1, and O-A in the
[REPORT] section, since the numbering is still relative to their
position where they are first defined in the input file).

Reply to Discussion

RSS

© 2012   Created by Robert Dickinson.   Powered by .

Badges  |  Report an Issue  |  Terms of Service