FMIImport.jl
FMIImport.jl copied to clipboard
Type stability for StringToValueReference
fmi2StringToValueReference
has a type instability where it can return either a UInt32
or a Nothing
type result.
This gives some impracticalities when for example broadcasting where you can get either a Vector{UInt32}
or a Vector{Union{Nothing,UInt32}}
depending on the input. This pull-request fixes that by returning typemax(UInt32)
(= 4.3e9) by default.
(If your model has more than 4.3e9 inputs then this will fail, but I don't think this edge case is realistic)