Skip to content

Commit

Permalink
Merge pull request #168 from julia-mpsge/bug_in_parameters
Browse files Browse the repository at this point in the history
Set start value when setting the value of parameters
  • Loading branch information
EliLazarus authored Sep 4, 2024
2 parents 4aac078 + 62d54c1 commit 0b40d4e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/structs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,8 @@ JuMP.value(F::Function, P::ScalarParameter) = P.value

function set_value!(P::ScalarParameter, value::Number)
P.value = value
if !isnothing(jump_model(model(P)))
fix(get_variable(P), value; force=true)
end
fix(get_variable(P), value; force=true)
set_start_value(get_variable(P), value)
return value
end

Expand Down

0 comments on commit 0b40d4e

Please sign in to comment.