I'm using matlab 2018b. I just shift my codes from:
'inp = 'C:/Users/Jiada/Desktop/MatSWMM/MatSWMM/MatSWMM 5.1.009/Matlab module/SWMM Matlab/swmm_files/noGI_Control.INP';
to:
inp = 'C:/Users/Jiada/Desktop/MatSWMM/MatSWMM/MatSWMM 5.1.009/Matlab module/SWMM Matlab/swmm_files/noGI_Control, Chicago_12h_1yr.INP';
Then, I run the codes. It can't work with the error message:
Error using SWMM/open (line 104)
Error: Incorrect file path.
Basically, I just changed the 'noGI_Control.INP' file to 'noGI_Control, Chicago_12h_1yr.INP' file. Both of these two files are in the same folder. The first syntax work but the second one doesn't.
Does anyone know how to fix it? thanks!

댓글 수: 4

Walter Roberson
Walter Roberson 2019년 7월 9일
Does the file name really have a comma inside it?
Jiada Li
Jiada Li 2019년 7월 10일
Yes, it has
Walter Roberson
Walter Roberson 2019년 7월 10일
편집: Walter Roberson 2023년 1월 8일
I suggest trying again with a name that does not have a space in the final component.
Jiada Li
Jiada Li 2019년 7월 10일
I rename this it with 'noGI_Control.INP' but still doesn't work

댓글을 달려면 로그인하십시오.

답변 (1개)

Jiashen Feng
Jiashen Feng 2023년 1월 7일
이동: Walter Roberson 2023년 1월 8일

1 개 추천

Hi!
I met the same question recently, and I guess I know the reason!
If Matswmm output "error:Incorrect file path" accompanied with the output " error: at SWMM/initialize(line 539)/(line 524)"
I think it actually means had error in "Initializationg part", not the path.
When I change my “.inp” file into “.txt” file,and compared it with the MatSWMM case inp file, I found my inp file had one extra line than case ”inp“. It was a parameter at [OPTIONS] part———— "RULE_STEP“. (As showed follows)
And guess what? I delete this line, and change my file ".txt" back to ".inp".
Th error was corrected!The simulation can be operated!
I guess the real reason why this problem happend is we used the new version SWMM to make inp file,but inventor of MatSWMM used old version at the time made this engine (Inventor invented this around 2014-2015) and.dll file. So the MatSWMM might dosen't know what is "RULE-STEP" and caused error in initialization step.
Maybe some researchers who is good at code can correct it from the MatSWMM engine someday.
Maybe it was too late to reply Dr/Mr/Miss.Li. But I wish it may help other person who tried to use MatSWMM in the world.
Afterall, MatSWMM is not that popular until now. Wishing us users can communicate with each other more.XD

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

질문:

2019년 7월 9일

이동:

2023년 1월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by