Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Sep 18, 2024
1 parent 9f7df17 commit 5b2f761
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/MSPFormat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function _build_lhs(stage::Integer, sp::JuMP.Model, terms::Vector{Any})
error(
"SDDP.jl does not support this MSPFormat file because it " *
"contains state variables from stages other than `t` or " *
"`t-1`. Got `t-$(stage - term["stage"])`"
"`t-1`. Got `t-$(stage - term["stage"])`",
)
end
end
Expand Down
6 changes: 3 additions & 3 deletions test/MSPFormat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ function test_electric()
end

function test_stage_lead_time()
sp = JuMP.Model()
sp = Model()
sp[:x] = SDDP.State(@variable(sp), @variable(sp))
terms = Any[
Dict{String, Any}("name"=>"x", "stage"=>2, "coefficient"=>Any[1.0])
Dict{String, Any}("name"=>"x", "stage"=>0, "coefficient"=>Any[-1.0])
Dict("name" => "x", "stage" => 2, "coefficient" => [1.0]),
Dict("name" => "x", "stage" => 0, "coefficient" => [-1.0]),
]
@test_throws(
ErrorException(
Expand Down

0 comments on commit 5b2f761

Please sign in to comment.