Skip to content

Commit f87fddb

Browse files
authored
Handle dummy derivatives in linearization_function
The issue here is that the homogenous parameter PR that was merged broke `linearization_function`, which led to a further PR that broke the user interface to `linearization_function` such that the user now needs to provide an "example input" that encodes the types that the generated function would eventually be called with. I find this a very bad design and a quite unfortunate breaking change. The fundamental problem is that state and parameter types are important, but the modeling language does not allow the user to encode this information in the model, instead we now ask the users to provide the type information in the form of an example input.
1 parent ddcace4 commit f87fddb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/systems/abstractsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ function linearization_function(sys::AbstractSystem, inputs,
13031303
op = merge(defs, op)
13041304
end
13051305
sys = ssys
1306-
x0 = merge(defaults(sys), op)
1306+
x0 = merge(defaults(sys), Dict(missing_variable_defaults(sys)), op)
13071307
u0, p, _ = get_u0_p(sys, x0, p; use_union = false, tofloat = true)
13081308
p, split_idxs = split_parameters_by_type(p)
13091309
ps = parameters(sys)

0 commit comments

Comments
 (0)