From d157ebebd80cc7e878fbb82066bef28fc1c65630 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Thu, 13 Mar 2025 14:29:05 +0100 Subject: [PATCH] error message threw error message `sys` had gone away from the function body, so it had to be grabbed from elsewhere --- src/linearization.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linearization.jl b/src/linearization.jl index 411620e8f3..1bd24db113 100644 --- a/src/linearization.jl +++ b/src/linearization.jl @@ -349,7 +349,7 @@ function CommonSolve.solve(prob::LinearizationProblem; allow_input_derivatives = if !iszero(Bs) if !allow_input_derivatives der_inds = findall(vec(any(!=(0), Bs, dims = 1))) - error("Input derivatives appeared in expressions (-g_z\\g_u != 0), the following inputs appeared differentiated: $(inputs(sys)[der_inds]). Call `linearize` with keyword argument `allow_input_derivatives = true` to allow this and have the returned `B` matrix be of double width ($(2nu)), where the last $nu inputs are the derivatives of the first $nu inputs.") + error("Input derivatives appeared in expressions (-g_z\\g_u != 0), the following inputs appeared differentiated: $(inputs(prob.f.prob.f.sys)[der_inds]). Call `linearize` with keyword argument `allow_input_derivatives = true` to allow this and have the returned `B` matrix be of double width ($(2nu)), where the last $nu inputs are the derivatives of the first $nu inputs.") end B = [B [zeros(nx, nu); Bs]] D = [D zeros(ny, nu)]