Package evaluation of ModiaBase on Julia 1.11.4 (a71dd056e0*) started at 2025-04-08T16:42:13.356 ################################################################################ # Set-up # Installing PkgEval dependencies (TestEnv)... Set-up completed after 9.18s ################################################################################ # Installation # Installing ModiaBase... Resolving package versions... Updating `~/.julia/environments/v1.11/Project.toml` [ec7bf1ca] + ModiaBase v0.11.1 Updating `~/.julia/environments/v1.11/Manifest.toml` [79e6a3ab] + Adapt v4.3.0 [66dad0bd] + AliasTables v1.1.3 [4fba245c] + ArrayInterface v7.18.0 [62783981] + BitTwiddlingConvenienceFunctions v0.1.6 [2a0fbf3d] + CPUSummary v0.2.6 [49dc2e85] + Calculus v0.5.2 [bbf7d656] + CommonSubexpressions v0.3.1 [f70d9fcc] + CommonWorldInvalidations v1.0.0 [34da2185] + Compat v4.16.0 [187b0558] + ConstructionBase v1.5.8 [adafc99b] + CpuId v0.3.1 [a8cc5b0e] + Crayons v4.1.1 [9a962f9c] + DataAPI v1.16.0 [a93c6f00] + DataFrames v1.7.0 [864edb3b] + DataStructures v0.18.22 [e2d170a0] + DataValueInterfaces v1.0.0 [163ba53b] + DiffResults v1.1.0 [b552c78f] + DiffRules v1.15.1 [31c24e10] + Distributions v0.25.118 [ffbed154] + DocStringExtensions v0.9.4 [1a297f60] + FillArrays v1.13.0 [6a86dc24] + FiniteDiff v2.27.0 ⌅ [f6369f11] + ForwardDiff v0.10.38 [c145ed77] + GenericSchur v0.5.4 [3e5b6fbb] + HostCPUFeatures v0.1.17 [34004b35] + HypergeometricFunctions v0.3.28 [615f187c] + IfElse v0.1.1 [842dd82b] + InlineStrings v1.4.3 [41ab1584] + InvertedIndices v1.3.1 [92d709cd] + IrrationalConstants v0.2.4 [82899510] + IteratorInterfaceExtensions v1.0.0 [692b3bcd] + JLLWrappers v1.7.0 [b964fa9f] + LaTeXStrings v1.4.0 [10f19ff3] + LayoutPointers v0.1.17 [2ab3a3ac] + LogExpFunctions v0.3.29 [1914dd2f] + MacroTools v0.5.15 [d125e4d3] + ManualMemory v0.1.8 [eff96d63] + Measurements v2.12.0 [e1d29d7a] + Missings v1.2.0 [ec7bf1ca] + ModiaBase v0.11.1 [0987c9cc] + MonteCarloMeasurements v1.4.5 [77ba4419] + NaNMath v1.1.3 [bac558e1] + OrderedCollections v1.8.0 [90014a1f] + PDMats v0.11.33 [2dfb63ee] + PooledArrays v1.4.3 ⌅ [aea7be01] + PrecompileTools v1.2.1 [21216c6a] + Preferences v1.4.3 [08abe8d2] + PrettyTables v2.4.0 [43287f4e] + PtrArrays v1.3.0 [1fd47b50] + QuadGK v2.11.2 [189a3867] + Reexport v1.2.2 [ae029012] + Requires v1.3.1 [79098fc4] + Rmath v0.8.0 [94e857df] + SIMDTypes v0.1.0 [476501e8] + SLEEFPirates v0.6.43 [91c51154] + SentinelArrays v1.4.8 [efcf1570] + Setfield v1.1.2 [a2af1166] + SortingAlgorithms v1.2.1 [276daf66] + SpecialFunctions v2.5.0 [aedffcd0] + Static v1.2.0 [0d7ed370] + StaticArrayInterface v1.8.0 [90137ffa] + StaticArrays v1.9.13 [1e83bf80] + StaticArraysCore v1.4.3 [10745b16] + Statistics v1.11.1 [82ae8749] + StatsAPI v1.7.0 [2913bbd2] + StatsBase v0.34.4 [4c63d2b9] + StatsFuns v1.4.0 [892a3eda] + StringManipulation v0.4.1 [3783bdb8] + TableTraits v1.0.1 [bd369af6] + Tables v1.12.0 [1986cc42] + Unitful v1.22.0 [3d5dd08c] + VectorizationBase v0.21.71 [efe28fd5] + OpenSpecFun_jll v0.5.6+0 [f50d1b31] + Rmath_jll v0.5.1+0 [56f22d72] + Artifacts v1.11.0 [2a0f44e3] + Base64 v1.11.0 [ade2ca70] + Dates v1.11.0 [9fa8497b] + Future v1.11.0 [b77e0a4c] + InteractiveUtils v1.11.0 [8f399da3] + Libdl v1.11.0 [37e2e46d] + LinearAlgebra v1.11.0 [56ddb016] + Logging v1.11.0 [d6f4376e] + Markdown v1.11.0 [de0858da] + Printf v1.11.0 [9a3f8284] + Random v1.11.0 [ea8e919c] + SHA v0.7.0 [9e88b42a] + Serialization v1.11.0 [2f01184e] + SparseArrays v1.11.0 [4607b0f0] + SuiteSparse [fa267f1f] + TOML v1.0.3 [8dfed614] + Test v1.11.0 [cf7118a7] + UUIDs v1.11.0 [4ec0a83e] + Unicode v1.11.0 [e66e0078] + CompilerSupportLibraries_jll v1.1.1+0 [4536629a] + OpenBLAS_jll v0.3.27+1 [05823500] + OpenLibm_jll v0.8.5+0 [bea87d4a] + SuiteSparse_jll v7.7.0+0 [8e850b90] + libblastrampoline_jll v5.11.0+0 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m` Installation completed after 4.58s ################################################################################ # Precompilation # Precompiling PkgEval dependencies... Precompiling package dependencies... Precompilation completed after 70.06s ################################################################################ # Testing # Testing ModiaBase Status `/tmp/jl_NgKTVJ/Project.toml` [a93c6f00] DataFrames v1.7.0 [b552c78f] DiffRules v1.15.1 [6a86dc24] FiniteDiff v2.27.0 ⌅ [f6369f11] ForwardDiff v0.10.38 [eff96d63] Measurements v2.12.0 [ec7bf1ca] ModiaBase v0.11.1 [0987c9cc] MonteCarloMeasurements v1.4.5 [bac558e1] OrderedCollections v1.8.0 [90137ffa] StaticArrays v1.9.13 [1986cc42] Unitful v1.22.0 [37e2e46d] LinearAlgebra v1.11.0 [de0858da] Printf v1.11.0 [8dfed614] Test v1.11.0 Status `/tmp/jl_NgKTVJ/Manifest.toml` [79e6a3ab] Adapt v4.3.0 [66dad0bd] AliasTables v1.1.3 [4fba245c] ArrayInterface v7.18.0 [62783981] BitTwiddlingConvenienceFunctions v0.1.6 [2a0fbf3d] CPUSummary v0.2.6 [49dc2e85] Calculus v0.5.2 [bbf7d656] CommonSubexpressions v0.3.1 [f70d9fcc] CommonWorldInvalidations v1.0.0 [34da2185] Compat v4.16.0 [187b0558] ConstructionBase v1.5.8 [adafc99b] CpuId v0.3.1 [a8cc5b0e] Crayons v4.1.1 [9a962f9c] DataAPI v1.16.0 [a93c6f00] DataFrames v1.7.0 [864edb3b] DataStructures v0.18.22 [e2d170a0] DataValueInterfaces v1.0.0 [163ba53b] DiffResults v1.1.0 [b552c78f] DiffRules v1.15.1 [31c24e10] Distributions v0.25.118 [ffbed154] DocStringExtensions v0.9.4 [1a297f60] FillArrays v1.13.0 [6a86dc24] FiniteDiff v2.27.0 ⌅ [f6369f11] ForwardDiff v0.10.38 [c145ed77] GenericSchur v0.5.4 [3e5b6fbb] HostCPUFeatures v0.1.17 [34004b35] HypergeometricFunctions v0.3.28 [615f187c] IfElse v0.1.1 [842dd82b] InlineStrings v1.4.3 [41ab1584] InvertedIndices v1.3.1 [92d709cd] IrrationalConstants v0.2.4 [82899510] IteratorInterfaceExtensions v1.0.0 [692b3bcd] JLLWrappers v1.7.0 [b964fa9f] LaTeXStrings v1.4.0 [10f19ff3] LayoutPointers v0.1.17 [2ab3a3ac] LogExpFunctions v0.3.29 [1914dd2f] MacroTools v0.5.15 [d125e4d3] ManualMemory v0.1.8 [eff96d63] Measurements v2.12.0 [e1d29d7a] Missings v1.2.0 [ec7bf1ca] ModiaBase v0.11.1 [0987c9cc] MonteCarloMeasurements v1.4.5 [77ba4419] NaNMath v1.1.3 [bac558e1] OrderedCollections v1.8.0 [90014a1f] PDMats v0.11.33 [2dfb63ee] PooledArrays v1.4.3 ⌅ [aea7be01] PrecompileTools v1.2.1 [21216c6a] Preferences v1.4.3 [08abe8d2] PrettyTables v2.4.0 [43287f4e] PtrArrays v1.3.0 [1fd47b50] QuadGK v2.11.2 [189a3867] Reexport v1.2.2 [ae029012] Requires v1.3.1 [79098fc4] Rmath v0.8.0 [94e857df] SIMDTypes v0.1.0 [476501e8] SLEEFPirates v0.6.43 [91c51154] SentinelArrays v1.4.8 [efcf1570] Setfield v1.1.2 [a2af1166] SortingAlgorithms v1.2.1 [276daf66] SpecialFunctions v2.5.0 [aedffcd0] Static v1.2.0 [0d7ed370] StaticArrayInterface v1.8.0 [90137ffa] StaticArrays v1.9.13 [1e83bf80] StaticArraysCore v1.4.3 [10745b16] Statistics v1.11.1 [82ae8749] StatsAPI v1.7.0 [2913bbd2] StatsBase v0.34.4 [4c63d2b9] StatsFuns v1.4.0 [892a3eda] StringManipulation v0.4.1 [3783bdb8] TableTraits v1.0.1 [bd369af6] Tables v1.12.0 [1986cc42] Unitful v1.22.0 [3d5dd08c] VectorizationBase v0.21.71 [efe28fd5] OpenSpecFun_jll v0.5.6+0 [f50d1b31] Rmath_jll v0.5.1+0 [56f22d72] Artifacts v1.11.0 [2a0f44e3] Base64 v1.11.0 [ade2ca70] Dates v1.11.0 [9fa8497b] Future v1.11.0 [b77e0a4c] InteractiveUtils v1.11.0 [8f399da3] Libdl v1.11.0 [37e2e46d] LinearAlgebra v1.11.0 [56ddb016] Logging v1.11.0 [d6f4376e] Markdown v1.11.0 [de0858da] Printf v1.11.0 [9a3f8284] Random v1.11.0 [ea8e919c] SHA v0.7.0 [9e88b42a] Serialization v1.11.0 [2f01184e] SparseArrays v1.11.0 [4607b0f0] SuiteSparse [fa267f1f] TOML v1.0.3 [8dfed614] Test v1.11.0 [cf7118a7] UUIDs v1.11.0 [4ec0a83e] Unicode v1.11.0 [e66e0078] CompilerSupportLibraries_jll v1.1.1+0 [4536629a] OpenBLAS_jll v0.3.27+1 [05823500] OpenLibm_jll v0.8.5+0 [bea87d4a] SuiteSparse_jll v7.7.0+0 [8e850b90] libblastrampoline_jll v5.11.0+0 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. Testing Running tests... testFindIncidence 10 Union{Expr, Symbol}[] x Union{Expr, Symbol}[:x] x * (y + z * sin(w)) Union{Expr, Symbol}[:x, :y, :z, :w] (x, x.y, x.y.z, x.y[z], f(x.y)) Union{Expr, Symbol}[:x, :(x.y), :(x.y.z), :(x.y), :z, :(x.y)] testLinearFactors 10 x (10, 0, true) 20.0 x (20.0, 0, true) x x (0, 1, true) x.y.z x.y.z (0, 1, true) y x (:y, 0, true) x + y x (:y, 1, true) x + y + x + y x (:(y + y), 2, true) x - y x (:(-y), 1, true) y - x x (:y, -1, true) -x + y x (:y, -1, true) (x - y) - z x (:(-y - z), 1, true) (x - y) - x x (:(-y), 0, true) (x - y) + x x (:(-y), 2, true) x * y x (0, :y, true) x * x x (0, 0, false) 2x x (0, 2, true) x * y * z x (0, :(z * y), true) x / y x (0, :(1 / y), true) y / x x (:(y / 0), NaN, false) (x / y) / z x (0, :((1 / y) / z), true) y \ x x (0, :(1 / y), true) sin(x) x (:(sin(x)), 0, false) sin(x) + x x (:(sin(x)), 1, false) sin(y) x (:(sin(y)), 0, true) if cond x else y endx (:(if cond 0 else y end), :(if cond 1 else 0 end), true) if cond x elseif cond2 y else z endx (:(if cond 0 else if cond2 y else z end end), :(if cond 1 else 0 end), true) if cond x + 1 else 2x + 2 endx (:(if cond 1 else 2 end), :(if cond 1 else 2 end), true) x[5] x (:(x[5]), 0, false) x = y x (:(-y), 1, true) x + 1 = begin y + 2 endx (:(1 - (y + 2)), 1, true) der(x) + x der(x) (:x, 1, true) R * i = begin u endi (:(-u), :R, true) testSolveEquations R * i = begin u endi (:(i = u / R), true) R * i = begin u endu (:(u = R * i), true) R * i = begin u endR (:(R = u / i), true) testGetCoefficients v1 = 0 (Union{Expr, Symbol}[:v1], Any[1], 0, true) v1 = 10 (Union{Expr, Symbol}[:v1], Any[1], -10, true) v1 = v2 (Union{Expr, Symbol}[:v1, :v2], Any[1, -1], 0, true) v1 = v2 + sin(v3) (Union{Expr, Symbol}[:v1, :v2, :v3], Any[1, -1], :(-(sin(v3))), false) v1 = -v2 (Union{Expr, Symbol}[:v1, :v2], Any[1, 1], 0, true) R * i = begin u end(Union{Expr, Symbol}[:R, :i, :u], Any[:i], :(-u), false) ... Test BLTandPantelides.jl Test match assign = [8, 1, 2, 7, 4, 5, 3, 0] Singular system assign = [0, 3, 1, 0] (invAssign, unAssignedVariables) = ([3, 0, 2], [1, 4]) (ass, unAssignedEquations) = ([0, 3, 1, 0], [2]) Test Tarjans strong connect components = Any[Any[6], Any[7, 5, 4, 3], Any[8, 2, 1]] Fixed-length pendulum assign = [5, 4, 1, 2, 0, 0, 3, 0, 0] Assigned original equations: 1: w: der(x) = w 2: z: der(y) = z 3: der(w): der(w) = T*x 4: y: der(z) = T*y - g 5: x: 0 = x^2 + y^2 - L^2 Unassigned variables: der(x), der(y), der(z), T Unassigned equations: Test diagnostics for too many equations Gbig = Any[[3, 5], [4, 6], [1, 7, 9], [2, 8, 9], [1, 2], [1, 10], [2, 10]] EGbig = Any[[3, 5, 11], [4, 6, 11], [1, 7, 9, 11], [2, 8, 9, 11], [1, 2, 11], [1, 10, 11], [2, 10, 11], [1, 5, 11], [2, 6, 11], [3, 7, 11], [4, 8, 11]] 1: w: der(x) = w 2: der(y): der(y) = z 3: T: der(w) = T*x 4: der(z): der(z) = T*y - g 5: dummy: 0 = x^2 + y^2 - L^2 6: x: x = cos(phi) 7: phi: y = sin(phi) 8: der(x): h(., der(.)) = 0 9: y: h(., der(.)) = 0 10: der(w): h(., der(.)) = 0 11: z: h(., der(.)) = 0 Unassigned variables: Unassigned equations: componentsBig = Any[Any[5, 10, 3, 4, 11, 2, 9, 7, 6, 8, 1]] Test diagnostics for too many variables Gbig = Any[[3, 5], [4, 6], [1, 7, 9], [10, 8, 9], [1, 10]] EGbig = Any[[3, 5], [4, 6], [1, 7, 9], [10, 8, 9], [1, 10], [1, 5], [2, 6], [3, 7], [4, 8], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]] 1: der(x): der(x) = w 2: der(y): der(y) = z 3: der(w): der(w) = T*x 4: der(z): der(z) = T*y - g 5: dummy: 0 = x^2 + dummy^2 - L^2 6: x: h(., der(.)) = 0 7: y: h(., der(.)) = 0 8: w: h(., der(.)) = 0 9: z: h(., der(.)) = 0 10: T: h(., der(.)) = 0 Unassigned variables: Unassigned equations: componentsBig = Any[Any[5, 4, 9, 2, 7, 10, 6, 3, 8, 1]] Test diagnostics for too few equations Gbig = Any[[3, 5], [4, 6], [1, 7, 9], [2, 8, 9]] EGbig = Any[[3, 5], [4, 6], [1, 7, 9], [2, 8, 9], [1, 5], [2, 6], [3, 7], [4, 8], [1, 2, 3, 4, 5, 6, 7, 8, 9]] 1: w: der(x) = w 2: z: der(y) = z 3: x: der(w) = T*x 4: y: der(z) = T*y - g 5: der(x): h(., der(.)) = 0 6: der(y): h(., der(.)) = 0 7: der(w): h(., der(.)) = 0 8: der(z): h(., der(.)) = 0 9: T: full(...) = 0 Unassigned variables: Unassigned equations: componentsBig = Any[Any[6, 2, 8, 4, 9, 7, 3, 5, 1]] Check consistency of equations by ModiaBase.matching extended equation set EG = Any[[3, 5], [4, 6], [1, 7, 9], [2, 8, 9], [1, 2], [1, 5], [2, 6], [3, 7], [4, 8]] assign = [5, 7, 1, 9, 6, 2, 8, 4, 3] Perform index reduction G = Any[[3, 5], [4, 6], [1, 7, 9], [2, 8, 9], [1, 2], [1, 2, 5, 6], [3, 5, 7, 10], [4, 6, 8, 11], [1, 2, 5, 6, 10, 11]] assign = [0, 0, 0, 0, 1, 2, 7, 4, 3, 9, 8] A = [5, 6, 7, 8, 10, 11, 0, 0, 0, 0, 0] B = [7, 8, 0, 0, 6, 9, 0, 0, 0] ------------------------------------------------------ vActive = Bool[0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1] assign = [0, 5, 0, 2, 1, 6, 7, 4, 3, 9, 8] components = Any[Any[1], Any[5], Any[6], Any[2], Any[4, 8, 9, 7, 3]] ------------------------------------------------------ Set initial conditions on x and y. Should fail. IG1 = Any[[3, 5], [4, 6], [1, 7, 9], [2, 8, 9], [1, 2], [1, 2, 5, 6], [3, 5, 7, 10], [4, 6, 8, 11], [1, 2, 5, 6, 10, 11], [1], [2]] assignIG1 = [10, 5, 1, 2, 6, 8, 3, 4, 0, 7, 9] componentsIG1 = Any[Any[10], Any[5], Any[4], Any[3], Any[7, 9, 2, 8, 6, 1], Any[11]] Unassigned variables: T Unassigned equations: initial Set initial conditions on x and w. IG2 = Any[[3, 5], [4, 6], [1, 7, 9], [2, 8, 9], [1, 2], [1, 2, 5, 6], [3, 5, 7, 10], [4, 6, 8, 11], [1, 2, 5, 6, 10, 11], [1], [3]] assignIG2 = [10, 5, 11, 2, 1, 6, 3, 8, 4, 7, 9] componentsIG2 = Any[Any[11], Any[1], Any[10], Any[5], Any[6], Any[2], Any[7, 9, 8, 4, 3]] Sorted IG2 equations: [assigned variable]: [differentiation] equation Strongly connected components are enclosed in [] 11: w: initial 1: der(x): der(x) = w 10: x: initial 5: y: 0 = x^2 + y^2 - L^2 6: der(y): DER( ) 2: z: der(y) = z [ 7: der2(x): DER( ) 9: der2(y): DER2( ) 8: der(z): DER( ) 4: T: der(z) = T*y - g 3: der(w): der(w) = T*x ] Set initial conditions on w and z. IG3 = Any[[3, 5], [4, 6], [1, 7, 9], [2, 8, 9], [1, 2], [1, 2, 5, 6], [3, 5, 7, 10], [4, 6, 8, 11], [1, 2, 5, 6, 10, 11], [3], [4]] assignIG3 = [6, 5, 10, 11, 1, 2, 3, 8, 4, 7, 9] componentsIG3 = Any[Any[10], Any[1], Any[11], Any[2], Any[5, 6], Any[7, 9, 8, 4, 3]] Sorted IG3 equations: [assigned variable]: [differentiation] equation Strongly connected components are enclosed in [] 10: w: initial 1: der(x): der(x) = w 11: z: initial 2: der(y): der(y) = z [ 5: y: 0 = x^2 + y^2 - L^2 6: x: DER( ) ] [ 7: der2(x): DER( ) 9: der2(y): DER2( ) 8: der(z): DER( ) 4: T: der(z) = T*y - g 3: der(w): der(w) = T*x ] Fixed-length pendulum Perform index reduction Set initial conditions on x and w. IG = Any[[3, 5], [4, 6], [1, 7, 9], [2, 8, 9], [1, 2], [1, 2, 5, 6], [3, 5, 7, 10], [4, 6, 8, 11], [1, 2, 5, 6, 10, 11], [1], [3]] assignIG = [10, 5, 11, 2, 1, 6, 3, 8, 4, 7, 9] componentsIG = Any[Any[11], Any[1], Any[10], Any[5], Any[6], Any[2], Any[7, 9, 8, 4, 3]] Exothermic Reactor Model assign = [0, 0, 1, 7, 3, 2, 8, 6] A = [3, 4, 7, 0, 8, 0, 0, 0] B = [6, 0, 7, 5, 8, 0, 0, 0] components = Any[Any[3], Any[1], Any[8], Any[6], Any[7], Any[2], Any[4], Any[5]] ---------------------- ---------------------- Big tests, n = 5000 Big test: diagonal 0.096284 seconds (71.46 k allocations: 2.216 MiB, 15.33% gc time) Big test: band 0.092449 seconds (107.89 k allocations: 2.662 MiB) Big test: full, n=1000 0.556997 seconds (4.80 M allocations: 103.911 MiB, 3.01% gc time) Test differentiate 10 : 0 10.0 : 0 time : 1 x : der(x) der(x) : der(der(x)) x.y.z : der(x.y.z) x = y : der(x) = der(y) +y : +(der(y)) x + y : der(x) + der(y) x + y + z : der(x) + der(y) + der(z) -y : -(der(y)) x - y : der(x) - der(y) (x - y) - z : (der(x) - der(y)) - der(z) x * y : der(x) * y + x * der(y) x * y * z : der(x) * y * z + x * der(y) * z + x * y * der(z) x / y : (one(x) / y) * der(x) + -((x / y) / y) * der(y) x ^ 2 : (2 * x ^ (2 - 1)) * der(x) x ^ y : (y * x ^ (y - 1)) * der(x) + if x isa Real && x <= 0 Base.oftype(float(x), NaN) else x ^ y * log(x) end * der(y) sin(x) : cos(x) * der(x) [x, y] : [der(x), der(y)] if x y else z end : if x der(y) else der(z) end if x y elseif z v else w end : if x der(y) elseif z der(v) else der(w) end 1 + 2 + 3 : 0 (1 - 2) - 3 : 0 (x - 2) - 3 : der(x) (1 - x) - 3 : -(der(x)) 2x + y + z : 2 * der(x) + der(y) + der(z) x + 5 + z = w : der(x) + der(z) = der(w) +x = w : +(der(x)) = der(w) 2 + 3 = w : 0 = der(w) -x = w : -(der(x)) = der(w) (x - 5) - z = w : der(x) - der(z) = der(w) (5 - x) - z = w : -(der(x)) - der(z) = der(w) 5x = w : 5 * der(x) = der(w) x * 5 * z = w : der(x) * 5 * z + x * 5 * der(z) = der(w) 4 * 5 * 6 = w : 0 = der(w) y = x / 5 : der(y) = (one(x) / 5) * der(x) y = 5 / y : der(y) = -((5 / y) / y) * der(y) y = [1, x] : der(y) = [0, der(x)] y = [2x 3x; 4x 5x] : der(y) = [2 * der(x) 3 * der(x); 4 * der(x) 5 * der(x)] y = [2x 3x; 4x 5x] * [1, x] : der(y) = [2 * der(x) 3 * der(x); 4 * der(x) 5 * der(x)] * [1, x] + [2x 3x; 4x 5x] * [0, der(x)] y = x[5, 6] : der(y) = (der(x))[5, 6] y = x[5:7] : der(y) = (der(x))[5:7] y = sin(x) : der(y) = cos(x) * der(x) y = cos(x) : der(y) = -(sin(x)) * der(x) y = exp(x) : der(y) = exp(x) * der(x) z = x ^ y : der(z) = (y * x ^ (y - 1)) * der(x) + if x isa Real && x <= 0 Base.oftype(float(x), NaN) else x ^ y * log(x) end * der(y) y = log(x) : der(y) = inv(x) * der(x) y = asin(x) : der(y) = inv(sqrt(1 - x ^ 2)) * der(x) y = acos(x) : der(y) = -(inv(sqrt(1 - x ^ 2))) * der(x) y = atan(x) : der(y) = inv(1 + x ^ 2) * der(x) y = if true x else y end : der(y) = if true der(x) else der(y) end y = time : der(y) = 1 y = a * x : der(y) = a * der(x) ... Test Tearing.jl ... Test LinearIntegerEquations.jl --- Test Voltage source and resistor without ground Variables that can be arbitrarily set and have been set to zero: 9: V.n.v = 0 Variables that have been eliminated: 6: V.v = R.v 2: R.p.v = R.v 4: R.n.v = 0 10: V.n.i = R.p.i 7: V.p.v = R.v 8: V.p.i = -R.p.i 5: R.n.i = -R.p.i Redundant equations that have been removed: 10 Remaining transformed linear Integer equations: none (all linear Integer equations are removed) --- Test Voltage source and resistor with ground Variables that have been eliminated: 6: V.v = R.v 12: ground.p.i = 0 5: R.n.i = -R.p.i 10: V.n.i = R.p.i 7: V.p.v = R.v 2: R.p.v = R.v 8: V.p.i = -R.p.i 9: V.n.v = 0 4: R.n.v = 0 11: ground.p.v = 0 Remaining transformed linear Integer equations: none (all linear Integer equations are removed) --- Test Voltage source and capacitor without ground Variables that can be arbitrarily set and have been set to zero: 9: V.n.v = 0 Variables that have been eliminated: 6: V.v = C.v 2: C.p.v = C.v 4: C.n.v = 0 10: V.n.i = C.p.i 7: V.p.v = C.v 8: V.p.i = -C.p.i 5: C.n.i = -C.p.i Redundant equations that have been removed: 10 Remaining transformed linear Integer equations: none (all linear Integer equations are removed) --- Test two inductances in series with parallel resistors without ground +++ Remove singularities Linear Integer equations: 1: 0 = -L1.v + L1.p.v - L1.n.v 2: 0 = L1.p.i + L1.n.i 4: 0 = -L2.v + L2.p.v - L2.n.v 5: 0 = L2.p.i + L2.n.i 7: 0 = -R1.v + R1.p.v - R1.n.v 8: 0 = R1.p.i + R1.n.i 10: 0 = -R2.v + R2.p.v - R2.n.v 11: 0 = R2.p.i + R2.n.i 13: 0 = -V.v + V.p.v - V.n.v 14: 0 = V.p.i + V.n.i 16: 0 = -V.p.v + L1.p.v 17: 0 = V.p.i + L1.p.i 18: 0 = -L1.n.v + R1.p.v 19: 0 = -L1.n.v + R2.p.v 20: 0 = L1.n.i + R1.p.i + R2.p.i 21: 0 = -R1.n.v + L2.p.v 22: 0 = -R2.n.v + L2.p.v 23: 0 = R1.n.i + R2.n.i + L2.p.i 24: 0 = -L2.n.v + V.n.v 25: 0 = L2.n.i + V.n.i Unknown variables: 1: L1.v 2: L1.p.v (to be solved by equations) 4: L1.n.v (to be solved by equations) 3: L1.p.i (potential state) 5: L1.n.i (to be solved by equations) 6: L2.v 7: L2.p.v (to be solved by equations) 9: L2.n.v (to be solved by equations) 8: L2.p.i (potential state) 10: L2.n.i (to be solved by equations) 11: R1.v 12: R1.p.v (to be solved by equations) 14: R1.n.v (to be solved by equations) 13: R1.p.i 15: R1.n.i (to be solved by equations) 16: R2.v 17: R2.p.v (to be solved by equations) 19: R2.n.v (to be solved by equations) 18: R2.p.i 20: R2.n.i (to be solved by equations) 21: V.v 22: V.p.v (to be solved by equations) 24: V.n.v (to be solved by equations) 23: V.p.i (to be solved by equations) 25: V.n.i (to be solved by equations) After first transformation to trapezoidal form (eliminate variables that must be solved): 2: 0 = L1.n.i + L1.p.i 5: 0 = L2.n.i + L2.p.i 8: 0 = R1.n.i + R1.p.i 11: 0 = R2.n.i + R2.p.i 14: 0 = V.p.i + V.n.i 16: 0 = -V.p.v + L1.p.v 17: 0 = -V.n.i + L1.p.i 18: 0 = -L1.n.v + R1.p.v 19: 0 = R2.p.v - R1.p.v 21: 0 = -R1.n.v + L2.p.v 22: 0 = -R2.n.v + L2.p.v 24: 0 = -L2.n.v + V.n.v 1: 0 = L1.p.v - L1.v - R1.p.v 13: 0 = -V.n.v - V.v + L1.v + R1.p.v 7: 0 = -R1.p.v + R1.v + L2.p.v ---------- rk1 20: 0 = R1.p.i + R2.p.i - L1.p.i 4: 0 = L2.v - V.v + L1.v + R1.v 23: 0 = L2.p.i - R1.p.i - R2.p.i 10: 0 = R2.v - R1.v 25: 0 = -L2.p.i + L1.p.i After second transformation to trapezoidal form (ignore potential states): 2: 0 = L1.n.i + L1.p.i 5: 0 = L2.n.i + L2.p.i 8: 0 = R1.n.i + R1.p.i 11: 0 = R2.n.i + R2.p.i 14: 0 = V.p.i + V.n.i 16: 0 = -V.p.v + L1.p.v 17: 0 = -V.n.i + L1.p.i 18: 0 = -L1.n.v + R1.p.v 19: 0 = R2.p.v - R1.p.v 21: 0 = -R1.n.v + L2.p.v 22: 0 = -R2.n.v + L2.p.v 24: 0 = -L2.n.v + V.n.v 1: 0 = L1.p.v - L1.v - R1.p.v 13: 0 = -V.n.v - V.v + L1.v + R1.p.v 7: 0 = -R1.p.v + R1.v + L2.p.v ---------- rk1 10: 0 = R2.v - R1.v 4: 0 = L2.v - V.v + L1.v + R1.v 23: 0 = -R1.p.i + L2.p.i - R2.p.i ---------- rk2 20: 0 = L1.p.i - L2.p.i 25: 0 = -L2.p.i + L1.p.i After third transformation to trapezoidal form (eliminate potential states): 2: 0 = L1.n.i + L1.p.i 5: 0 = L2.n.i + L2.p.i 8: 0 = R1.n.i + R1.p.i 11: 0 = R2.n.i + R2.p.i 14: 0 = V.p.i + V.n.i 16: 0 = -V.p.v + L1.p.v 17: 0 = -V.n.i + L1.p.i 18: 0 = -L1.n.v + R1.p.v 19: 0 = R2.p.v - R1.p.v 21: 0 = -R1.n.v + L2.p.v 22: 0 = -R2.n.v + L2.p.v 24: 0 = -L2.n.v + V.n.v 1: 0 = L1.p.v - L1.v - R1.p.v 13: 0 = -V.n.v - V.v + L1.v + R1.p.v 7: 0 = -R1.p.v + R1.v + L2.p.v ---------- rk1 10: 0 = R2.v - R1.v 4: 0 = L2.v - V.v + L1.v + R1.v 23: 0 = -R1.p.i + L2.p.i - R2.p.i ---------- rk2 20: 0 = L1.p.i - L2.p.i ---------- rk3 After alias elimination: 1: 0 = L1.p.v - L1.v - R1.v 13: 0 = -V.n.v - V.v + L1.v + R1.v ---------- rk1 4: 0 = L2.v - V.v + L1.v + R1.v 23: 0 = -R1.p.i + L2.p.i - R2.p.i ---------- rk2 20: 0 = L1.p.i - L2.p.i ---------- rk3 Final, simplified equations: 1: 0 = L1.p.v - L1.v - R1.v 13: 0 = -V.v - L1.p.v + V.n.v ---------- rk1 23: 0 = -R1.p.i + L2.p.i - R2.p.i ---------- rk2 20: 0 = L1.p.i - L2.p.i ---------- rk3 Variables that can be arbitrarily set and have been set to zero: 7: L2.p.v = 0 Variables that have been eliminated: 16: R2.v = R1.v 12: R1.p.v = R1.v 9: L2.n.v = V.n.v 19: R2.n.v = 0 14: R1.n.v = 0 17: R2.p.v = R1.v 4: L1.n.v = R1.v 25: V.n.i = L1.p.i 22: V.p.v = L1.p.v 23: V.p.i = -L1.p.i 20: R2.n.i = -R2.p.i 15: R1.n.i = -R1.p.i 10: L2.n.i = -L2.p.i 5: L1.n.i = -L1.p.i 6: L2.v = -V.n.v Redundant equations that have been removed: 25 Remaining transformed linear Integer equations: 1: 0 = L1.p.v - L1.v - R1.v 13: 0 = -V.v + L1.p.v - V.n.v 23: 0 = -R1.p.i + L2.p.i - R2.p.i 20: 0 = L1.p.i - L2.p.i ... Test NonlinearEquations.jl Linear problem: Solver converged. Chebyquad problem n = 2: Solver converged. Chebyquad problem n = 3: Solver converged. Chebyquad problem n = 4: Solver converged. Chebyquad problem n = 5: Solver converged. Chebyquad problem n = 7: Solver converged. 2by2 problem 1: Solver converged. 2by2 problem 2: Solver converged. MINPACK Powell singular problem: Solver converged. MINPACK Powell badly scaled problem: Solver converged. MINPACK Wood problem: Solver converged. MINPACK helical valey problem: Solver converged. MINPACK Watson problem n = 6: Solver converged. MINPACK Watson problem n = 9: Solver converged. Determined Rosenbrock problem: Solver converged. Underdeterminded Rosenbrock problem: Solver converged. Slider-crank initial state problem 1: Solver converged. Slider-crank initial state problem 2: Solver converged. Test Summary: | Pass Total Time Test ModiaBase | 199 199 6m28.0s Testing ModiaBase tests passed Testing completed after 394.86s PkgEval succeeded after 493.81s