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
Setting a default value with a Symbol or String errors because of a check that tries to take ndims(default), we should adapt this so it does not error and returns 1. Examples below
works fine:
using Mimi
@defcomp mycomp begin
p1 = Parameter{Symbol}()
function run_timestep(p,v,d,t)
#blank
end
end
m = Model()
set_dimension!(m, :time, 1:10)
add_comp!(m, mycomp)
update_param!(m, :mycomp, :p1, :hello)
run(m)
breaks with the error below:
using Mimi
@defcomp mycomp begin
p1 = Parameter{Symbol}(default=:hello)
function run_timestep(p,v,d,t)
#blank
end
end
m = Model()
set_dimension!(m, :time, 1:10)
add_comp!(m, mycomp)
run(m)
The text was updated successfully, but these errors were encountered:
Setting a
default
value with a Symbol or String errors because of a check that tries to takendims(default)
, we should adapt this so it does not error and returns1
. Examples belowworks fine:
breaks with the error below:
The text was updated successfully, but these errors were encountered: