diff --git a/src/instance/read.jl b/src/instance/read.jl index b095b0a..1fda33b 100644 --- a/src/instance/read.jl +++ b/src/instance/read.jl @@ -314,6 +314,7 @@ function _from_json(json; repair = true)::UnitCommitmentScenario pu = ProfiledUnit( unit_name, bus, + timeseries(scalar(dict["Minimum power (MW)"], default = 0.0)), timeseries(dict["Maximum power (MW)"]), timeseries(dict["Cost (\$/MW)"]), ) diff --git a/src/instance/structs.jl b/src/instance/structs.jl index 9d6cc5c..bdf729f 100644 --- a/src/instance/structs.jl +++ b/src/instance/structs.jl @@ -77,6 +77,7 @@ end mutable struct ProfiledUnit name::String bus::Bus + min_power::Vector{Float64} capacity::Vector{Float64} cost::Vector{Float64} end diff --git a/src/model/formulations/base/punit.jl b/src/model/formulations/base/punit.jl index ced3ba9..c6ac864 100644 --- a/src/model/formulations/base/punit.jl +++ b/src/model/formulations/base/punit.jl @@ -12,7 +12,7 @@ function _add_profiled_unit!( for t in 1:model[:instance].time # Decision variable punits[sc.name, pu.name, t] = - @variable(model, lower_bound = 0, upper_bound = pu.capacity[t]) + @variable(model, lower_bound = pu.min_power[t], upper_bound = pu.capacity[t]) # Objective function terms add_to_expression!( diff --git a/test/fixtures/case14-profiled.json.gz b/test/fixtures/case14-profiled.json.gz index c98d7d5..f0c6b87 100644 Binary files a/test/fixtures/case14-profiled.json.gz and b/test/fixtures/case14-profiled.json.gz differ diff --git a/test/instance/read_test.jl b/test/instance/read_test.jl index b7e27f0..78c3d78 100644 --- a/test/instance/read_test.jl +++ b/test/instance/read_test.jl @@ -141,6 +141,7 @@ end @test first_pu.name == "g7" @test first_pu.bus.name == "b4" @test first_pu.cost == [100.0 for t in 1:4] + @test first_pu.min_power == [60.0 for t in 1:4] @test first_pu.capacity == [100.0 for t in 1:4] @test sc.profiled_units_by_name["g7"].name == "g7" @@ -148,6 +149,7 @@ end @test second_pu.name == "g8" @test second_pu.bus.name == "b5" @test second_pu.cost == [50.0 for t in 1:4] + @test second_pu.min_power == [0.0 for t in 1:4] @test second_pu.capacity == [120.0 for t in 1:4] @test sc.profiled_units_by_name["g8"].name == "g8" end