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,