@@ -87,7 +87,7 @@
Loading
87 87
     """
88 88
    net._options = {}
89 89
    ac = True if "DC" not in pm_model else False
90 -
    julia_file = os.path.join(pp_dir, "opf", 'run_powermodels.jl') if julia_file is None else julia_file
90 +
    julia_file = os.path.join(pp_dir, "opf", "PpPmInterface", "src", "pm_models", 'run_powermodels.jl') if julia_file is None else julia_file
91 91
    _add_ppc_options(net, calculate_voltage_angles=calculate_voltage_angles,
92 92
                     trafo_model=trafo_model, check_connectivity=check_connectivity,
93 93
                     mode="opf", switch_rx_ratio=2, init_vm_pu="flat", init_va_degree="flat",
@@ -153,7 +153,7 @@
Loading
153 153
        
154 154
        **pm_log_level** (int, 0) - solver log level in power models
155 155
     """
156 -
    julia_file = os.path.join(pp_dir, "opf", 'run_powermodels.jl')
156 +
    julia_file = os.path.join(pp_dir, "opf", "PpPmInterface", "src", "pm_models", 'run_powermodels.jl')
157 157
    ac = True if "DC" not in pm_model else False
158 158
159 159
    net._options = {}
@@ -235,7 +235,7 @@
Loading
235 235
                                       you want to keep the file after optimization, you should also set
236 236
                                       delete_buffer_file to False!
237 237
         """
238 -
    julia_file = os.path.join(pp_dir, "opf", 'run_powermodels.jl')
238 +
    julia_file = os.path.join(pp_dir, "opf", "PpPmInterface", "src", "pm_models", 'run_powermodels.jl')
239 239
    ac = True if "DC" not in pm_model else False
240 240
241 241
    net._options = {}
@@ -279,7 +279,7 @@
Loading
279 279
280 280
        **pm_log_level** (int, 0) - solver log level in power models
281 281
     """
282 -
    julia_file = os.path.join(pp_dir, "opf", 'run_powermodels_tnep.jl')
282 +
    julia_file = os.path.join(pp_dir, "opf", "PpPmInterface", "src", "pm_models", 'run_powermodels_tnep.jl')
283 283
    ac = True if "DC" not in pm_model else False
284 284
    if pm_solver is None:
285 285
        if pm_model == "DCPPowerModel":
@@ -333,7 +333,7 @@
Loading
333 333
334 334
335 335
     """
336 -
    julia_file = os.path.join(pp_dir, "opf", 'run_powermodels_ots.jl')
336 +
    julia_file = os.path.join(pp_dir, "opf", "PpPmInterface", "src", "pm_models", 'run_powermodels_ots.jl')
337 337
    ac = True if "DC" not in pm_model else False
338 338
    if pm_solver is None:
339 339
        pm_solver = "juniper"
@@ -374,7 +374,7 @@
Loading
374 374
375 375
        **pm_log_level** (int, 0) - solver log level in power models
376 376
     """
377 -
    julia_file = os.path.join(pp_dir, "opf", 'run_powermodels_mn_storage.jl')
377 +
    julia_file = os.path.join(pp_dir, "opf", "PpPmInterface", "src", "pm_models", 'run_powermodels_mn_storage.jl')
378 378
    ac = True if "DC" not in pm_model else False
379 379
    net._options = {}
380 380
    _add_ppc_options(net, calculate_voltage_angles=calculate_voltage_angles,

@@ -46,6 +46,7 @@
Loading
46 46
    try:
47 47
        import julia
48 48
        from julia import Main
49 +
        from julia import Pkg
49 50
    except ImportError:
50 51
        raise ImportError("Please install pyjulia to run pandapower with PowerModels.jl")
51 52
    try:
@@ -55,10 +56,14 @@
Loading
55 56
            "Could not connect to julia, please check that Julia is installed and pyjulia is correctly configured")
56 57
57 58
    # import two julia scripts and runs powermodels julia_file
58 -
    Main.include(os.path.join(pp_dir, "opf", 'pp_2_pm.jl'))
59 -
    try:
60 -
        run_powermodels = Main.include(julia_file)
61 -
    except ImportError:
59 +
    Pkg.activate(os.path.join(pp_dir, "opf", "PpPmInterface"))
60 +
    # Main.include(os.path.join(pp_dir, "opf", "PpPmInterface", "src", "PpPmInterface.jl"))
61 +
    # Main.using(".PpPmInterface")
62 +
    Main.using("PpPmInterface")
63 +
    #     
64 +
    if not os.path.isfile(julia_file):
62 65
        raise UserWarning("File %s could not be imported" % julia_file)
63 -
    result_pm = run_powermodels(buffer_file)
66 +
    Main.buffer_file = buffer_file
67 +
    exec_fun = julia_file.split("/")[-1].split(".")[0]
68 +
    result_pm = Main.eval(exec_fun+"(buffer_file)")
64 69
    return result_pm
Files Coverage
pandapower 87.71%
setup.py 0.00%
Project Totals (162 files) 87.63%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading