Open laltuashu opened 5 years ago
Yep, most probably because your inp file contains a section which is currently/accidentally not implemented in {swmmr}. Can you share your model file?
A vector with allowed sections can be obtained via swmmr:::input_sections
.
# read lines
inp_lines <- readr::read_lines("https://github.com/dleutnant/swmmr/files/3168584/swmm3_2.txt")
# delete leading whitespaces in strings
inp_lines <- gsub("^\\s+", "", inp_lines)
# find section start
section_start <- grep("\\[", inp_lines, value = F)
# get section names
section_names <- gsub(pattern = "\\[|\\]",
replacement = "",
x = inp_lines[section_start])
# which section is not parsed?
section_names[!tolower(section_names) %in% swmmr:::input_sections]
#> [1] "TRANSECTS"
Created on 2019-05-11 by the reprex package (v0.2.1)
So section "TRANSECTS" it is.
Thank you sir for your prompt reply and suggestion on the query.
So, if "transects" is not allowed in swmmr, then how do I use natural sections in the model (swmm3_2) ?
Hello all, I have tried to give approximate cross section data to "xsections" , and the previous error while reading inp file is over now. But while calibrating using the parallel processing feature in "DEoptim" package, I am getting error as "Error in checkForRemoteErrors(val) : 4 nodes produced errors; first error: cannot coerce class 'c("xts", "zoo")' to a data.frame". Could anybody suggest some solutions on this issue ? Regards. Ashu
Hello all, Previously as I have mentioned when I run the model using parallel mode in DEoptim, the error is as given in the previous reply, but when I run the model without parallel mode in DEoptim, I got the errors like
Error in [.xts
(x, , 2) : subscript out of bounds
In addition: Warning messages:
1: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:/Users/ratnakar/AppData/Local/Temp/RtmpkNMgOy/fileca41c942dd9.out": The system cannot find the file specified
2: In read_out(file = swmm_files$out, iType = 1, object_name = "621", :
error reading out file
Any suggestions in this regard will be highly appreciated. Regards, Ashu
@laltuashu Please make sure your model is running correctly. Again, without seeing the code, people cannot reproduce the error and can only make guess. Apropos, I reckon your model does not run properly and therefore no .out file is generated. Did you check the .rpt file for potential errors?
@laltuashu Could you please post different issues as new issues as this one here has a specific topic and shouldn‘t cover general optimization issues. Thank you!
Ok @dleutnant sir. I will add this query to a new issue.
Regards Ashu
If swmmr does not support transects, how is it currently handling conduits with "irregular" geometry?
Can anybody suggest me why "parse_section.default(x) : Unknown class: data.frame" warning is occuring?