diff --git a/src/parsers/power_system_table_data.jl b/src/parsers/power_system_table_data.jl index 39b2340811..9c90423456 100644 --- a/src/parsers/power_system_table_data.jl +++ b/src/parsers/power_system_table_data.jl @@ -775,9 +775,9 @@ function services_csv_parser!(sys::System, data::PowerSystemTableData) end function get_reserve_direction(direction::AbstractString) - if direction == "Up" + if lowercase(direction) == "up" return ReserveUp - elseif direction == "Down" + elseif lowercase(direction) == "down" return ReserveDown else throw(DataFormatError("invalid reserve direction $direction")) diff --git a/test/test_power_system_table_data.jl b/test/test_power_system_table_data.jl index 04b3fac1ff..85e088243e 100644 --- a/test/test_power_system_table_data.jl +++ b/test/test_power_system_table_data.jl @@ -154,8 +154,10 @@ end @testset "Test reserve direction" begin @test PSY.get_reserve_direction("Up") == ReserveUp @test PSY.get_reserve_direction("Down") == ReserveDown + @test PSY.get_reserve_direction("up") == ReserveUp + @test PSY.get_reserve_direction("down") == ReserveDown - for invalid in ("up", "down", "right", "left") + for invalid in ("right", "left") @test_throws PSY.DataFormatError PSY.get_reserve_direction(invalid) end end