Opening file "matpower/case30.m": No such file or directory

‘’’
##code
using PowerModels
using Ipopt

result=run_ac_opf(“matpower/case30.m”, with_optimizer(Ipopt.Optimizer))
‘’’
errors:


question:How could I add all files about “matpower/caseXX.m”?The document has said the format is similar to matpower’s data,but I don’t know how to add it ?

Check the working directory of your Julia process with pwd(). If it’s not the directory containing matpower/, you’ll need to either use joinpath("path/to/matpower", "case30.m")for full filename paths, or cd("path/to/matpower") to change the working directory.

‘’’
using PowerModels
using Ipopt
joinpath(“path/to/matpower”, “case30.m”)
result=run_ac_opf(“matpower/case30.m”, with_optimizer(Ipopt.Optimizer))
‘’’
Is this code ? But repl show the same erro.:
ERROR: SystemError: opening file “matpower/case30.m”: No such file or directory

If I do next one.

julia> cd(“path/to/matpower”)
ERROR: IOError: chdir path/to/matpower: no such file or directory (ENOENT)

Could you tell me how to solve it in detail?

In the example you have it should be, something like,

file_path = joinpath(“path/to/matpower”, “case30.m”)
result = run_ac_opf(file_path, Ipopt.Optimizer)

First,thank you very much for the platform of PowerModels,

I have encountered the same problem,If I write
"
file_path = joinpath(“path/to/matpower”, “case30.m”)
result = run_ac_opf(file_path, Ipopt.Optimizer)
"
It seems to be
"
julia> file_path = joinpath(“path/to/matpower”, “case30.m”)
“path/to/matpower\case30.m”
julia> result = run_ac_opf(file_path, Ipopt.Optimizer)
ERROR: SystemError: opening file “path/to/matpower\case30.m”: No such file or directory
"
I tried to change this ,and write this instead
"
file_path=joinpath(“D:\Matlab2019_64bit\bin\matpower7.0”,“case39.m”)
result = run_ac_opf(file_path, Ipopt.Optimizer)
"
But it tell me
"
julia> file_path=joinpath(“D:\Matlab2019_64bit\bin\matpower7.0”,“case39.m”)
ERROR: syntax: invalid escape sequence
"
How can I do it to use PowerModels?

I have solved it. If someone has the same problem.Please find this,
https://docs.julialang.org/en/v1/base/file/