Closed cscherrer closed 3 years ago
Fixed in https://github.com/cscherrer/Soss.jl/commit/36527519bf5da31ee77c2cb37d7dbd9172a5f360
julia> testvalue(mm)
(μ = [-0.510301547701104, 1.615423098718431], y = [0.0, 0.0])
julia> testvalue(m1())
2-element Vector{Float64}:
-0.5655353773129189
-0.5534287288896844
Let's keep this open until we've added unit tests
In @ptiede's issue https://github.com/cscherrer/Soss.jl/issues/258#issuecomment-819035325 we have
But given the
return x2
,testvalue(m1())
should return a float. So if we now addThen we get
The problem is here:
μ
is set to the named tuple(x1 = 0.0, x2 = [0.0, 0.0])
, which currently has noFor
method.I think the right way to fix this is to have
testvalue
defined on models similarly torand
. A model can dispatch to each component, returning only the return value given by the model.