From 99ddd7ce258a3d61f57eced1e0badca6df192bef Mon Sep 17 00:00:00 2001 From: Michel Schanen Date: Mon, 30 Jan 2023 10:49:54 -0600 Subject: [PATCH] fix --- src/OPF/opfmodel.jl | 4 ++-- src/backends.jl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OPF/opfmodel.jl b/src/OPF/opfmodel.jl index 21de3e1..1295708 100644 --- a/src/OPF/opfmodel.jl +++ b/src/OPF/opfmodel.jl @@ -112,7 +112,7 @@ function opf_model_add_block_constraints(opfmodel::JuMP.Model, opfdata::OPFData, @views for t=1:T, k=1:K opfdata_c = (k == 1) ? opfdata : opf_loaddata(rawdata; - lineOff = opfdata.lines[rawdata.ctgs_arr[k - 1]], + lineOff = opfdata.lines[rawdata.ctgs_arr[k - 1],:], time_horizon_start = modelinfo.time_horizon_start + t - 1, time_horizon_end = modelinfo.time_horizon_start + t - 1, load_scale = modelinfo.load_scale, @@ -130,7 +130,7 @@ function opf_model_add_block_constraints(opfmodel::JuMP.Model, opfdata::OPFData, @views for t=1:T, k=1:K opfdata_c = (k == 1) ? opfdata : opf_loaddata(rawdata; - lineOff = opfdata.lines[rawdata.ctgs_arr[k - 1]], + lineOff = opfdata.lines[rawdata.ctgs_arr[k - 1],:], time_horizon_start = modelinfo.time_horizon_start + t - 1, time_horizon_end = modelinfo.time_horizon_start + t - 1, load_scale = modelinfo.load_scale, diff --git a/src/backends.jl b/src/backends.jl index 4817e45..ed7b3db 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -210,7 +210,7 @@ function init!(block::JuMPBlockBackend, algparams::AlgParams) end opfdata_c = (j == 1) ? opfdata : opf_loaddata(block.rawdata; - lineOff = opfdata.lines[block.rawdata.ctgs_arr[j - 1]], + lineOff = opfdata.lines[block.rawdata.ctgs_arr[j - 1],:], time_horizon_start = modelinfo.time_horizon_start + t - 1, time_horizon_end = modelinfo.time_horizon_start + t - 1, load_scale = modelinfo.load_scale,