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 ExchangeStartup 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