diff --git a/Project.toml b/Project.toml index 71660e7..33eda8b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PandaModels" uuid = "2dbab86a-7cbf-476f-9afe-75ffd3079e7c" authors = ["e2nIEE"] -version = "0.6.0" +version = "0.7.0" [deps] Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76" @@ -12,6 +12,7 @@ JuMP = "4076af6c-e467-56ae-b986-b466b2749572" Juniper = "2ddba703-00a4-53a7-87a5-e8b9971dde84" Memento = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9" PowerModels = "c36e90e8-916a-50a6-bd94-075b64ef4655" +#Gurobi = "2e9cd046-0924-5485-92f1-d5272153d98b" [compat] Cbc = "0.8, 0.9" diff --git a/docs/src/develop.md b/docs/src/develop.md index b061f43..6efa950 100644 --- a/docs/src/develop.md +++ b/docs/src/develop.md @@ -116,7 +116,7 @@ Pkg.add([ Pkg.PackageSpec(;name="JSON"), Pkg.PackageSpec(;name="Ipopt"), Pkg.PackageSpec(;name="Juniper"), - Pkg.PackageSpec(;name="Cbc"), + Pkg.PackageSpec(;name="Cbc") ]) Pkg.build() Pkg.resolve() diff --git a/src/PandaModels.jl b/src/PandaModels.jl index f7ee8c4..b19f398 100644 --- a/src/PandaModels.jl +++ b/src/PandaModels.jl @@ -8,6 +8,13 @@ import JSON import Cbc import Ipopt import Juniper +try + import Gurobi +catch e + if isa(e, LoadError) + println("Cannot import Gurobi. That's fine if you do not plan to use it") + end +end const _IM = InfrastructureModels const _PM = PowerModels const _PdM = PandaModels diff --git a/src/input/tools.jl b/src/input/tools.jl index 7ca9cba..6f87783 100644 --- a/src/input/tools.jl +++ b/src/input/tools.jl @@ -54,7 +54,6 @@ function set_pq_values_from_timeseries(pm) # This function iterates over multinetwork entries and sets p, q values # of loads and "sgens" (which are loads with negative P and Q values) steps = pm["time_series"]["to_time_step"]-pm["time_series"]["from_time_step"] - baseMVA = pm["baseMVA"] mn = _PM.replicate(pm, steps) for (step, network) in mn["nw"] @@ -63,9 +62,9 @@ function set_pq_values_from_timeseries(pm) network = delete!(network, "user_defined_params") for (idx, load) in network["load"] if haskey(load_ts, idx) - load["pd"] = load_ts[idx]["p_mw"][step_1] / baseMVA + load["pd"] = load_ts[idx]["p_mw"][step_1] if haskey(load_ts[idx], "q_mvar") - load["qd"] = load_ts[idx]["q_mvar"][step_1] / baseMVA + load["qd"] = load_ts[idx]["q_mvar"][step_1] end end end @@ -73,16 +72,16 @@ function set_pq_values_from_timeseries(pm) gen_ts = pm["time_series"]["gen"] for (idx, gen) in network["gen"] if haskey(gen_ts, idx) - gen["pg"] = gen_ts[idx]["p_mw"][step_1] / baseMVA + gen["pg"] = gen_ts[idx]["p_mw"][step_1] if haskey(gen_ts[idx], "max_p_mw") - gen["pmax"] = gen_ts[idx]["max_p_mw"][step_1] / baseMVA + gen["pmax"] = gen_ts[idx]["max_p_mw"][step_1] else - gen["pmax"] = gen_ts[idx]["p_mw"][step_1] / baseMVA + gen["pmax"] = gen_ts[idx]["p_mw"][step_1] end if haskey(gen_ts[idx], "min_p_mw") - gen["pmin"] = gen_ts[idx]["min_p_mw"][step_1] / baseMVA + gen["pmin"] = gen_ts[idx]["min_p_mw"][step_1] else - gen["pmin"] = gen_ts[idx]["p_mw"][step_1] / baseMVA + gen["pmin"] = gen_ts[idx]["p_mw"][step_1] end if haskey(gen_ts[idx], "max_q_mvar") diff --git a/src/models/qflex.jl b/src/models/qflex.jl index 07735b3..c8bcd92 100644 --- a/src/models/qflex.jl +++ b/src/models/qflex.jl @@ -46,9 +46,21 @@ end function objective_qflex(pm::_PM.AbstractPowerModel) + if haskey(pm.ext, :obj_factors) + if length(pm.ext[:obj_factors]) == 2 + fac1 = pm.ext[:obj_factors]["fac_1"] + fac2 = pm.ext[:obj_factors]["fac_2"] + end + else + fac1 = 1.0 + fac2 = 0 + end + return JuMP.@objective(pm.model, Min, - sum((var(pm, :q, (content["element_index"], content["f_bus"], content["t_bus"])) - content["value"])^2 - for (i, content) in pm.ext[:setpoint_q])) + fac1 * sum((var(pm, :q, (content["element_index"], content["f_bus"], content["t_bus"])) - content["value"])^2 + for (i, content) in pm.ext[:setpoint_q]) + + + fac2 * sum((var(pm, :qg, content)-0)^2 for (i, content) in pm.ext[:gen_and_controllable_sgen])) end diff --git a/src/models/vstab.jl b/src/models/vstab.jl index 8cd3f26..b61cc43 100644 --- a/src/models/vstab.jl +++ b/src/models/vstab.jl @@ -49,8 +49,21 @@ function _build_vstab(pm::_PM.AbstractPowerModel) end function objective_vstab(pm::_PM.AbstractPowerModel) + + if haskey(pm.ext, :obj_factors) + if length(pm.ext[:obj_factors]) == 2 + fac1 = pm.ext[:obj_factors]["fac_1"] + fac2 = pm.ext[:obj_factors]["fac_2"] + end + else + fac1 = 1.0 + fac2 = 1-fac1 + end + return JuMP.@objective(pm.model, Min, - sum((var(pm, :vm, content["element_index"]) - content["value"])^2 for (i, content) in pm.ext[:setpoint_v])) + fac1 * sum((var(pm, :vm, content["element_index"]) - content["value"])^2 for (i, content) in pm.ext[:setpoint_v]) + + + fac2 * sum((var(pm, :qg, content)-0)^2 for (i, content) in pm.ext[:gen_and_controllable_sgen])) end diff --git a/test/data/test_mn_storage_fs.json b/test/data/test_mn_storage_fs.json deleted file mode 100644 index 2a8e815..0000000 --- a/test/data/test_mn_storage_fs.json +++ /dev/null @@ -1,771 +0,0 @@ -{ - "ac": true, - "baseMVA": 1, - "branch": { - "1": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.026786049475940484, - "b_to": 0.026786049475940484, - "br_r": 0.00353205, - "br_status": 1, - "br_x": 0.005047799999999999, - "f_bus": 2, - "g_fr": -0.0, - "g_to": -0.0, - "index": 1, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 3, - "tap": 1.0, - "transformer": false - }, - "10": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.012348178836426464, - "b_to": 0.012348178836426464, - "br_r": 0.00162825, - "br_status": 1, - "br_x": 0.002327, - "f_bus": 4, - "g_fr": -0.0, - "g_to": -0.0, - "index": 10, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 9, - "tap": 1.0, - "transformer": false - }, - "11": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.003102216126048443, - "b_to": 0.003102216126048443, - "br_r": 0.00623475, - "br_status": 1, - "br_x": 0.004474349999999999, - "f_bus": 13, - "g_fr": -0.0, - "g_to": -0.0, - "index": 11, - "rate_a": 6.754998149518621, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 14, - "tap": 1.0, - "transformer": false - }, - "12": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0018968560770725657, - "b_to": 0.0018968560770725657, - "br_r": 0.0038122500000000005, - "br_status": 1, - "br_x": 0.00273585, - "f_bus": 14, - "g_fr": -0.0, - "g_to": -0.0, - "index": 12, - "rate_a": 6.754998149518621, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 15, - "tap": 1.0, - "transformer": false - }, - "13": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.002279663785186424, - "b_to": 0.002279663785186424, - "br_r": 0.0003006, - "br_status": 1, - "br_x": 0.0004296, - "f_bus": 7, - "g_fr": -0.0, - "g_to": -0.0, - "index": 13, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 8, - "tap": 1.0, - "transformer": false - }, - "14": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.004654313561422283, - "b_to": 0.004654313561422283, - "br_r": 0.000613725, - "br_status": 1, - "br_x": 0.0008771, - "f_bus": 12, - "g_fr": -0.0, - "g_to": -0.0, - "index": 14, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 5, - "tap": 1.0, - "transformer": false - }, - "15": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0012688000515535555, - "b_to": 0.0012688000515535555, - "br_r": 0.00255, - "br_status": 1, - "br_x": 0.00183, - "f_bus": 15, - "g_fr": -0.0, - "g_to": -0.0, - "index": 15, - "rate_a": 6.754998149518621, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 9, - "tap": 1.0, - "transformer": false - }, - "16": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0, - "b_to": 0.0, - "br_r": 6.4e-05, - "br_status": 1, - "br_x": 0.004800001352414809, - "f_bus": 1, - "g_fr": -0.0, - "g_to": -0.0, - "index": 16, - "rate_a": 250.0, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.5235987755982988, - "t_bus": 2, - "tap": 1.0, - "transformer": true - }, - "17": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0, - "b_to": 0.0, - "br_r": 6.4e-05, - "br_status": 1, - "br_x": 0.004800001352414809, - "f_bus": 1, - "g_fr": -0.0, - "g_to": -0.0, - "index": 17, - "rate_a": 250.0, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.5235987755982988, - "t_bus": 13, - "tap": 1.0, - "transformer": true - }, - "2": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.04198380804384998, - "b_to": 0.04198380804384998, - "br_r": 0.00553605, - "br_status": 1, - "br_x": 0.0079118, - "f_bus": 3, - "g_fr": -0.0, - "g_to": -0.0, - "index": 2, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 4, - "tap": 1.0, - "transformer": false - }, - "3": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.005794145454015495, - "b_to": 0.005794145454015495, - "br_r": 0.000764025, - "br_status": 1, - "br_x": 0.0010919, - "f_bus": 4, - "g_fr": -0.0, - "g_to": -0.0, - "index": 3, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 5, - "tap": 1.0, - "transformer": false - }, - "4": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.005319215498768324, - "b_to": 0.005319215498768324, - "br_r": 0.0007014, - "br_status": 1, - "br_x": 0.0010024, - "f_bus": 5, - "g_fr": -0.0, - "g_to": -0.0, - "index": 4, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 6, - "tap": 1.0, - "transformer": false - }, - "5": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.014627842621612888, - "b_to": 0.014627842621612888, - "br_r": 0.00192885, - "br_status": 1, - "br_x": 0.0027566, - "f_bus": 6, - "g_fr": -0.0, - "g_to": -0.0, - "index": 5, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 7, - "tap": 1.0, - "transformer": false - }, - "6": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.015862660505255536, - "b_to": 0.015862660505255536, - "br_r": 0.002091675, - "br_status": 1, - "br_x": 0.0029893, - "f_bus": 8, - "g_fr": -0.0, - "g_to": -0.0, - "index": 6, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 9, - "tap": 1.0, - "transformer": false - }, - "7": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.003039551713581899, - "b_to": 0.003039551713581899, - "br_r": 0.0004008, - "br_status": 1, - "br_x": 0.0005727999999999999, - "f_bus": 9, - "g_fr": -0.0, - "g_to": -0.0, - "index": 7, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 10, - "tap": 1.0, - "transformer": false - }, - "8": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.007313921310806444, - "b_to": 0.007313921310806444, - "br_r": 0.000964425, - "br_status": 1, - "br_x": 0.0013783, - "f_bus": 10, - "g_fr": -0.0, - "g_to": -0.0, - "index": 8, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 11, - "tap": 1.0, - "transformer": false - }, - "9": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0031345377046313335, - "b_to": 0.0031345377046313335, - "br_r": 0.00041332500000000003, - "br_status": 1, - "br_x": 0.0005907, - "f_bus": 11, - "g_fr": -0.0, - "g_to": -0.0, - "index": 9, - "rate_a": 5.0229473419497435, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 12, - "tap": 1.0, - "transformer": false - } - }, - "bus": { - "1": { - "base_kv": 110.0, - "bus_i": 1, - "bus_type": 3, - "index": 1, - "va": 0.0, - "vm": 1.03, - "vmax": 1.03000001, - "vmin": 1.02999999, - "zone": 1 - }, - "10": { - "base_kv": 20.0, - "bus_i": 10, - "bus_type": 1, - "index": 10, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "11": { - "base_kv": 20.0, - "bus_i": 11, - "bus_type": 1, - "index": 11, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "12": { - "base_kv": 20.0, - "bus_i": 12, - "bus_type": 1, - "index": 12, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "13": { - "base_kv": 20.0, - "bus_i": 13, - "bus_type": 1, - "index": 13, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "14": { - "base_kv": 20.0, - "bus_i": 14, - "bus_type": 1, - "index": 14, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "15": { - "base_kv": 20.0, - "bus_i": 15, - "bus_type": 1, - "index": 15, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "2": { - "base_kv": 20.0, - "bus_i": 2, - "bus_type": 1, - "index": 2, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "3": { - "base_kv": 20.0, - "bus_i": 3, - "bus_type": 1, - "index": 3, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "4": { - "base_kv": 20.0, - "bus_i": 4, - "bus_type": 1, - "index": 4, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "5": { - "base_kv": 20.0, - "bus_i": 5, - "bus_type": 1, - "index": 5, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "6": { - "base_kv": 20.0, - "bus_i": 6, - "bus_type": 1, - "index": 6, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "7": { - "base_kv": 20.0, - "bus_i": 7, - "bus_type": 1, - "index": 7, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "8": { - "base_kv": 20.0, - "bus_i": 8, - "bus_type": 1, - "index": 8, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - }, - "9": { - "base_kv": 20.0, - "bus_i": 9, - "bus_type": 1, - "index": 9, - "va": 0.0, - "vm": 1.0, - "vmax": 1.05, - "vmin": 0.95, - "zone": 1 - } - }, - "correct_pm_network_data": true, - "dcline": {}, - "gen": { - "1": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 1, - "gen_status": 1, - "index": 1, - "model": 2, - "ncost": 3, - "pg": 0.0, - "pmax": 1000000000.0, - "pmin": -1000000000.0, - "qg": 0.0, - "qmax": 1000000000.0, - "qmin": -1000000000.0, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.03 - } - }, - "load": { - "1": { - "index": 1, - "load_bus": 2, - "pd": 14.994, - "qd": 3.0446615575462643, - "status": 1 - }, - "10": { - "index": 10, - "load_bus": 15, - "pd": 0.20854999999999999, - "qd": 0.052267556858915876, - "status": 1 - }, - "11": { - "index": 11, - "load_bus": 2, - "pd": 4.845, - "qd": 1.5924744895915917, - "status": 1 - }, - "12": { - "index": 12, - "load_bus": 4, - "pd": 0.22525, - "qd": 0.13959741222529884, - "status": 1 - }, - "13": { - "index": 13, - "load_bus": 8, - "pd": 0.0765, - "qd": 0.04741044188783732, - "status": 1 - }, - "14": { - "index": 14, - "load_bus": 10, - "pd": 0.57375, - "qd": 0.35557831415878005, - "status": 1 - }, - "15": { - "index": 15, - "load_bus": 11, - "pd": 0.068, - "qd": 0.04214261501141095, - "status": 1 - }, - "16": { - "index": 16, - "load_bus": 13, - "pd": 5.016, - "qd": 1.6486794715771778, - "status": 1 - }, - "17": { - "index": 17, - "load_bus": 14, - "pd": 0.034, - "qd": 0.021071307505705475, - "status": 1 - }, - "18": { - "index": 18, - "load_bus": 15, - "pd": 0.3315, - "qd": 0.20544524818062843, - "status": 1 - }, - "19": { - "index": 19, - "load_bus": 4, - "pd": -0.02, - "qd": -0.0, - "status": 1 - }, - "2": { - "index": 2, - "load_bus": 4, - "pd": 0.27645, - "qd": 0.06928490095251642, - "status": 1 - }, - "20": { - "index": 20, - "load_bus": 5, - "pd": -0.02, - "qd": -0.0, - "status": 1 - }, - "21": { - "index": 21, - "load_bus": 6, - "pd": -0.03, - "qd": -0.0, - "status": 1 - }, - "22": { - "index": 22, - "load_bus": 7, - "pd": -0.03, - "qd": -0.0, - "status": 1 - }, - "23": { - "index": 23, - "load_bus": 9, - "pd": -0.03, - "qd": -0.0, - "status": 1 - }, - "24": { - "index": 24, - "load_bus": 10, - "pd": -0.03, - "qd": -0.0, - "status": 1 - }, - "25": { - "index": 25, - "load_bus": 11, - "pd": -0.04, - "qd": -0.0, - "status": 1 - }, - "26": { - "index": 26, - "load_bus": 12, - "pd": -0.01, - "qd": -0.0, - "status": 1 - }, - "27": { - "index": 27, - "load_bus": 8, - "pd": -1.5, - "qd": -0.0, - "status": 1 - }, - "3": { - "index": 3, - "load_bus": 5, - "pd": 0.43165, - "qd": 0.10818168745217475, - "status": 1 - }, - "4": { - "index": 4, - "load_bus": 6, - "pd": 0.7275, - "qd": 0.182328686717148, - "status": 1 - }, - "5": { - "index": 5, - "load_bus": 7, - "pd": 0.5480499999999999, - "qd": 0.1373542773269184, - "status": 1 - }, - "6": { - "index": 6, - "load_bus": 9, - "pd": 0.58685, - "qd": 0.147078473951833, - "status": 1 - }, - "7": { - "index": 7, - "load_bus": 11, - "pd": 0.4753, - "qd": 0.11912140865520342, - "status": 1 - }, - "8": { - "index": 8, - "load_bus": 12, - "pd": 0.32980000000000004, - "qd": 0.08265567131177387, - "status": 1 - }, - "9": { - "index": 9, - "load_bus": 13, - "pd": 14.994, - "qd": 3.0446615575462643, - "status": 1 - } - }, - "n_time_steps": 24, - "name": "", - "ne_branch": {}, - "per_unit": true, - "pm_log_level": 0, - "pm_mip_solver": "cbc", - "pm_mip_time_limit": Infinity, - "pm_model": "ACPPowerModel", - "pm_nl_solver": "ipopt", - "pm_nl_time_limit": Infinity, - "pm_solver": "juniper", - "pm_time_limit": Infinity, - "pm_tol": 0.0001, - "shunt": {}, - "silence": true, - "source_version": "2.0.0", - "sourcetype": "matpower", - "storage": { - "1": { - "charge_efficiency": 1.0, - "charge_rating": 0.5, - "discharge_efficiency": 1.0, - "discharge_rating": 0.5, - "energy": 0.0, - "energy_rating": 0.2, - "index": 1, - "p_loss": -1e-08, - "ps": 0.5, - "q_loss": -1e-08, - "qmax": 0.0, - "qmin": -0.001, - "qs": 0.0, - "r": 0.0, - "standby_loss": 0.0, - "status": 1, - "storage_bus": 11, - "thermal_rating": 0.2, - "x": 0.0 - } - }, - "switch": {}, - "time_elapsed": 1.0 -} \ No newline at end of file diff --git a/test/data/test_qflex.json b/test/data/test_qflex.json index b2adab3..63b5274 100644 --- a/test/data/test_qflex.json +++ b/test/data/test_qflex.json @@ -1,925 +1 @@ -{ - "baseMVA": 1, - "branch": { - "1": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.026786049475940484, - "b_to": 0.026786049475940484, - "br_r": 0.00353205, - "br_status": 1, - "br_x": 0.005047799999999999, - "f_bus": 2, - "g_fr": -0.0, - "g_to": -0.0, - "index": 1, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 3, - "tap": 1.0, - "transformer": false - }, - "10": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.012348178836426464, - "b_to": 0.012348178836426464, - "br_r": 0.00162825, - "br_status": 1, - "br_x": 0.002327, - "f_bus": 4, - "g_fr": -0.0, - "g_to": -0.0, - "index": 10, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 9, - "tap": 1.0, - "transformer": false - }, - "11": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.003102216126048443, - "b_to": 0.003102216126048443, - "br_r": 0.00623475, - "br_status": 1, - "br_x": 0.004474349999999999, - "f_bus": 13, - "g_fr": -0.0, - "g_to": -0.0, - "index": 11, - "rate_a": 20.26499444855586, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 14, - "tap": 1.0, - "transformer": false - }, - "12": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0018968560770725657, - "b_to": 0.0018968560770725657, - "br_r": 0.0038122500000000005, - "br_status": 1, - "br_x": 0.00273585, - "f_bus": 14, - "g_fr": -0.0, - "g_to": -0.0, - "index": 12, - "rate_a": 20.26499444855586, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 15, - "tap": 1.0, - "transformer": false - }, - "13": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.002279663785186424, - "b_to": 0.002279663785186424, - "br_r": 0.0003006, - "br_status": 1, - "br_x": 0.0004296, - "f_bus": 7, - "g_fr": -0.0, - "g_to": -0.0, - "index": 13, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 16, - "tap": 1.0, - "transformer": false - }, - "14": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.004654313561422283, - "b_to": 0.004654313561422283, - "br_r": 0.000613725, - "br_status": 1, - "br_x": 0.0008771, - "f_bus": 12, - "g_fr": -0.0, - "g_to": -0.0, - "index": 14, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 17, - "tap": 1.0, - "transformer": false - }, - "15": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0012688000515535555, - "b_to": 0.0012688000515535555, - "br_r": 0.00255, - "br_status": 1, - "br_x": 0.00183, - "f_bus": 15, - "g_fr": -0.0, - "g_to": -0.0, - "index": 15, - "rate_a": 20.26499444855586, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 18, - "tap": 1.0, - "transformer": false - }, - "16": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0, - "b_to": 0.0, - "br_r": 6.4e-05, - "br_status": 1, - "br_x": 0.004800001352414809, - "f_bus": 1, - "g_fr": -0.0, - "g_to": -0.0, - "index": 16, - "rate_a": 75.0, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.5235987755982988, - "t_bus": 2, - "tap": 1.0, - "transformer": true - }, - "17": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0, - "b_to": 0.0, - "br_r": 6.4e-05, - "br_status": 1, - "br_x": 0.004800001352414809, - "f_bus": 1, - "g_fr": -0.0, - "g_to": -0.0, - "index": 17, - "rate_a": 75.0, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.5235987755982988, - "t_bus": 13, - "tap": 1.0, - "transformer": true - }, - "2": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.04198380804384998, - "b_to": 0.04198380804384998, - "br_r": 0.00553605, - "br_status": 1, - "br_x": 0.0079118, - "f_bus": 3, - "g_fr": -0.0, - "g_to": -0.0, - "index": 2, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 4, - "tap": 1.0, - "transformer": false - }, - "3": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.005794145454015495, - "b_to": 0.005794145454015495, - "br_r": 0.000764025, - "br_status": 1, - "br_x": 0.0010919, - "f_bus": 4, - "g_fr": -0.0, - "g_to": -0.0, - "index": 3, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 5, - "tap": 1.0, - "transformer": false - }, - "4": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.005319215498768324, - "b_to": 0.005319215498768324, - "br_r": 0.0007014, - "br_status": 1, - "br_x": 0.0010024, - "f_bus": 5, - "g_fr": -0.0, - "g_to": -0.0, - "index": 4, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 6, - "tap": 1.0, - "transformer": false - }, - "5": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.014627842621612888, - "b_to": 0.014627842621612888, - "br_r": 0.00192885, - "br_status": 1, - "br_x": 0.0027566, - "f_bus": 6, - "g_fr": -0.0, - "g_to": -0.0, - "index": 5, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 7, - "tap": 1.0, - "transformer": false - }, - "6": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.015862660505255536, - "b_to": 0.015862660505255536, - "br_r": 0.002091675, - "br_status": 1, - "br_x": 0.0029893, - "f_bus": 8, - "g_fr": -0.0, - "g_to": -0.0, - "index": 6, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 9, - "tap": 1.0, - "transformer": false - }, - "7": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.003039551713581899, - "b_to": 0.003039551713581899, - "br_r": 0.0004008, - "br_status": 1, - "br_x": 0.0005727999999999999, - "f_bus": 9, - "g_fr": -0.0, - "g_to": -0.0, - "index": 7, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 10, - "tap": 1.0, - "transformer": false - }, - "8": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.007313921310806444, - "b_to": 0.007313921310806444, - "br_r": 0.000964425, - "br_status": 1, - "br_x": 0.0013783, - "f_bus": 10, - "g_fr": -0.0, - "g_to": -0.0, - "index": 8, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 11, - "tap": 1.0, - "transformer": false - }, - "9": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0031345377046313335, - "b_to": 0.0031345377046313335, - "br_r": 0.00041332500000000003, - "br_status": 1, - "br_x": 0.0005907, - "f_bus": 11, - "g_fr": -0.0, - "g_to": -0.0, - "index": 9, - "rate_a": 15.068842025849229, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 12, - "tap": 1.0, - "transformer": false - } - }, - "bus": { - "1": { - "base_kv": 110.0, - "bus_i": 1, - "bus_type": 3, - "index": 1, - "va": 0.0, - "vm": 1.03, - "vmax": 1.03000001, - "vmin": 1.02999999, - "zone": 1 - }, - "10": { - "base_kv": 20.0, - "bus_i": 10, - "bus_type": 1, - "index": 10, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "11": { - "base_kv": 20.0, - "bus_i": 11, - "bus_type": 1, - "index": 11, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "12": { - "base_kv": 20.0, - "bus_i": 12, - "bus_type": 1, - "index": 12, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "13": { - "base_kv": 20.0, - "bus_i": 13, - "bus_type": 1, - "index": 13, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "14": { - "base_kv": 20.0, - "bus_i": 14, - "bus_type": 1, - "index": 14, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "15": { - "base_kv": 20.0, - "bus_i": 15, - "bus_type": 1, - "index": 15, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "16": { - "base_kv": 20.0, - "bus_i": 16, - "bus_type": 1, - "index": 16, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "17": { - "base_kv": 20.0, - "bus_i": 17, - "bus_type": 1, - "index": 17, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "18": { - "base_kv": 20.0, - "bus_i": 18, - "bus_type": 1, - "index": 18, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "2": { - "base_kv": 20.0, - "bus_i": 2, - "bus_type": 1, - "index": 2, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "3": { - "base_kv": 20.0, - "bus_i": 3, - "bus_type": 1, - "index": 3, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "4": { - "base_kv": 20.0, - "bus_i": 4, - "bus_type": 1, - "index": 4, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "5": { - "base_kv": 20.0, - "bus_i": 5, - "bus_type": 1, - "index": 5, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "6": { - "base_kv": 20.0, - "bus_i": 6, - "bus_type": 1, - "index": 6, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "7": { - "base_kv": 20.0, - "bus_i": 7, - "bus_type": 1, - "index": 7, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "8": { - "base_kv": 20.0, - "bus_i": 8, - "bus_type": 1, - "index": 8, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - }, - "9": { - "base_kv": 20.0, - "bus_i": 9, - "bus_type": 1, - "index": 9, - "va": 0.0, - "vm": 1.0, - "vmax": 1.2, - "vmin": 0.8, - "zone": 1 - } - }, - "correct_pm_network_data": true, - "dcline": {}, - "gen": { - "1": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 1, - "gen_status": 1, - "index": 1, - "model": 2, - "ncost": 3, - "pg": 0.0, - "pmax": 10000.00000001, - "pmin": -10000.00000001, - "qg": 0.0, - "qmax": 10000.00000001, - "qmin": -10000.00000001, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.03 - }, - "10": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 8, - "gen_status": 1, - "index": 10, - "model": 2, - "ncost": 3, - "pg": 10.350303552, - "pmax": 10.35040706503552, - "pmin": 10.350200038964479, - "qg": 0.0, - "qmax": 3.93600001, - "qmin": -3.93600001, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.0 - }, - "2": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 4, - "gen_status": 1, - "index": 2, - "model": 2, - "ncost": 3, - "pg": 0.13800404736, - "pmax": 0.13800543740047358, - "pmin": 0.1380026573195264, - "qg": 0.0, - "qmax": 0.05248001000000001, - "qmin": -0.05248001000000001, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.0 - }, - "3": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 5, - "gen_status": 1, - "index": 3, - "model": 2, - "ncost": 3, - "pg": 0.13800404736, - "pmax": 0.13800543740047358, - "pmin": 0.1380026573195264, - "qg": 0.0, - "qmax": 0.05248001000000001, - "qmin": -0.05248001000000001, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.0 - }, - "4": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 6, - "gen_status": 1, - "index": 4, - "model": 2, - "ncost": 3, - "pg": 0.20700607104, - "pmax": 0.20700815110071039, - "pmin": 0.2070039909792896, - "qg": 0.0, - "qmax": 0.07872000999999999, - "qmin": -0.07872000999999999, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.0 - }, - "5": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 7, - "gen_status": 1, - "index": 5, - "model": 2, - "ncost": 3, - "pg": 0.20700607104, - "pmax": 0.20700815110071039, - "pmin": 0.2070039909792896, - "qg": 0.0, - "qmax": 0.07872000999999999, - "qmin": -0.07872000999999999, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.0 - }, - "6": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 9, - "gen_status": 1, - "index": 6, - "model": 2, - "ncost": 3, - "pg": 0.20700607104, - "pmax": 0.20700815110071039, - "pmin": 0.2070039909792896, - "qg": 0.0, - "qmax": 0.07872000999999999, - "qmin": -0.07872000999999999, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.0 - }, - "7": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 10, - "gen_status": 1, - "index": 7, - "model": 2, - "ncost": 3, - "pg": 0.1598629404, - "pmax": 0.15986454902940397, - "pmin": 0.159861331770596, - "qg": 0.0, - "qmax": 0.07872000999999999, - "qmin": -0.07872000999999999, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.0 - }, - "8": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 11, - "gen_status": 1, - "index": 8, - "model": 2, - "ncost": 3, - "pg": 0.2131505872, - "pmax": 0.21315272870587199, - "pmin": 0.213148445694128, - "qg": 0.0, - "qmax": 0.10496001, - "qmin": -0.10496001, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.0 - }, - "9": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 12, - "gen_status": 1, - "index": 9, - "model": 2, - "ncost": 3, - "pg": 0.0532876468, - "pmax": 0.053288189676468, - "pmin": 0.053287103923531996, - "qg": 0.0, - "qmax": 0.026240010000000005, - "qmin": -0.026240010000000005, - "shutdown": 0.0, - "startup": 0.0, - "vg": 1.0 - } - }, - "load": { - "1": { - "index": 1, - "load_bus": 2, - "pd": 3.113519094, - "qd": -0.443601099611376, - "status": 1 - }, - "10": { - "index": 10, - "load_bus": 15, - "pd": 0.04330561605, - "qd": -0.00761527849923, - "status": 1 - }, - "11": { - "index": 11, - "load_bus": 2, - "pd": 1.006069095, - "qd": -0.232020348184516, - "status": 1 - }, - "12": { - "index": 12, - "load_bus": 4, - "pd": 0.04677338775, - "qd": -0.020339063766402, - "status": 1 - }, - "13": { - "index": 13, - "load_bus": 8, - "pd": 0.0158853015, - "qd": -0.006907606562174, - "status": 1 - }, - "14": { - "index": 14, - "load_bus": 10, - "pd": 0.11913976125, - "qd": -0.051807049216306, - "status": 1 - }, - "15": { - "index": 15, - "load_bus": 11, - "pd": 0.014120268, - "qd": -0.006140094721933, - "status": 1 - }, - "16": { - "index": 16, - "load_bus": 13, - "pd": 1.041577416, - "qd": -0.240209301649852, - "status": 1 - }, - "17": { - "index": 17, - "load_bus": 14, - "pd": 0.007060134, - "qd": -0.003070047360966, - "status": 1 - }, - "18": { - "index": 18, - "load_bus": 15, - "pd": 0.0688363065, - "qd": -0.029932961769421, - "status": 1 - }, - "2": { - "index": 2, - "load_bus": 4, - "pd": 0.05740511895, - "qd": -0.01009467149898, - "status": 1 - }, - "3": { - "index": 3, - "load_bus": 5, - "pd": 0.08963255415, - "qd": -0.015761855498407, - "status": 1 - }, - "4": { - "index": 4, - "load_bus": 6, - "pd": 0.1510661025, - "qd": -0.026564924997315, - "status": 1 - }, - "5": { - "index": 5, - "load_bus": 7, - "pd": 0.11380313055, - "qd": -0.020012243497977, - "status": 1 - }, - "6": { - "index": 6, - "load_bus": 9, - "pd": 0.12185998935, - "qd": -0.021429039497834, - "status": 1 - }, - "7": { - "index": 7, - "load_bus": 11, - "pd": 0.0986965203, - "qd": -0.017355750998246, - "status": 1 - }, - "8": { - "index": 8, - "load_bus": 12, - "pd": 0.0684832998, - "qd": -0.012042765998783, - "status": 1 - }, - "9": { - "index": 9, - "load_bus": 13, - "pd": 3.113519094, - "qd": -0.443601099611376, - "status": 1 - } - }, - "name": "", - "ne_branch": {}, - "per_unit": true, - "pm_log_level": 0, - "pm_mip_solver": "cbc", - "pm_mip_time_limit": Infinity, - "pm_model": "ACPPowerModel", - "pm_nl_solver": "ipopt", - "pm_nl_time_limit": Infinity, - "pm_solver": "ipopt", - "pm_time_limit": Infinity, - "pm_tol": 1e-08, - "shunt": {}, - "silence": true, - "source_version": "2.0.0", - "sourcetype": "matpower", - "storage": {}, - "switch": {}, - "user_defined_params": { - "setpoint_q": { - "1": { - "element": "branch", - "element_index": 1, - "element_pp_index": 0, - "f_bus": 2, - "t_bus": 3, - "value": 5.0 - } - }, - "side": { - "1": { - "element": "branch", - "element_index": 1, - "element_pp_index": 0, - "value": "from" - } - } - } -} \ No newline at end of file +{"baseMVA": 1, "branch": {"1": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.026786049475940484, "b_to": 0.026786049475940484, "br_r": 0.00353205, "br_status": 1, "br_x": 0.005047799999999999, "f_bus": 2, "g_fr": -0.0, "g_to": -0.0, "index": 1, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 3, "tap": 1.0, "transformer": false}, "10": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.012348178836426464, "b_to": 0.012348178836426464, "br_r": 0.00162825, "br_status": 1, "br_x": 0.002327, "f_bus": 4, "g_fr": -0.0, "g_to": -0.0, "index": 10, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 9, "tap": 1.0, "transformer": false}, "11": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.003102216126048443, "b_to": 0.003102216126048443, "br_r": 0.00623475, "br_status": 1, "br_x": 0.004474349999999999, "f_bus": 13, "g_fr": -0.0, "g_to": -0.0, "index": 11, "rate_a": 20.26499444855586, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 14, "tap": 1.0, "transformer": false}, "12": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.0018968560770725657, "b_to": 0.0018968560770725657, "br_r": 0.0038122500000000005, "br_status": 1, "br_x": 0.00273585, "f_bus": 14, "g_fr": -0.0, "g_to": -0.0, "index": 12, "rate_a": 20.26499444855586, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 15, "tap": 1.0, "transformer": false}, "13": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.002279663785186424, "b_to": 0.002279663785186424, "br_r": 0.0003006, "br_status": 1, "br_x": 0.0004296, "f_bus": 7, "g_fr": -0.0, "g_to": -0.0, "index": 13, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 16, "tap": 1.0, "transformer": false}, "14": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.004654313561422283, "b_to": 0.004654313561422283, "br_r": 0.000613725, "br_status": 1, "br_x": 0.0008771, "f_bus": 12, "g_fr": -0.0, "g_to": -0.0, "index": 14, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 17, "tap": 1.0, "transformer": false}, "15": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.0012688000515535555, "b_to": 0.0012688000515535555, "br_r": 0.00255, "br_status": 1, "br_x": 0.00183, "f_bus": 15, "g_fr": -0.0, "g_to": -0.0, "index": 15, "rate_a": 20.26499444855586, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 18, "tap": 1.0, "transformer": false}, "16": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.0, "b_to": 0.0, "br_r": 6.4e-05, "br_status": 1, "br_x": 0.004800001352414809, "f_bus": 1, "g_fr": -0.0, "g_to": -0.0, "index": 16, "rate_a": 75.0, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.5235987755982988, "t_bus": 2, "tap": 1.0, "transformer": true}, "17": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.0, "b_to": 0.0, "br_r": 6.4e-05, "br_status": 1, "br_x": 0.004800001352414809, "f_bus": 1, "g_fr": -0.0, "g_to": -0.0, "index": 17, "rate_a": 75.0, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.5235987755982988, "t_bus": 13, "tap": 1.0, "transformer": true}, "2": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.04198380804384998, "b_to": 0.04198380804384998, "br_r": 0.00553605, "br_status": 1, "br_x": 0.0079118, "f_bus": 3, "g_fr": -0.0, "g_to": -0.0, "index": 2, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 4, "tap": 1.0, "transformer": false}, "3": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.005794145454015495, "b_to": 0.005794145454015495, "br_r": 0.000764025, "br_status": 1, "br_x": 0.0010919, "f_bus": 4, "g_fr": -0.0, "g_to": -0.0, "index": 3, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 5, "tap": 1.0, "transformer": false}, "4": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.005319215498768324, "b_to": 0.005319215498768324, "br_r": 0.0007014, "br_status": 1, "br_x": 0.0010024, "f_bus": 5, "g_fr": -0.0, "g_to": -0.0, "index": 4, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 6, "tap": 1.0, "transformer": false}, "5": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.014627842621612888, "b_to": 0.014627842621612888, "br_r": 0.00192885, "br_status": 1, "br_x": 0.0027566, "f_bus": 6, "g_fr": -0.0, "g_to": -0.0, "index": 5, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 7, "tap": 1.0, "transformer": false}, "6": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.015862660505255536, "b_to": 0.015862660505255536, "br_r": 0.002091675, "br_status": 1, "br_x": 0.0029893, "f_bus": 8, "g_fr": -0.0, "g_to": -0.0, "index": 6, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 9, "tap": 1.0, "transformer": false}, "7": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.003039551713581899, "b_to": 0.003039551713581899, "br_r": 0.0004008, "br_status": 1, "br_x": 0.0005727999999999999, "f_bus": 9, "g_fr": -0.0, "g_to": -0.0, "index": 7, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 10, "tap": 1.0, "transformer": false}, "8": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.007313921310806444, "b_to": 0.007313921310806444, "br_r": 0.000964425, "br_status": 1, "br_x": 0.0013783, "f_bus": 10, "g_fr": -0.0, "g_to": -0.0, "index": 8, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 11, "tap": 1.0, "transformer": false}, "9": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.0031345377046313335, "b_to": 0.0031345377046313335, "br_r": 0.00041332500000000003, "br_status": 1, "br_x": 0.0005907, "f_bus": 11, "g_fr": -0.0, "g_to": -0.0, "index": 9, "rate_a": 15.068842025849229, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 12, "tap": 1.0, "transformer": false}}, "bus": {"1": {"base_kv": 110.0, "bus_i": 1, "bus_type": 3, "index": 1, "va": 0.0, "vm": 1.03, "vmax": 1.03000001, "vmin": 1.02999999, "zone": 1}, "10": {"base_kv": 20.0, "bus_i": 10, "bus_type": 1, "index": 10, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "11": {"base_kv": 20.0, "bus_i": 11, "bus_type": 1, "index": 11, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "12": {"base_kv": 20.0, "bus_i": 12, "bus_type": 1, "index": 12, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "13": {"base_kv": 20.0, "bus_i": 13, "bus_type": 1, "index": 13, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "14": {"base_kv": 20.0, "bus_i": 14, "bus_type": 1, "index": 14, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "15": {"base_kv": 20.0, "bus_i": 15, "bus_type": 1, "index": 15, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "16": {"base_kv": 20.0, "bus_i": 16, "bus_type": 1, "index": 16, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "17": {"base_kv": 20.0, "bus_i": 17, "bus_type": 1, "index": 17, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "18": {"base_kv": 20.0, "bus_i": 18, "bus_type": 1, "index": 18, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "2": {"base_kv": 20.0, "bus_i": 2, "bus_type": 1, "index": 2, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "3": {"base_kv": 20.0, "bus_i": 3, "bus_type": 1, "index": 3, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "4": {"base_kv": 20.0, "bus_i": 4, "bus_type": 1, "index": 4, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "5": {"base_kv": 20.0, "bus_i": 5, "bus_type": 1, "index": 5, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "6": {"base_kv": 20.0, "bus_i": 6, "bus_type": 1, "index": 6, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "7": {"base_kv": 20.0, "bus_i": 7, "bus_type": 1, "index": 7, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "8": {"base_kv": 20.0, "bus_i": 8, "bus_type": 1, "index": 8, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}, "9": {"base_kv": 20.0, "bus_i": 9, "bus_type": 1, "index": 9, "va": 0.0, "vm": 1.0, "vmax": 1.2, "vmin": 0.8, "zone": 1}}, "correct_pm_network_data": true, "dcline": {}, "gen": {"1": {"cost": [0, 1.0, 0.0], "gen_bus": 1, "gen_status": 1, "index": 1, "model": 2, "ncost": 3, "pg": 0.0, "pmax": 10000.00000001, "pmin": -10000.00000001, "qg": 0.0, "qmax": 10000.00000001, "qmin": -10000.00000001, "shutdown": 0.0, "startup": 0.0, "vg": 1.03}, "10": {"cost": [0, 1.0, 0.0], "gen_bus": 8, "gen_status": 1, "index": 10, "model": 2, "ncost": 3, "pg": 10.350303552, "pmax": 10.35040706503552, "pmin": 10.350200038964479, "qg": 0.0, "qmax": 3.93600001, "qmin": -3.93600001, "shutdown": 0.0, "startup": 0.0, "vg": 1.0}, "2": {"cost": [0, 1.0, 0.0], "gen_bus": 4, "gen_status": 1, "index": 2, "model": 2, "ncost": 3, "pg": 0.13800404736, "pmax": 0.13800543740047358, "pmin": 0.1380026573195264, "qg": 0.0, "qmax": 0.05248001000000001, "qmin": -0.05248001000000001, "shutdown": 0.0, "startup": 0.0, "vg": 1.0}, "3": {"cost": [0, 1.0, 0.0], "gen_bus": 5, "gen_status": 1, "index": 3, "model": 2, "ncost": 3, "pg": 0.13800404736, "pmax": 0.13800543740047358, "pmin": 0.1380026573195264, "qg": 0.0, "qmax": 0.05248001000000001, "qmin": -0.05248001000000001, "shutdown": 0.0, "startup": 0.0, "vg": 1.0}, "4": {"cost": [0, 1.0, 0.0], "gen_bus": 6, "gen_status": 1, "index": 4, "model": 2, "ncost": 3, "pg": 0.20700607104, "pmax": 0.20700815110071039, "pmin": 0.2070039909792896, "qg": 0.0, "qmax": 0.07872000999999999, "qmin": -0.07872000999999999, "shutdown": 0.0, "startup": 0.0, "vg": 1.0}, "5": {"cost": [0, 1.0, 0.0], "gen_bus": 7, "gen_status": 1, "index": 5, "model": 2, "ncost": 3, "pg": 0.20700607104, "pmax": 0.20700815110071039, "pmin": 0.2070039909792896, "qg": 0.0, "qmax": 0.07872000999999999, "qmin": -0.07872000999999999, "shutdown": 0.0, "startup": 0.0, "vg": 1.0}, "6": {"cost": [0, 1.0, 0.0], "gen_bus": 9, "gen_status": 1, "index": 6, "model": 2, "ncost": 3, "pg": 0.20700607104, "pmax": 0.20700815110071039, "pmin": 0.2070039909792896, "qg": 0.0, "qmax": 0.07872000999999999, "qmin": -0.07872000999999999, "shutdown": 0.0, "startup": 0.0, "vg": 1.0}, "7": {"cost": [0, 1.0, 0.0], "gen_bus": 10, "gen_status": 1, "index": 7, "model": 2, "ncost": 3, "pg": 0.1598629404, "pmax": 0.15986454902940397, "pmin": 0.159861331770596, "qg": 0.0, "qmax": 0.07872000999999999, "qmin": -0.07872000999999999, "shutdown": 0.0, "startup": 0.0, "vg": 1.0}, "8": {"cost": [0, 1.0, 0.0], "gen_bus": 11, "gen_status": 1, "index": 8, "model": 2, "ncost": 3, "pg": 0.2131505872, "pmax": 0.21315272870587199, "pmin": 0.213148445694128, "qg": 0.0, "qmax": 0.10496001, "qmin": -0.10496001, "shutdown": 0.0, "startup": 0.0, "vg": 1.0}, "9": {"cost": [0, 1.0, 0.0], "gen_bus": 12, "gen_status": 1, "index": 9, "model": 2, "ncost": 3, "pg": 0.0532876468, "pmax": 0.053288189676468, "pmin": 0.053287103923531996, "qg": 0.0, "qmax": 0.026240010000000005, "qmin": -0.026240010000000005, "shutdown": 0.0, "startup": 0.0, "vg": 1.0}}, "load": {"1": {"index": 1, "load_bus": 2, "pd": 3.113519094, "qd": -0.443601099611376, "status": 1}, "10": {"index": 10, "load_bus": 15, "pd": 0.04330561605, "qd": -0.00761527849923, "status": 1}, "11": {"index": 11, "load_bus": 2, "pd": 1.006069095, "qd": -0.232020348184516, "status": 1}, "12": {"index": 12, "load_bus": 4, "pd": 0.04677338775, "qd": -0.020339063766402, "status": 1}, "13": {"index": 13, "load_bus": 8, "pd": 0.0158853015, "qd": -0.006907606562174, "status": 1}, "14": {"index": 14, "load_bus": 10, "pd": 0.11913976125, "qd": -0.051807049216306, "status": 1}, "15": {"index": 15, "load_bus": 11, "pd": 0.014120268, "qd": -0.006140094721933, "status": 1}, "16": {"index": 16, "load_bus": 13, "pd": 1.041577416, "qd": -0.240209301649852, "status": 1}, "17": {"index": 17, "load_bus": 14, "pd": 0.007060134, "qd": -0.003070047360966, "status": 1}, "18": {"index": 18, "load_bus": 15, "pd": 0.0688363065, "qd": -0.029932961769421, "status": 1}, "2": {"index": 2, "load_bus": 4, "pd": 0.05740511895, "qd": -0.01009467149898, "status": 1}, "3": {"index": 3, "load_bus": 5, "pd": 0.08963255415, "qd": -0.015761855498407, "status": 1}, "4": {"index": 4, "load_bus": 6, "pd": 0.1510661025, "qd": -0.026564924997315, "status": 1}, "5": {"index": 5, "load_bus": 7, "pd": 0.11380313055, "qd": -0.020012243497977, "status": 1}, "6": {"index": 6, "load_bus": 9, "pd": 0.12185998935, "qd": -0.021429039497834, "status": 1}, "7": {"index": 7, "load_bus": 11, "pd": 0.0986965203, "qd": -0.017355750998246, "status": 1}, "8": {"index": 8, "load_bus": 12, "pd": 0.0684832998, "qd": -0.012042765998783, "status": 1}, "9": {"index": 9, "load_bus": 13, "pd": 3.113519094, "qd": -0.443601099611376, "status": 1}}, "name": "", "ne_branch": {}, "per_unit": true, "pm_log_level": 0, "pm_mip_solver": "cbc", "pm_mip_time_limit": Infinity, "pm_model": "ACPPowerModel", "pm_nl_solver": "ipopt", "pm_nl_time_limit": Infinity, "pm_solver": "ipopt", "pm_time_limit": Infinity, "pm_tol": 1e-08, "shunt": {}, "silence": true, "source_version": "2.0.0", "sourcetype": "matpower", "storage": {}, "switch": {}, "user_defined_params": {"setpoint_q": {"1": {"element": "branch", "element_index": 1, "element_pp_index": 0, "f_bus": 2, "t_bus": 3, "value": 5.0}}, "side": {"1": {"element": "branch", "element_index": 1, "element_pp_index": 0, "value": "from"}}, "gen_and_controllable_sgen": {"2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9, "10": 10}}} \ No newline at end of file diff --git a/test/data/test_vstab.json b/test/data/test_vstab.json index 8ba88bf..c8436c2 100644 --- a/test/data/test_vstab.json +++ b/test/data/test_vstab.json @@ -1,934 +1 @@ -{ - "baseMVA": 1, - "branch": { - "1": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.026786049475940484, - "b_to": 0.026786049475940484, - "br_r": 0.00353205, - "br_status": 1, - "br_x": 0.005047799999999999, - "f_bus": 2, - "g_fr": -0.0, - "g_to": -0.0, - "index": 1, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 3, - "tap": 1.0, - "transformer": false - }, - "10": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.012348178836426464, - "b_to": 0.012348178836426464, - "br_r": 0.00162825, - "br_status": 1, - "br_x": 0.002327, - "f_bus": 4, - "g_fr": -0.0, - "g_to": -0.0, - "index": 10, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 9, - "tap": 1.0, - "transformer": false - }, - "11": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.003102216126048443, - "b_to": 0.003102216126048443, - "br_r": 0.00623475, - "br_status": 1, - "br_x": 0.004474349999999999, - "f_bus": 13, - "g_fr": -0.0, - "g_to": -0.0, - "index": 11, - "rate_a": 33.77499074759311, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 14, - "tap": 1.0, - "transformer": false - }, - "12": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0018968560770725657, - "b_to": 0.0018968560770725657, - "br_r": 0.0038122500000000005, - "br_status": 1, - "br_x": 0.00273585, - "f_bus": 14, - "g_fr": -0.0, - "g_to": -0.0, - "index": 12, - "rate_a": 33.77499074759311, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 15, - "tap": 1.0, - "transformer": false - }, - "13": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.002279663785186424, - "b_to": 0.002279663785186424, - "br_r": 0.0003006, - "br_status": 1, - "br_x": 0.0004296, - "f_bus": 7, - "g_fr": -0.0, - "g_to": -0.0, - "index": 13, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 16, - "tap": 1.0, - "transformer": false - }, - "14": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.004654313561422283, - "b_to": 0.004654313561422283, - "br_r": 0.000613725, - "br_status": 1, - "br_x": 0.0008771, - "f_bus": 12, - "g_fr": -0.0, - "g_to": -0.0, - "index": 14, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 17, - "tap": 1.0, - "transformer": false - }, - "15": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0012688000515535555, - "b_to": 0.0012688000515535555, - "br_r": 0.00255, - "br_status": 1, - "br_x": 0.00183, - "f_bus": 15, - "g_fr": -0.0, - "g_to": -0.0, - "index": 15, - "rate_a": 33.77499074759311, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 18, - "tap": 1.0, - "transformer": false - }, - "16": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0, - "b_to": 0.0, - "br_r": 6.4e-05, - "br_status": 1, - "br_x": 0.004800001352414809, - "f_bus": 1, - "g_fr": -0.0, - "g_to": -0.0, - "index": 16, - "rate_a": 125.0, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.5235987755982988, - "t_bus": 2, - "tap": 1.0, - "transformer": true - }, - "17": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0, - "b_to": 0.0, - "br_r": 6.4e-05, - "br_status": 1, - "br_x": 0.004800001352414809, - "f_bus": 1, - "g_fr": -0.0, - "g_to": -0.0, - "index": 17, - "rate_a": 125.0, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.5235987755982988, - "t_bus": 13, - "tap": 1.0, - "transformer": true - }, - "2": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.04198380804384998, - "b_to": 0.04198380804384998, - "br_r": 0.00553605, - "br_status": 1, - "br_x": 0.0079118, - "f_bus": 3, - "g_fr": -0.0, - "g_to": -0.0, - "index": 2, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 4, - "tap": 1.0, - "transformer": false - }, - "3": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.005794145454015495, - "b_to": 0.005794145454015495, - "br_r": 0.000764025, - "br_status": 1, - "br_x": 0.0010919, - "f_bus": 4, - "g_fr": -0.0, - "g_to": -0.0, - "index": 3, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 5, - "tap": 1.0, - "transformer": false - }, - "4": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.005319215498768324, - "b_to": 0.005319215498768324, - "br_r": 0.0007014, - "br_status": 1, - "br_x": 0.0010024, - "f_bus": 5, - "g_fr": -0.0, - "g_to": -0.0, - "index": 4, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 6, - "tap": 1.0, - "transformer": false - }, - "5": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.014627842621612888, - "b_to": 0.014627842621612888, - "br_r": 0.00192885, - "br_status": 1, - "br_x": 0.0027566, - "f_bus": 6, - "g_fr": -0.0, - "g_to": -0.0, - "index": 5, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 7, - "tap": 1.0, - "transformer": false - }, - "6": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.015862660505255536, - "b_to": 0.015862660505255536, - "br_r": 0.002091675, - "br_status": 1, - "br_x": 0.0029893, - "f_bus": 8, - "g_fr": -0.0, - "g_to": -0.0, - "index": 6, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 9, - "tap": 1.0, - "transformer": false - }, - "7": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.003039551713581899, - "b_to": 0.003039551713581899, - "br_r": 0.0004008, - "br_status": 1, - "br_x": 0.0005727999999999999, - "f_bus": 9, - "g_fr": -0.0, - "g_to": -0.0, - "index": 7, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 10, - "tap": 1.0, - "transformer": false - }, - "8": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.007313921310806444, - "b_to": 0.007313921310806444, - "br_r": 0.000964425, - "br_status": 1, - "br_x": 0.0013783, - "f_bus": 10, - "g_fr": -0.0, - "g_to": -0.0, - "index": 8, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 11, - "tap": 1.0, - "transformer": false - }, - "9": { - "angmax": 1.0471975511965976, - "angmin": -1.0471975511965976, - "b_fr": 0.0031345377046313335, - "b_to": 0.0031345377046313335, - "br_r": 0.00041332500000000003, - "br_status": 1, - "br_x": 0.0005907, - "f_bus": 11, - "g_fr": -0.0, - "g_to": -0.0, - "index": 9, - "rate_a": 25.114736709748716, - "rate_b": 250.0, - "rate_c": 250.0, - "shift": 0.0, - "t_bus": 12, - "tap": 1.0, - "transformer": false - } - }, - "bus": { - "1": { - "base_kv": 110.0, - "bus_i": 1, - "bus_type": 3, - "index": 1, - "va": 0.0, - "vm": 1.03, - "vmax": 1.03000001, - "vmin": 1.02999999, - "zone": 1 - }, - "10": { - "base_kv": 20.0, - "bus_i": 10, - "bus_type": 1, - "index": 10, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "11": { - "base_kv": 20.0, - "bus_i": 11, - "bus_type": 1, - "index": 11, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "12": { - "base_kv": 20.0, - "bus_i": 12, - "bus_type": 1, - "index": 12, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "13": { - "base_kv": 20.0, - "bus_i": 13, - "bus_type": 1, - "index": 13, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "14": { - "base_kv": 20.0, - "bus_i": 14, - "bus_type": 1, - "index": 14, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "15": { - "base_kv": 20.0, - "bus_i": 15, - "bus_type": 1, - "index": 15, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "16": { - "base_kv": 20.0, - "bus_i": 16, - "bus_type": 1, - "index": 16, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "17": { - "base_kv": 20.0, - "bus_i": 17, - "bus_type": 1, - "index": 17, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "18": { - "base_kv": 20.0, - "bus_i": 18, - "bus_type": 1, - "index": 18, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "2": { - "base_kv": 20.0, - "bus_i": 2, - "bus_type": 1, - "index": 2, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "3": { - "base_kv": 20.0, - "bus_i": 3, - "bus_type": 1, - "index": 3, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "4": { - "base_kv": 20.0, - "bus_i": 4, - "bus_type": 1, - "index": 4, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "5": { - "base_kv": 20.0, - "bus_i": 5, - "bus_type": 1, - "index": 5, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "6": { - "base_kv": 20.0, - "bus_i": 6, - "bus_type": 1, - "index": 6, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "7": { - "base_kv": 20.0, - "bus_i": 7, - "bus_type": 1, - "index": 7, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "8": { - "base_kv": 20.0, - "bus_i": 8, - "bus_type": 1, - "index": 8, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - }, - "9": { - "base_kv": 20.0, - "bus_i": 9, - "bus_type": 1, - "index": 9, - "va": 0.0, - "vm": 1.0, - "vmax": 1.1, - "vmin": 0.9, - "zone": 1 - } - }, - "correct_pm_network_data": true, - "dcline": {}, - "gen": { - "1": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 1, - "gen_status": 1, - "index": 1, - "model": 2, - "ncost": 3, - "pg": 0.0, - "pmax": 10000.00000001, - "pmin": -10000.00000001, - "qg": 0.0, - "qmax": 10000.00000001, - "qmin": -10000.00000001, - "vg": 1.03 - }, - "10": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 8, - "gen_status": 1, - "index": 10, - "model": 2, - "ncost": 3, - "pg": 12.0, - "pmax": 12.00000001, - "pmin": 11.99999999, - "qg": 0.0, - "qmax": 3.93600001, - "qmin": -3.93600001, - "vg": 1.0 - }, - "2": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 4, - "gen_status": 1, - "index": 2, - "model": 2, - "ncost": 3, - "pg": 0.16, - "pmax": 0.16000001, - "pmin": 0.15999999, - "qg": 0.0, - "qmax": 0.05248001000000001, - "qmin": -0.05248001000000001, - "vg": 1.0 - }, - "3": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 5, - "gen_status": 1, - "index": 3, - "model": 2, - "ncost": 3, - "pg": 0.16, - "pmax": 0.16000001, - "pmin": 0.15999999, - "qg": 0.0, - "qmax": 0.05248001000000001, - "qmin": -0.05248001000000001, - "vg": 1.0 - }, - "4": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 6, - "gen_status": 1, - "index": 4, - "model": 2, - "ncost": 3, - "pg": 0.24, - "pmax": 0.24000000999999999, - "pmin": 0.23999999, - "qg": 0.0, - "qmax": 0.07872000999999999, - "qmin": -0.07872000999999999, - "vg": 1.0 - }, - "5": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 7, - "gen_status": 1, - "index": 5, - "model": 2, - "ncost": 3, - "pg": 0.24, - "pmax": 0.24000000999999999, - "pmin": 0.23999999, - "qg": 0.0, - "qmax": 0.07872000999999999, - "qmin": -0.07872000999999999, - "vg": 1.0 - }, - "6": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 9, - "gen_status": 1, - "index": 6, - "model": 2, - "ncost": 3, - "pg": 0.24, - "pmax": 0.24000000999999999, - "pmin": 0.23999999, - "qg": 0.0, - "qmax": 0.07872000999999999, - "qmin": -0.07872000999999999, - "vg": 1.0 - }, - "7": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 10, - "gen_status": 1, - "index": 7, - "model": 2, - "ncost": 3, - "pg": 0.24, - "pmax": 0.24000000999999999, - "pmin": 0.23999999, - "qg": 0.0, - "qmax": 0.07872000999999999, - "qmin": -0.07872000999999999, - "vg": 1.0 - }, - "8": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 11, - "gen_status": 1, - "index": 8, - "model": 2, - "ncost": 3, - "pg": 0.32, - "pmax": 0.32000001, - "pmin": 0.31999999, - "qg": 0.0, - "qmax": 0.10496001, - "qmin": -0.10496001, - "vg": 1.0 - }, - "9": { - "cost": [ - 0, - 1.0, - 0.0 - ], - "gen_bus": 12, - "gen_status": 1, - "index": 9, - "model": 2, - "ncost": 3, - "pg": 0.08, - "pmax": 0.08000001, - "pmin": 0.07999999, - "qg": 0.0, - "qmax": 0.026240010000000005, - "qmin": -0.026240010000000005, - "vg": 1.0 - } - }, - "load": { - "1": { - "index": 1, - "load_bus": 2, - "pd": 14.994, - "qd": 3.0446615575462643, - "status": 1 - }, - "10": { - "index": 10, - "load_bus": 15, - "pd": 0.20854999999999999, - "qd": 0.052267556858915876, - "status": 1 - }, - "11": { - "index": 11, - "load_bus": 2, - "pd": 4.845, - "qd": 1.5924744895915917, - "status": 1 - }, - "12": { - "index": 12, - "load_bus": 4, - "pd": 0.22525, - "qd": 0.13959741222529884, - "status": 1 - }, - "13": { - "index": 13, - "load_bus": 8, - "pd": 0.0765, - "qd": 0.04741044188783732, - "status": 1 - }, - "14": { - "index": 14, - "load_bus": 10, - "pd": 0.57375, - "qd": 0.35557831415878005, - "status": 1 - }, - "15": { - "index": 15, - "load_bus": 11, - "pd": 0.068, - "qd": 0.04214261501141095, - "status": 1 - }, - "16": { - "index": 16, - "load_bus": 13, - "pd": 5.016, - "qd": 1.6486794715771778, - "status": 1 - }, - "17": { - "index": 17, - "load_bus": 14, - "pd": 0.034, - "qd": 0.021071307505705475, - "status": 1 - }, - "18": { - "index": 18, - "load_bus": 15, - "pd": 0.3315, - "qd": 0.20544524818062843, - "status": 1 - }, - "2": { - "index": 2, - "load_bus": 4, - "pd": 0.27645, - "qd": 0.06928490095251642, - "status": 1 - }, - "3": { - "index": 3, - "load_bus": 5, - "pd": 0.43165, - "qd": 0.10818168745217475, - "status": 1 - }, - "4": { - "index": 4, - "load_bus": 6, - "pd": 0.7275, - "qd": 0.182328686717148, - "status": 1 - }, - "5": { - "index": 5, - "load_bus": 7, - "pd": 0.5480499999999999, - "qd": 0.1373542773269184, - "status": 1 - }, - "6": { - "index": 6, - "load_bus": 9, - "pd": 0.58685, - "qd": 0.147078473951833, - "status": 1 - }, - "7": { - "index": 7, - "load_bus": 11, - "pd": 0.4753, - "qd": 0.11912140865520342, - "status": 1 - }, - "8": { - "index": 8, - "load_bus": 12, - "pd": 0.32980000000000004, - "qd": 0.08265567131177387, - "status": 1 - }, - "9": { - "index": 9, - "load_bus": 13, - "pd": 14.994, - "qd": 3.0446615575462643, - "status": 1 - } - }, - "name": "", - "ne_branch": {}, - "per_unit": true, - "pm_log_level": 0, - "pm_mip_solver": "cbc", - "pm_mip_time_limit": Infinity, - "pm_model": "ACPPowerModel", - "pm_nl_solver": "ipopt", - "pm_nl_time_limit": Infinity, - "pm_solver": "ipopt", - "pm_time_limit": Infinity, - "pm_tol": 1e-08, - "shunt": {}, - "silence": true, - "source_version": "2.0.0", - "sourcetype": "matpower", - "storage": {}, - "switch": {}, - "user_defined_params": { - "setpoint_v": { - "4": { - "element": "bus", - "element_index": 4, - "value": 0.99 - }, - "5": { - "element": "bus", - "element_index": 5, - "value": 0.99 - }, - "6": { - "element": "bus", - "element_index": 6, - "value": 0.99 - }, - "7": { - "element": "bus", - "element_index": 7, - "value": 0.99 - }, - "8": { - "element": "bus", - "element_index": 8, - "value": 0.99 - }, - "9": { - "element": "bus", - "element_index": 9, - "value": 0.99 - }, - "10": { - "element": "bus", - "element_index": 10, - "value": 0.99 - }, - "11": { - "element": "bus", - "element_index": 11, - "value": 0.99 - }, - "12": { - "element": "bus", - "element_index": 12, - "value": 0.99 - } - } - } -} \ No newline at end of file +{"baseMVA": 1, "branch": {"1": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.026786049475940484, "b_to": 0.026786049475940484, "br_r": 0.00353205, "br_status": 1, "br_x": 0.005047799999999999, "f_bus": 2, "g_fr": -0.0, "g_to": -0.0, "index": 1, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 3, "tap": 1.0, "transformer": false}, "10": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.012348178836426464, "b_to": 0.012348178836426464, "br_r": 0.00162825, "br_status": 1, "br_x": 0.002327, "f_bus": 4, "g_fr": -0.0, "g_to": -0.0, "index": 10, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 9, "tap": 1.0, "transformer": false}, "11": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.003102216126048443, "b_to": 0.003102216126048443, "br_r": 0.00623475, "br_status": 1, "br_x": 0.004474349999999999, "f_bus": 13, "g_fr": -0.0, "g_to": -0.0, "index": 11, "rate_a": 33.77499074759311, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 14, "tap": 1.0, "transformer": false}, "12": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.0018968560770725657, "b_to": 0.0018968560770725657, "br_r": 0.0038122500000000005, "br_status": 1, "br_x": 0.00273585, "f_bus": 14, "g_fr": -0.0, "g_to": -0.0, "index": 12, "rate_a": 33.77499074759311, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 15, "tap": 1.0, "transformer": false}, "13": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.002279663785186424, "b_to": 0.002279663785186424, "br_r": 0.0003006, "br_status": 1, "br_x": 0.0004296, "f_bus": 7, "g_fr": -0.0, "g_to": -0.0, "index": 13, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 16, "tap": 1.0, "transformer": false}, "14": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.004654313561422283, "b_to": 0.004654313561422283, "br_r": 0.000613725, "br_status": 1, "br_x": 0.0008771, "f_bus": 12, "g_fr": -0.0, "g_to": -0.0, "index": 14, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 17, "tap": 1.0, "transformer": false}, "15": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.0012688000515535555, "b_to": 0.0012688000515535555, "br_r": 0.00255, "br_status": 1, "br_x": 0.00183, "f_bus": 15, "g_fr": -0.0, "g_to": -0.0, "index": 15, "rate_a": 33.77499074759311, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 18, "tap": 1.0, "transformer": false}, "16": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.0, "b_to": 0.0, "br_r": 6.4e-05, "br_status": 1, "br_x": 0.004800001352414809, "f_bus": 1, "g_fr": -0.0, "g_to": -0.0, "index": 16, "rate_a": 125.0, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.5235987755982988, "t_bus": 2, "tap": 1.0, "transformer": true}, "17": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.0, "b_to": 0.0, "br_r": 6.4e-05, "br_status": 1, "br_x": 0.004800001352414809, "f_bus": 1, "g_fr": -0.0, "g_to": -0.0, "index": 17, "rate_a": 125.0, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.5235987755982988, "t_bus": 13, "tap": 1.0, "transformer": true}, "2": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.04198380804384998, "b_to": 0.04198380804384998, "br_r": 0.00553605, "br_status": 1, "br_x": 0.0079118, "f_bus": 3, "g_fr": -0.0, "g_to": -0.0, "index": 2, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 4, "tap": 1.0, "transformer": false}, "3": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.005794145454015495, "b_to": 0.005794145454015495, "br_r": 0.000764025, "br_status": 1, "br_x": 0.0010919, "f_bus": 4, "g_fr": -0.0, "g_to": -0.0, "index": 3, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 5, "tap": 1.0, "transformer": false}, "4": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.005319215498768324, "b_to": 0.005319215498768324, "br_r": 0.0007014, "br_status": 1, "br_x": 0.0010024, "f_bus": 5, "g_fr": -0.0, "g_to": -0.0, "index": 4, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 6, "tap": 1.0, "transformer": false}, "5": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.014627842621612888, "b_to": 0.014627842621612888, "br_r": 0.00192885, "br_status": 1, "br_x": 0.0027566, "f_bus": 6, "g_fr": -0.0, "g_to": -0.0, "index": 5, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 7, "tap": 1.0, "transformer": false}, "6": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.015862660505255536, "b_to": 0.015862660505255536, "br_r": 0.002091675, "br_status": 1, "br_x": 0.0029893, "f_bus": 8, "g_fr": -0.0, "g_to": -0.0, "index": 6, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 9, "tap": 1.0, "transformer": false}, "7": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.003039551713581899, "b_to": 0.003039551713581899, "br_r": 0.0004008, "br_status": 1, "br_x": 0.0005727999999999999, "f_bus": 9, "g_fr": -0.0, "g_to": -0.0, "index": 7, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 10, "tap": 1.0, "transformer": false}, "8": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.007313921310806444, "b_to": 0.007313921310806444, "br_r": 0.000964425, "br_status": 1, "br_x": 0.0013783, "f_bus": 10, "g_fr": -0.0, "g_to": -0.0, "index": 8, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 11, "tap": 1.0, "transformer": false}, "9": {"angmax": 1.0471975511965976, "angmin": -1.0471975511965976, "b_fr": 0.0031345377046313335, "b_to": 0.0031345377046313335, "br_r": 0.00041332500000000003, "br_status": 1, "br_x": 0.0005907, "f_bus": 11, "g_fr": -0.0, "g_to": -0.0, "index": 9, "rate_a": 25.114736709748716, "rate_b": 250.0, "rate_c": 250.0, "shift": 0.0, "t_bus": 12, "tap": 1.0, "transformer": false}}, "bus": {"1": {"base_kv": 110.0, "bus_i": 1, "bus_type": 3, "index": 1, "va": 0.0, "vm": 1.03, "vmax": 1.03000001, "vmin": 1.02999999, "zone": 1}, "10": {"base_kv": 20.0, "bus_i": 10, "bus_type": 1, "index": 10, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "11": {"base_kv": 20.0, "bus_i": 11, "bus_type": 1, "index": 11, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "12": {"base_kv": 20.0, "bus_i": 12, "bus_type": 1, "index": 12, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "13": {"base_kv": 20.0, "bus_i": 13, "bus_type": 1, "index": 13, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "14": {"base_kv": 20.0, "bus_i": 14, "bus_type": 1, "index": 14, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "15": {"base_kv": 20.0, "bus_i": 15, "bus_type": 1, "index": 15, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "16": {"base_kv": 20.0, "bus_i": 16, "bus_type": 1, "index": 16, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "17": {"base_kv": 20.0, "bus_i": 17, "bus_type": 1, "index": 17, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "18": {"base_kv": 20.0, "bus_i": 18, "bus_type": 1, "index": 18, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "2": {"base_kv": 20.0, "bus_i": 2, "bus_type": 1, "index": 2, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "3": {"base_kv": 20.0, "bus_i": 3, "bus_type": 1, "index": 3, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "4": {"base_kv": 20.0, "bus_i": 4, "bus_type": 1, "index": 4, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "5": {"base_kv": 20.0, "bus_i": 5, "bus_type": 1, "index": 5, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "6": {"base_kv": 20.0, "bus_i": 6, "bus_type": 1, "index": 6, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "7": {"base_kv": 20.0, "bus_i": 7, "bus_type": 1, "index": 7, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "8": {"base_kv": 20.0, "bus_i": 8, "bus_type": 1, "index": 8, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}, "9": {"base_kv": 20.0, "bus_i": 9, "bus_type": 1, "index": 9, "va": 0.0, "vm": 1.0, "vmax": 1.1, "vmin": 0.9, "zone": 1}}, "correct_pm_network_data": true, "dcline": {}, "gen": {"1": {"cost": [0, 1.0, 0.0], "gen_bus": 1, "gen_status": 1, "index": 1, "model": 2, "ncost": 3, "pg": 0.0, "pmax": 10000.00000001, "pmin": -10000.00000001, "qg": 0.0, "qmax": 10000.00000001, "qmin": -10000.00000001, "vg": 1.03}, "10": {"cost": [0, 1.0, 0.0], "gen_bus": 8, "gen_status": 1, "index": 10, "model": 2, "ncost": 3, "pg": 12.0, "pmax": 12.00000001, "pmin": 11.99999999, "qg": 0.0, "qmax": 3.93600001, "qmin": -3.93600001, "vg": 1.0}, "2": {"cost": [0, 1.0, 0.0], "gen_bus": 4, "gen_status": 1, "index": 2, "model": 2, "ncost": 3, "pg": 0.16, "pmax": 0.16000001, "pmin": 0.15999999, "qg": 0.0, "qmax": 0.05248001000000001, "qmin": -0.05248001000000001, "vg": 1.0}, "3": {"cost": [0, 1.0, 0.0], "gen_bus": 5, "gen_status": 1, "index": 3, "model": 2, "ncost": 3, "pg": 0.16, "pmax": 0.16000001, "pmin": 0.15999999, "qg": 0.0, "qmax": 0.05248001000000001, "qmin": -0.05248001000000001, "vg": 1.0}, "4": {"cost": [0, 1.0, 0.0], "gen_bus": 6, "gen_status": 1, "index": 4, "model": 2, "ncost": 3, "pg": 0.24, "pmax": 0.24000000999999999, "pmin": 0.23999999, "qg": 0.0, "qmax": 0.07872000999999999, "qmin": -0.07872000999999999, "vg": 1.0}, "5": {"cost": [0, 1.0, 0.0], "gen_bus": 7, "gen_status": 1, "index": 5, "model": 2, "ncost": 3, "pg": 0.24, "pmax": 0.24000000999999999, "pmin": 0.23999999, "qg": 0.0, "qmax": 0.07872000999999999, "qmin": -0.07872000999999999, "vg": 1.0}, "6": {"cost": [0, 1.0, 0.0], "gen_bus": 9, "gen_status": 1, "index": 6, "model": 2, "ncost": 3, "pg": 0.24, "pmax": 0.24000000999999999, "pmin": 0.23999999, "qg": 0.0, "qmax": 0.07872000999999999, "qmin": -0.07872000999999999, "vg": 1.0}, "7": {"cost": [0, 1.0, 0.0], "gen_bus": 10, "gen_status": 1, "index": 7, "model": 2, "ncost": 3, "pg": 0.24, "pmax": 0.24000000999999999, "pmin": 0.23999999, "qg": 0.0, "qmax": 0.07872000999999999, "qmin": -0.07872000999999999, "vg": 1.0}, "8": {"cost": [0, 1.0, 0.0], "gen_bus": 11, "gen_status": 1, "index": 8, "model": 2, "ncost": 3, "pg": 0.32, "pmax": 0.32000001, "pmin": 0.31999999, "qg": 0.0, "qmax": 0.10496001, "qmin": -0.10496001, "vg": 1.0}, "9": {"cost": [0, 1.0, 0.0], "gen_bus": 12, "gen_status": 1, "index": 9, "model": 2, "ncost": 3, "pg": 0.08, "pmax": 0.08000001, "pmin": 0.07999999, "qg": 0.0, "qmax": 0.026240010000000005, "qmin": -0.026240010000000005, "vg": 1.0}}, "load": {"1": {"index": 1, "load_bus": 2, "pd": 14.994, "qd": 3.0446615575462643, "status": 1}, "10": {"index": 10, "load_bus": 15, "pd": 0.20854999999999999, "qd": 0.052267556858915876, "status": 1}, "11": {"index": 11, "load_bus": 2, "pd": 4.845, "qd": 1.5924744895915917, "status": 1}, "12": {"index": 12, "load_bus": 4, "pd": 0.22525, "qd": 0.13959741222529884, "status": 1}, "13": {"index": 13, "load_bus": 8, "pd": 0.0765, "qd": 0.04741044188783732, "status": 1}, "14": {"index": 14, "load_bus": 10, "pd": 0.57375, "qd": 0.35557831415878005, "status": 1}, "15": {"index": 15, "load_bus": 11, "pd": 0.068, "qd": 0.04214261501141095, "status": 1}, "16": {"index": 16, "load_bus": 13, "pd": 5.016, "qd": 1.6486794715771778, "status": 1}, "17": {"index": 17, "load_bus": 14, "pd": 0.034, "qd": 0.021071307505705475, "status": 1}, "18": {"index": 18, "load_bus": 15, "pd": 0.3315, "qd": 0.20544524818062843, "status": 1}, "2": {"index": 2, "load_bus": 4, "pd": 0.27645, "qd": 0.06928490095251642, "status": 1}, "3": {"index": 3, "load_bus": 5, "pd": 0.43165, "qd": 0.10818168745217475, "status": 1}, "4": {"index": 4, "load_bus": 6, "pd": 0.7275, "qd": 0.182328686717148, "status": 1}, "5": {"index": 5, "load_bus": 7, "pd": 0.5480499999999999, "qd": 0.1373542773269184, "status": 1}, "6": {"index": 6, "load_bus": 9, "pd": 0.58685, "qd": 0.147078473951833, "status": 1}, "7": {"index": 7, "load_bus": 11, "pd": 0.4753, "qd": 0.11912140865520342, "status": 1}, "8": {"index": 8, "load_bus": 12, "pd": 0.32980000000000004, "qd": 0.08265567131177387, "status": 1}, "9": {"index": 9, "load_bus": 13, "pd": 14.994, "qd": 3.0446615575462643, "status": 1}}, "name": "", "ne_branch": {}, "per_unit": true, "pm_log_level": 0, "pm_mip_solver": "cbc", "pm_mip_time_limit": Infinity, "pm_model": "ACPPowerModel", "pm_nl_solver": "ipopt", "pm_nl_time_limit": Infinity, "pm_solver": "ipopt", "pm_time_limit": Infinity, "pm_tol": 1e-08, "shunt": {}, "silence": true, "source_version": "2.0.0", "sourcetype": "matpower", "storage": {}, "switch": {}, "user_defined_params": {"setpoint_v": {"4": {"element": "bus", "element_index": 4, "value": 0.99}, "5": {"element": "bus", "element_index": 5, "value": 0.99}, "6": {"element": "bus", "element_index": 6, "value": 0.99}, "7": {"element": "bus", "element_index": 7, "value": 0.99}, "8": {"element": "bus", "element_index": 8, "value": 0.99}, "9": {"element": "bus", "element_index": 9, "value": 0.99}, "10": {"element": "bus", "element_index": 10, "value": 0.99}, "11": {"element": "bus", "element_index": 11, "value": 0.99}, "12": {"element": "bus", "element_index": 12, "value": 0.99}}, "gen_and_controllable_sgen": {"2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9, "10": 10}}} \ No newline at end of file diff --git a/test/runtests_mn_storage.jl b/test/runtests_mn_storage.jl index b4a4719..4795fac 100644 --- a/test/runtests_mn_storage.jl +++ b/test/runtests_mn_storage.jl @@ -10,23 +10,38 @@ import JuMP _PM.silence() pdm_path = joinpath(dirname(pathof(PandaModels)), "..") data_path = joinpath(pdm_path, "test", "data") -case_ts = joinpath(data_path, "test_mn_storage.json") +case_ots_dc = joinpath(data_path, "test_mn_storage_1.json") +case_ots_dc100 = joinpath(data_path, "test_mn_storage_100.json") -pm = _PdM.load_pm_from_json(case_ts) -_PdM.active_powermodels_silence!(pm) -pm = _PdM.check_powermodels_data!(pm) -model = _PdM.get_model(pm["pm_model"]) -solver = _PdM.get_solver(pm) -mn = _PdM.set_pq_values_from_timeseries(pm) +pm = _PdM.load_pm_from_json(case_ots_dc) +pm1 = _PdM.load_pm_from_json(case_ots_dc) +pm1["baseMVA"] = 100 +pm100 = _PdM.load_pm_from_json(case_ots_dc100) -result = _PM.solve_mn_opf_strg(mn, model, solver, - setting = Dict("output" => Dict("branch_flows" => true)), -) +pmc = _PdM.check_powermodels_data!(pm1) - -string(result["termination_status"]) == "LOCALLY_SOLVED" -string(result["dual_status"]) == "FEASIBLE_POINT" -string(result["primal_status"]) == "FEASIBLE_POINT" -string(result["optimizer"]) == "Juniper" -result["solve_time"] > 0.0 +## storage +# _PM.silence() +# pdm_path = joinpath(dirname(pathof(PandaModels)), "..") +# data_path = joinpath(pdm_path, "test", "data") +# case_ts = joinpath(data_path, "test_mn_storage.json") +# +# pm = _PdM.load_pm_from_json(case_ts) +# _PdM.active_powermodels_silence!(pm) +# pm = _PdM.check_powermodels_data!(pm) +# model = _PdM.get_model(pm["pm_model"]) +# solver = _PdM.get_solver(pm) +# mn = _PdM.set_pq_values_from_timeseries(pm) +# +# result = _PM.solve_mn_opf_strg(mn, model, solver, +# setting = Dict("output" => Dict("branch_flows" => true)), +# ) +# +# +# +# string(result["termination_status"]) == "LOCALLY_SOLVED" +# string(result["dual_status"]) == "FEASIBLE_POINT" +# string(result["primal_status"]) == "FEASIBLE_POINT" +# string(result["optimizer"]) == "Juniper" +# result["solve_time"] > 0.0