You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Mimi
@defcomp A begin
p1 =Parameter(default=3)
p2 =Parameter()
end@defcomp B begin
p1 =Parameter(default=4)
p2 =Parameter()
end
m =Model()
set_dimension!(m, :time, 10)
add_comp!(m, A)
set_param!(m, :A, :p1, 5)
set_param!(m, :A, :p2, 6)
replace_comp!(m, B, :A)
run(m)
m[:A, :p1]
The above code returns a value of 4 for p1, even though the parameter value had been set to 5 before the replacement, and other external values that are set such as for p2 are maintained. Is this the behavior we want? In my opinion, this is a bug, but I'm curious what others think.