bradleyjeck / epanetreader Goto Github PK
View Code? Open in Web Editor NEWRead text files in Epanet's .inp and .rpt formats into R
License: Other
Read text files in Epanet's .inp and .rpt formats into R
License: Other
Is it possible for the plots to include the labels that are visible in the EPANET plots of the .inp files?
Thank you.
Following up on this discussion thread: http://community.wateranalytics.org/t/epanetreader-r-package-error/250
It seems the simulation report created in the windows gui using Report > Full is not read by epanetReader as it contains page breaks. These breaks appear regardless of the contents of the .inp file.
Look at updating the rpt parser to handle this case.
Is it possible to color code my node value by adding a color attribute in plot?
plot(x, inp, Timestep = "24:00:00", juncQty = "AGE",
linkQty = "Flow", legend1.locn = "topright",
legend2.locn = "topleft")
Kmisc no longer available on cran
So far the package reads text files in EPANET's .inp and .rpt formats. EPANET can also create a binary file of simulation results. Would parsing this be useful?
Dear Bradley,
We are trying to genete different ".inp" files authomaticaly. But we realize that, when we run them in Epanet collapse before finishing. We have been finding out why and we realize that "write.inp" function writes in [OPTIONS] "Unbalanced STOP" by default. And we would like to choose the other option: "Unbalanced Continue10". Is this possible in someway?
We are generating 100 individuals (inps) and it is a tedious work if we should do it one by one.
Thank you in advance,
Need to add ability to read results of epanet-msx simulations. Should this be a new function such as read.msx.rpt() or an addition to the existing read.rpt() function? Is it possible for for a report file generated by epanet-msx to contain the report specified in the [REPORT] section of an .inp file?
If there are in the same INP-file nodes like 0001 and 1, depending on the topology of the network could happen that the read.inp function loads pipe$Node1 as character and pipe$Node2 as integer and vice-versa. This issue creates problems using functions like plot or expandedLinkTable, because the merge generates pipes without coordinates (NA value).
I think a solution could be that read.inp reads always the data as characters. I think force it would be a good solution.
Attached an example of a case where the problem appears.
plot(Net1, plot.labels=TRUE) should work, but doesn't
Hi everyone, recently, we have started a project about calibration of water distribution networks and location of leakages, and we want to make the first optimization problem approach in R. Looking for more information, we found out epanetReader packages. First of all, we are trying to read INP file with this package, but we are having troubles to get it. R prints next error:
"location of Error in if (size_MB > 100) { : missing value where TRUE/FALSE needed"
My INP file is smaller than 100 MB (1526 kB). Have anyone had the same error? Would you help me solving this error?
Thank you in advance.
Several people have mentioned that the ability to call an epanet simulation from within R would be handy. I think this should be do-able with a single function provided Epanet is installed on the system.
Calling read.inp()
on an inp file that does not have [END] at the end fails with the rather cryptic error:
Error in rg[1]:rg[2] : NA/NaN argument
The error arises from an internal function of the package that extracts individual sections of the inp file. That function expects an [END] at the end of the file as in the common examples.
Thanks to Nina for the bug report.
When trying to follow the example in the read.inp()
help I get this:
inp <- file.path( find.package("epanetReader"), "extdata","Net1.inp")
n1 <- read.inp(inp)
> Error in if (sep != ".") "." else "," : argument is of length zero
Perhaps this is related to setting the argument sep = NULL
in read_lines_wrapper()
?
look at reading files faster like this
https://gist.github.com/hadley/6353939
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.