From a477f4313c469331330235199580a5e242c11f72 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 1 Mar 2024 03:50:08 -0600 Subject: [PATCH] fix a few last tests --- test/input_output_handling.jl | 2 +- test/state_selection.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/input_output_handling.jl b/test/input_output_handling.jl index 7ad7c1d384..00e3b4006f 100644 --- a/test/input_output_handling.jl +++ b/test/input_output_handling.jl @@ -131,7 +131,7 @@ model = ODESystem(eqs, t; systems = [torque, inertia1, inertia2, spring, damper] name = :name) model_outputs = [inertia1.w, inertia2.w, inertia1.phi, inertia2.phi] model_inputs = [torque.tau.u] -matrices, ssys = linearize(model, model_inputs, model_outputs) +matrices, ssys = linearize(model, model_inputs, model_outputs); @test length(ModelingToolkit.outputs(ssys)) == 4 if VERSION >= v"1.8" # :opaque_closure not supported before diff --git a/test/state_selection.jl b/test/state_selection.jl index c847955a85..b8404d1f26 100644 --- a/test/state_selection.jl +++ b/test/state_selection.jl @@ -120,12 +120,12 @@ let @unpack supply_pipe, return_pipe = system sys = structural_simplify(system) u0 = [ - system.supply_pipe.v => 0.1, system.return_pipe.v => 0.1, D(supply_pipe.v) => 0.0, + sys.supply_pipe.v => 0.1, sys.return_pipe.v => 0.1, D(supply_pipe.v) => 0.0, D(return_pipe.fluid_port_a.m) => 0.0, D(supply_pipe.fluid_port_a.m) => 0.0] prob1 = ODEProblem(sys, [], (0.0, 10.0), [], guesses = u0) prob2 = ODEProblem(sys, [], (0.0, 10.0), [], guesses = u0) - prob3 = DAEProblem(sys, D.(unknowns(sys)) .=> 0.0, u0, (0.0, 10.0), []) + prob3 = DAEProblem(sys, D.(unknowns(sys)) .=> 0.0, [], (0.0, 10.0), guesses = u0) @test solve(prob1, FBDF()).retcode == ReturnCode.Success #@test solve(prob2, FBDF()).retcode == ReturnCode.Success @test solve(prob3, DFBDF()).retcode == ReturnCode.Success