Package evaluation of SymbolicControlSystems on Julia 1.13.0-DEV.974 (7bbb213719*) started at 2025-08-15T00:22:21.948 ################################################################################ # Set-up # Installing PkgEval dependencies (TestEnv)... Set-up completed after 10.61s ################################################################################ # Installation # Installing SymbolicControlSystems... Resolving package versions... Installed Conda ── v1.10.2 Installed PyCall ─ v1.96.4 Updating `~/.julia/environments/v1.13/Project.toml` [886cb795] + SymbolicControlSystems v0.3.1 Updating `~/.julia/environments/v1.13/Manifest.toml` [47edcb42] + ADTypes v1.17.0 [1520ce14] + AbstractTrees v0.4.5 [7d9f7c33] + Accessors v0.1.42 [79e6a3ab] + Adapt v4.3.0 [66dad0bd] + AliasTables v1.1.3 [4fba245c] + ArrayInterface v7.19.0 [e2ed5e7c] + Bijections v0.2.2 [d360d2e6] + ChainRulesCore v1.26.0 [861a8166] + Combinatorics v1.0.3 [3709ef60] + CommonEq v0.2.1 [38540f10] + CommonSolve v0.2.4 [bbf7d656] + CommonSubexpressions v0.3.1 [f70d9fcc] + CommonWorldInvalidations v1.0.0 [34da2185] + Compat v4.18.0 [b152e2b5] + CompositeTypes v0.1.4 [a33af91c] + CompositionsBase v0.1.2 [8f4d0f93] + Conda v1.10.2 [187b0558] + ConstructionBase v1.6.0 [aaaaaaaa] + ControlSystemsBase v1.18.2 [9a962f9c] + DataAPI v1.16.0 ⌅ [864edb3b] + DataStructures v0.18.22 [163ba53b] + DiffResults v1.1.0 [b552c78f] + DiffRules v1.15.1 [31c24e10] + Distributions v0.25.120 [ffbed154] + DocStringExtensions v0.9.5 [5b8099bc] + DomainSets v0.7.16 [7c1d4256] + DynamicPolynomials v0.6.2 [4e289a0a] + EnumX v1.0.5 [e2ba6199] + ExprTools v0.1.10 [55351af7] + ExproniconLite v0.10.14 [1a297f60] + FillArrays v1.13.0 [1fa38f19] + Format v1.3.7 [f6369f11] + ForwardDiff v1.0.1 [069b7b12] + FunctionWrappers v1.1.3 [77dc65aa] + FunctionWrappersWrappers v0.1.3 [46192b85] + GPUArraysCore v0.2.0 [e91730f6] + Hungarian v0.7.0 [34004b35] + HypergeometricFunctions v0.3.28 [18e54dd8] + IntegerMathUtils v0.1.3 [8197267c] + IntervalSets v0.7.11 [3587e190] + InverseFunctions v0.1.17 [92d709cd] + IrrationalConstants v0.2.4 [82899510] + IteratorInterfaceExtensions v1.0.0 [692b3bcd] + JLLWrappers v1.7.1 [682c06a0] + JSON v0.21.4 [ae98c720] + Jieko v0.2.1 [b964fa9f] + LaTeXStrings v1.4.0 [23fbe1c1] + Latexify v0.16.9 [7a12625a] + LinearMaps v3.11.4 [2ab3a3ac] + LogExpFunctions v0.3.29 [1914dd2f] + MacroTools v0.5.16 [99c1a7ee] + MatrixEquations v2.5.4 [48965c70] + MatrixPencils v1.8.7 [e1d29d7a] + Missings v1.2.0 [2e0e35c7] + Moshi v0.3.7 [102ac46a] + MultivariatePolynomials v0.5.9 [d8a4904e] + MutableArithmetics v1.6.4 [77ba4419] + NaNMath v1.1.3 [6fe1bfb0] + OffsetArrays v1.17.0 [bac558e1] + OrderedCollections v1.8.1 [90014a1f] + PDMats v0.11.35 [69de0a69] + Parsers v2.8.3 [f27b6e38] + Polynomials v4.1.0 [aea7be01] + PrecompileTools v1.3.2 [21216c6a] + Preferences v1.5.0 [27ebfcd6] + Primes v0.5.7 [43287f4e] + PtrArrays v1.3.0 [438e738f] + PyCall v1.96.4 [1fd47b50] + QuadGK v2.11.2 [3cdcf5f2] + RecipesBase v1.3.4 [731186ca] + RecursiveArrayTools v3.37.0 [189a3867] + Reexport v1.2.2 [ae029012] + Requires v1.3.1 [79098fc4] + Rmath v0.8.0 [7e49a35a] + RuntimeGeneratedFunctions v0.5.15 [0bca4576] + SciMLBase v2.110.0 [c0aeaf25] + SciMLOperators v1.5.0 [431bcebd] + SciMLPublic v1.0.0 [53ae85a6] + SciMLStructures v1.7.0 [efcf1570] + Setfield v1.1.2 [a2af1166] + SortingAlgorithms v1.2.2 [276daf66] + SpecialFunctions v2.5.1 [90137ffa] + StaticArrays v1.9.14 [1e83bf80] + StaticArraysCore v1.4.3 [10745b16] + Statistics v1.11.1 [82ae8749] + StatsAPI v1.7.1 [2913bbd2] + StatsBase v0.34.6 [4c63d2b9] + StatsFuns v1.5.0 [24249f21] + SymPy v2.3.3 [458b697b] + SymPyCore v0.3.2 [886cb795] + SymbolicControlSystems v0.3.1 [2efcf032] + SymbolicIndexingInterface v0.3.43 [19f23fe9] + SymbolicLimits v0.2.2 [d1185830] + SymbolicUtils v3.31.0 [0c5d862f] + Symbolics v6.51.0 [ed4db957] + TaskLocalValues v0.1.3 [8ea1fca8] + TermInterface v2.0.0 [a759f4b9] + TimerOutputs v0.5.29 [a7c27f48] + Unityper v0.1.6 [81def892] + VersionParsing v1.3.0 [efe28fd5] + OpenSpecFun_jll v0.5.6+0 [f50d1b31] + Rmath_jll v0.5.1+0 [0dad84c5] + ArgTools v1.1.2 [56f22d72] + Artifacts v1.11.0 [2a0f44e3] + Base64 v1.11.0 [ade2ca70] + Dates v1.11.0 [8ba89e20] + Distributed v1.11.0 [f43a241f] + Downloads v1.7.0 [7b1f6079] + FileWatching v1.11.0 [9fa8497b] + Future v1.11.0 [b77e0a4c] + InteractiveUtils v1.11.0 [ac6e5ff7] + JuliaSyntaxHighlighting v1.12.0 [b27032c2] + LibCURL v0.6.4 [8f399da3] + Libdl v1.11.0 [37e2e46d] + LinearAlgebra v1.13.0 [56ddb016] + Logging v1.11.0 [d6f4376e] + Markdown v1.11.0 [a63ad114] + Mmap v1.11.0 [ca575930] + NetworkOptions v1.3.0 [de0858da] + Printf v1.11.0 [9a3f8284] + Random v1.11.0 [ea8e919c] + SHA v0.7.0 [9e88b42a] + Serialization v1.11.0 [6462fe0b] + Sockets v1.11.0 [2f01184e] + SparseArrays v1.13.0 [f489334b] + StyledStrings 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.3.0+1 [deac9b47] + LibCURL_jll v8.15.0+1 [29816b5a] + LibSSH2_jll v1.11.3+1 [14a3606d] + MozillaCACerts_jll v2025.7.15 [4536629a] + OpenBLAS_jll v0.3.29+0 [05823500] + OpenLibm_jll v0.8.5+0 [458c3c95] + OpenSSL_jll v3.5.2+0 [bea87d4a] + SuiteSparse_jll v7.10.1+0 [83775a58] + Zlib_jll v1.3.1+2 [3161d3a3] + Zstd_jll v1.5.7+1 [8e850b90] + libblastrampoline_jll v5.13.1+0 [8e850ede] + nghttp2_jll v1.65.0+0 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m` Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/b19db3927f0db4151cb86d073689f2428e524576/build.log` Building PyCall → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/9816a3826b0ebf49ab4926e2b18842ad8b5c8f04/build.log` Installation completed after 64.67s ################################################################################ # Precompilation # Precompiling PkgEval dependencies... Precompiling package dependencies... Precompilation completed after 115.19s ################################################################################ # Testing # Testing SymbolicControlSystems Status `/tmp/jl_zdQ9eb/Project.toml` [aaaaaaaa] ControlSystemsBase v1.18.2 [23fbe1c1] Latexify v0.16.9 [24249f21] SymPy v2.3.3 [886cb795] SymbolicControlSystems v0.3.1 [d1185830] SymbolicUtils v3.31.0 [0c5d862f] Symbolics v6.51.0 [b77e0a4c] InteractiveUtils v1.11.0 [37e2e46d] LinearAlgebra v1.13.0 [8dfed614] Test v1.11.0 Status `/tmp/jl_zdQ9eb/Manifest.toml` [47edcb42] ADTypes v1.17.0 [1520ce14] AbstractTrees v0.4.5 [7d9f7c33] Accessors v0.1.42 [79e6a3ab] Adapt v4.3.0 [66dad0bd] AliasTables v1.1.3 [4fba245c] ArrayInterface v7.19.0 [e2ed5e7c] Bijections v0.2.2 [d360d2e6] ChainRulesCore v1.26.0 [861a8166] Combinatorics v1.0.3 [3709ef60] CommonEq v0.2.1 [38540f10] CommonSolve v0.2.4 [bbf7d656] CommonSubexpressions v0.3.1 [f70d9fcc] CommonWorldInvalidations v1.0.0 [34da2185] Compat v4.18.0 [b152e2b5] CompositeTypes v0.1.4 [a33af91c] CompositionsBase v0.1.2 [8f4d0f93] Conda v1.10.2 [187b0558] ConstructionBase v1.6.0 [aaaaaaaa] ControlSystemsBase v1.18.2 [9a962f9c] DataAPI v1.16.0 ⌅ [864edb3b] DataStructures v0.18.22 [163ba53b] DiffResults v1.1.0 [b552c78f] DiffRules v1.15.1 [31c24e10] Distributions v0.25.120 [ffbed154] DocStringExtensions v0.9.5 [5b8099bc] DomainSets v0.7.16 [7c1d4256] DynamicPolynomials v0.6.2 [4e289a0a] EnumX v1.0.5 [e2ba6199] ExprTools v0.1.10 [55351af7] ExproniconLite v0.10.14 [1a297f60] FillArrays v1.13.0 [1fa38f19] Format v1.3.7 [f6369f11] ForwardDiff v1.0.1 [069b7b12] FunctionWrappers v1.1.3 [77dc65aa] FunctionWrappersWrappers v0.1.3 [46192b85] GPUArraysCore v0.2.0 [e91730f6] Hungarian v0.7.0 [34004b35] HypergeometricFunctions v0.3.28 [18e54dd8] IntegerMathUtils v0.1.3 [8197267c] IntervalSets v0.7.11 [3587e190] InverseFunctions v0.1.17 [92d709cd] IrrationalConstants v0.2.4 [82899510] IteratorInterfaceExtensions v1.0.0 [692b3bcd] JLLWrappers v1.7.1 [682c06a0] JSON v0.21.4 [ae98c720] Jieko v0.2.1 [b964fa9f] LaTeXStrings v1.4.0 [23fbe1c1] Latexify v0.16.9 [7a12625a] LinearMaps v3.11.4 [2ab3a3ac] LogExpFunctions v0.3.29 [1914dd2f] MacroTools v0.5.16 [99c1a7ee] MatrixEquations v2.5.4 [48965c70] MatrixPencils v1.8.7 [e1d29d7a] Missings v1.2.0 [2e0e35c7] Moshi v0.3.7 [102ac46a] MultivariatePolynomials v0.5.9 [d8a4904e] MutableArithmetics v1.6.4 [77ba4419] NaNMath v1.1.3 [6fe1bfb0] OffsetArrays v1.17.0 [bac558e1] OrderedCollections v1.8.1 [90014a1f] PDMats v0.11.35 [69de0a69] Parsers v2.8.3 [f27b6e38] Polynomials v4.1.0 [aea7be01] PrecompileTools v1.3.2 [21216c6a] Preferences v1.5.0 [27ebfcd6] Primes v0.5.7 [43287f4e] PtrArrays v1.3.0 [438e738f] PyCall v1.96.4 [1fd47b50] QuadGK v2.11.2 [3cdcf5f2] RecipesBase v1.3.4 [731186ca] RecursiveArrayTools v3.37.0 [189a3867] Reexport v1.2.2 [ae029012] Requires v1.3.1 [79098fc4] Rmath v0.8.0 [7e49a35a] RuntimeGeneratedFunctions v0.5.15 [0bca4576] SciMLBase v2.110.0 [c0aeaf25] SciMLOperators v1.5.0 [431bcebd] SciMLPublic v1.0.0 [53ae85a6] SciMLStructures v1.7.0 [efcf1570] Setfield v1.1.2 [a2af1166] SortingAlgorithms v1.2.2 [276daf66] SpecialFunctions v2.5.1 [90137ffa] StaticArrays v1.9.14 [1e83bf80] StaticArraysCore v1.4.3 [10745b16] Statistics v1.11.1 [82ae8749] StatsAPI v1.7.1 [2913bbd2] StatsBase v0.34.6 [4c63d2b9] StatsFuns v1.5.0 [24249f21] SymPy v2.3.3 [458b697b] SymPyCore v0.3.2 [886cb795] SymbolicControlSystems v0.3.1 [2efcf032] SymbolicIndexingInterface v0.3.43 [19f23fe9] SymbolicLimits v0.2.2 [d1185830] SymbolicUtils v3.31.0 [0c5d862f] Symbolics v6.51.0 [ed4db957] TaskLocalValues v0.1.3 [8ea1fca8] TermInterface v2.0.0 [a759f4b9] TimerOutputs v0.5.29 [a7c27f48] Unityper v0.1.6 [81def892] VersionParsing v1.3.0 [efe28fd5] OpenSpecFun_jll v0.5.6+0 [f50d1b31] Rmath_jll v0.5.1+0 [0dad84c5] ArgTools v1.1.2 [56f22d72] Artifacts v1.11.0 [2a0f44e3] Base64 v1.11.0 [ade2ca70] Dates v1.11.0 [8ba89e20] Distributed v1.11.0 [f43a241f] Downloads v1.7.0 [7b1f6079] FileWatching v1.11.0 [9fa8497b] Future v1.11.0 [b77e0a4c] InteractiveUtils v1.11.0 [ac6e5ff7] JuliaSyntaxHighlighting v1.12.0 [b27032c2] LibCURL v0.6.4 [8f399da3] Libdl v1.11.0 [37e2e46d] LinearAlgebra v1.13.0 [56ddb016] Logging v1.11.0 [d6f4376e] Markdown v1.11.0 [a63ad114] Mmap v1.11.0 [ca575930] NetworkOptions v1.3.0 [de0858da] Printf v1.11.0 [9a3f8284] Random v1.11.0 [ea8e919c] SHA v0.7.0 [9e88b42a] Serialization v1.11.0 [6462fe0b] Sockets v1.11.0 [2f01184e] SparseArrays v1.13.0 [f489334b] StyledStrings 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.3.0+1 [deac9b47] LibCURL_jll v8.15.0+1 [29816b5a] LibSSH2_jll v1.11.3+1 [14a3606d] MozillaCACerts_jll v2025.7.15 [4536629a] OpenBLAS_jll v0.3.29+0 [05823500] OpenLibm_jll v0.8.5+0 [458c3c95] OpenSSL_jll v3.5.2+0 [bea87d4a] SuiteSparse_jll v7.10.1+0 [83775a58] Zlib_jll v1.3.1+2 [3161d3a3] Zstd_jll v1.5.7+1 [8e850b90] libblastrampoline_jll v5.13.1+0 [8e850ede] nghttp2_jll v1.65.0+0 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. Testing Running tests... Precompiling packages... 9117.0 ms ✓ SymPyCore 13151.5 ms ✓ SymPy 2 dependencies successfully precompiled in 23 seconds. 47 already precompiled. Precompiling packages... 56379.1 ms ✓ SymbolicUtils 9790.9 ms ✓ SymbolicLimits 170474.4 ms ✓ Symbolics 3 dependencies successfully precompiled in 243 seconds. 143 already precompiled. Precompiling packages... 5891.1 ms ✓ Polynomials → PolynomialsMutableArithmeticsExt 1 dependency successfully precompiled in 6 seconds. 28 already precompiled. Precompiling packages... 3905.9 ms ✓ Polynomials → PolynomialsChainRulesCoreExt 1 dependency successfully precompiled in 4 seconds. 24 already precompiled. Precompiling packages... 10314.6 ms ✓ SymPyCore → SymPyCoreSymbolicUtilsExt 1 dependency successfully precompiled in 11 seconds. 84 already precompiled. Precompiling packages... 2533.3 ms ✓ RecursiveArrayTools → RecursiveArrayToolsForwardDiffExt 1 dependency successfully precompiled in 3 seconds. 43 already precompiled. Precompiling packages... 7290.7 ms ✓ SciMLBase → SciMLBasePyCallExt 1 dependency successfully precompiled in 8 seconds. 69 already precompiled. Precompiling packages... 21016.5 ms ✓ Symbolics → SymbolicsSymPyExt 1 dependency successfully precompiled in 26 seconds. 168 already precompiled. Precompiling packages... 21165.8 ms ✓ Symbolics → SymbolicsForwardDiffExt 1 dependency successfully precompiled in 26 seconds. 151 already precompiled. [ Info: Testing To symbolic [ Info: SymPy: Testing Sym -> tf and vice versa [ Info: Testing sym2num [ Info: Testing Tustin and C-code [ Info: Perforing pole-zero cancellation (this might take a while) 0.010636 seconds (30 allocations: 608 bytes) 0.006092 seconds (15 allocations: 416 bytes) [ Info: Calling free_symbols [ Info: Set(Sym{PyCall.PyObject}[c, J, z]) [ Info: Finding common subexpressions [ Info: Writing numerator term 1/1 [ Info: Writing numerator term 2/1 [ Info: Writing numerator term 3/1 [ Info: Writing denominator term 1/2 [ Info: Writing denominator term 2/2 #include #include double transfer_function(double ui, double J, double c) { static double u[3] = {0}; static double y[3] = {0}; int i; for (i=2; i > 0; --i) { u[i] = u[i-1]; } u[0] = ui; for (i=2; i > 0; --i) { y[i] = y[i-1]; } y[0] = 0; double x0 = 20.0*c; double x1 = pow(J, 2); double x2 = 400.0*x1 + 1.0; double x3 = 1.0/(x0 + x2); double x4 = 1.0*x3; y[0] += (x4)*u[0]; y[0] += (2.0*x3)*u[1]; y[0] += (x4)*u[2]; y[0] += (-x3*(2.0 - 800.0*x1))*y[1]; y[0] += (-x3*(-x0 + x2))*y[2]; return y[0]; } #include #include void transfer_function(double *y, double u, double J, double c) { static double x[2] = {0}; // Current state double xp[2] = {0}; // Next state int i; // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (u - x[0]*(400.0*pow(J, 2) - 20.0*c + 1.0)/(400.0*pow(J, 2) + 20.0*c + 1.0) - x[1]*(2.0 - 800.0*pow(J, 2))/(400.0*pow(J, 2) + 20.0*c + 1.0)); // Accumulate the output y = C*x + D*u y[0] = (1.0*u/(400.0*pow(J, 2) + 20.0*c + 1.0) + x[0]*(-1.0*(400.0*pow(J, 2) - 20.0*c + 1.0)/pow(400.0*pow(J, 2) + 20.0*c + 1.0, 2) + 1.0/(400.0*pow(J, 2) + 20.0*c + 1.0)) + x[1]*(-1.0*(2.0 - 800.0*pow(J, 2))/pow(400.0*pow(J, 2) + 20.0*c + 1.0, 2) + 2.0/(400.0*pow(J, 2) + 20.0*c + 1.0))); // Make the predicted state the current state for (i=0; i < 2; ++i) { x[i] = xp[i]; } } [ Info: Finding common subexpressions #include #include void transfer_function(double *y, double u, double J, double c) { static double x[2] = {0}; // Current state double xp[2] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x double x0 = pow(J, 2); double x1 = 2.0 - 800.0*x0; double x2 = 20.0*c; double x3 = 400.0*x0 + 1.0; double x4 = x2 + x3; double x5 = 1.0/x4; double x6 = -x2 + x3; double x7 = 1.0/pow(x4, 2); // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (u - x1*x5*x[1] - x5*x6*x[0]); // Accumulate the output y = C*x + D*u y[0] = (1.0*u*x5 + x[0]*(1.0*x5 - x6*x7) + x[1]*(-x1*x7 + 2.0*x5)); // Make the predicted state the current state for (i=0; i < 2; ++i) { x[i] = xp[i]; } } [ Info: Perforing pole-zero cancellation (this might take a while) 0.016783 seconds (23 allocations: 440 bytes) 0.015682 seconds (15 allocations: 416 bytes) [ Info: Calling free_symbols [ Info: Set(Sym{PyCall.PyObject}[T, d, w, z]) [ Info: Finding common subexpressions [ Info: Writing numerator term 1/1 [ Info: Writing numerator term 2/1 [ Info: Writing numerator term 3/1 [ Info: Writing numerator term 4/1 [ Info: Writing denominator term 1/3 [ Info: Writing denominator term 2/3 [ Info: Writing denominator term 3/3 #include #include double transfer_function(double ui, double T, double d, double w) { static double u[4] = {0}; static double y[4] = {0}; int i; for (i=3; i > 0; --i) { u[i] = u[i-1]; } u[0] = ui; for (i=3; i > 0; --i) { y[i] = y[i-1]; } y[0] = 0; double x0 = 8000000.0*T; double x1 = pow(w, 2); double x2 = 1.0*x1; double x3 = d*w; double x4 = 80000.0*T*x3 + 40000.0; double x5 = x2 + x4; double x6 = 200.0*T*x1; double x7 = 400.0*x3; double x8 = x6 + x7; double x9 = 1.0/(x0 + x5 + x8); double x10 = x2*x9; double x11 = 3.0*x1*x9; double x12 = 24000000.0*T; double x13 = -3.0*x1 + x4; double x14 = -x6 - x7; y[0] += (x10)*u[0]; y[0] += (x11)*u[1]; y[0] += (x11)*u[2]; y[0] += (x10)*u[3]; y[0] += (-x9*(-x12 - x13 - x14))*y[1]; y[0] += (-x9*(x12 - x13 - x8))*y[2]; y[0] += (-x9*(-x0 + x14 + x5))*y[3]; return y[0]; } [ Info: Finding common subexpressions #include #include void transfer_function(double *y, double u, double T, double d, double w) { static double x[3] = {0}; // Current state double xp[3] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x double x0 = 8000000.0*T; double x1 = pow(w, 2); double x2 = 1.0*x1; double x3 = d*w; double x4 = 80000.0*T*x3 + 40000.0; double x5 = x2 + x4; double x6 = 200.0*T*x1; double x7 = 400.0*x3; double x8 = -x6 - x7; double x9 = -x0 + x5 + x8; double x10 = x6 + x7; double x11 = x0 + x10 + x5; double x12 = 1.0/x11; double x13 = 24000000.0*T; double x14 = -3.0*x1 + x4; double x15 = -x10 + x13 - x14; double x16 = -x13 - x14 - x8; double x17 = x2/pow(x11, 2); double x18 = -3.0*x1*x12; // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (x[2]); xp[2] = (u - x12*x15*x[1] - x12*x16*x[2] - x12*x9*x[0]); // Accumulate the output y = C*x + D*u y[0] = (u*x12*x2 + x[0]*(1.0*x1*x12 - x17*x9) + x[1]*(-x15*x17 - x18) + x[2]*(-x16*x17 - x18)); // Make the predicted state the current state for (i=0; i < 3; ++i) { x[i] = xp[i]; } } [ Info: Perforing pole-zero cancellation (this might take a while) 0.016898 seconds (24 allocations: 488 bytes) 0.014561 seconds (15 allocations: 416 bytes) [ Info: Finding common subexpressions #include #include void transfer_function(double *y, double *u, double T, double d, double w) { static double x[6] = {0}; // Current state double xp[6] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x double x0 = 8000000.0*T; double x1 = pow(w, 2); double x2 = 1.0*x1; double x3 = d*w; double x4 = 80000.0*T*x3 + 40000.0; double x5 = x2 + x4; double x6 = 200.0*T*x1; double x7 = 400.0*x3; double x8 = x6 + x7; double x9 = x0 + x5 + x8; double x10 = 1.0/x9; double x11 = -x6 - x7; double x12 = -x0 + x11 + x5; double x13 = x10*x12; double x14 = 24000000.0*T; double x15 = -3.0*x1 + x4; double x16 = x14 - x15 - x8; double x17 = x10*x16; double x18 = -x11 - x14 - x15; double x19 = x10*x18; double x20 = pow(x9, -2); double x21 = x2*x20; double x22 = -3.0*x1*x10; double x23 = 2.0*x1*x20; double x24 = -6.0*x1*x10; // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (x[2]); xp[2] = (u[0] - x13*x[0] - x17*x[1] - x19*x[2]); xp[3] = (x[4]); xp[4] = (x[5]); xp[5] = (u[1] - x13*x[3] - x17*x[4] - x19*x[5]); // Accumulate the output y = C*x + D*u y[0] = (u[0]*x10*x2 + 2.0*u[1]*x1*x10 + x[0]*(1.0*x1*x10 - x12*x21) + x[1]*(-x16*x21 - x22) + x[2]*(-x18*x21 - x22) + x[3]*(2.0*x1*x10 - x12*x23) + x[4]*(-x16*x23 - x24) + x[5]*(-x18*x23 - x24)); // Make the predicted state the current state for (i=0; i < 6; ++i) { x[i] = xp[i]; } } [ Info: Perforing pole-zero cancellation (this might take a while) 0.011407 seconds (14 allocations: 320 bytes) 0.006132 seconds (15 allocations: 416 bytes) [ Info: Calling free_symbols [ Info: Set(Sym{PyCall.PyObject}[z]) [ Info: Finding common subexpressions [ Info: Writing numerator term 1/1 [ Info: Writing numerator term 2/1 [ Info: Writing numerator term 3/1 [ Info: Writing denominator term 1/2 [ Info: Writing denominator term 2/2 #include #include double transfer_function(double ui) { static double u[3] = {0}; static double y[3] = {0}; int i; for (i=2; i > 0; --i) { u[i] = u[i-1]; } u[0] = ui; for (i=2; i > 0; --i) { y[i] = y[i-1]; } y[0] = 0; y[0] += (0.00061690314620604567)*u[0]; y[0] += (0.0012338062924120913)*u[1]; y[0] += (0.00061690314620604567)*u[2]; y[0] += (1.9728562615669341)*y[1]; y[0] += (-0.97532387415175814)*y[2]; return y[0]; } #include #include void transfer_function(double *y, double u) { static double x[2] = {0}; // Current state double xp[2] = {0}; // Next state int i; // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (u - 0.97532387415175814*x[0] + 1.9728562615669341*x[1]); // Accumulate the output y = C*x + D*u y[0] = (0.00061690314620604567*u + 1.5222779671956728e-5*x[0] + 0.0024508675271850302*x[1]); // Make the predicted state the current state for (i=0; i < 2; ++i) { x[i] = xp[i]; } } [ Info: Finding common subexpressions #include #include void transfer_function(double *y, double u) { static double x[2] = {0}; // Current state double xp[2] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (u - 0.97532387415175814*x[0] + 1.9728562615669341*x[1]); // Accumulate the output y = C*x + D*u y[0] = (0.00061690314620604567*u + 1.5222779671956728e-5*x[0] + 0.0024508675271850302*x[1]); // Make the predicted state the current state for (i=0; i < 2; ++i) { x[i] = xp[i]; } } [ Info: Finding common subexpressions #include #include void transfer_function(double *y, double u) { static double x[4] = {0}; // Current state double xp[4] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x // Advance the state xp = Ax + Bu xp[0] = (0.098704503392967324*u + 0.97409006785934615*x[0] - 0.049352251696483655*x[1]); xp[1] = (0.0024676125848241831*u + 0.049352251696483655*x[0] + 0.99876619370758779*x[1]); xp[2] = (0.095011876484560567*u + 0.90023752969121129*x[2] - 0.095011876484560567*x[3]); xp[3] = (0.0047505938242280287*u + 0.095011876484560567*x[2] + 0.99524940617577196*x[3]); // Accumulate the output y = C*x + D*u y[0] = (0.00061690314620604578*u + 0.012338062924120914*x[0] + 0.49969154842689695*x[1]); y[1] = (0.0023752969121140144*u + 0.047505938242280284*x[2] + 0.99762470308788598*x[3]); // Make the predicted state the current state for (i=0; i < 4; ++i) { x[i] = xp[i]; } } [ Info: Testing Non-static C-code [ Info: Perforing pole-zero cancellation (this might take a while) 0.013521 seconds (21 allocations: 432 bytes) 0.005539 seconds (15 allocations: 416 bytes) [ Info: Calling free_symbols [ Info: Set(Sym{PyCall.PyObject}[c, J, z]) [ Info: Finding common subexpressions [ Info: Writing numerator term 1/1 [ Info: Writing numerator term 2/1 [ Info: Writing numerator term 3/1 [ Info: Writing denominator term 1/2 [ Info: Writing denominator term 2/2 #include #include double transfer_function(double *u, double *y, double ui, double J, double c) { int i; for (i=2; i > 0; --i) { u[i] = u[i-1]; } u[0] = ui; for (i=2; i > 0; --i) { y[i] = y[i-1]; } y[0] = 0; double x0 = 20.0*c; double x1 = pow(J, 2); double x2 = 400.0*x1 + 1.0; double x3 = 1.0/(x0 + x2); double x4 = 1.0*x3; y[0] += (x4)*u[0]; y[0] += (2.0*x3)*u[1]; y[0] += (x4)*u[2]; y[0] += (-x3*(2.0 - 800.0*x1))*y[1]; y[0] += (-x3*(-x0 + x2))*y[2]; return y[0]; } [ Info: Finding common subexpressions #include #include void transfer_function(double *x, double *y, double u, double J, double c) { double xp[2] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x double x0 = pow(J, 2); double x1 = 2.0 - 800.0*x0; double x2 = 20.0*c; double x3 = 400.0*x0 + 1.0; double x4 = x2 + x3; double x5 = 1.0/x4; double x6 = -x2 + x3; double x7 = 1.0/pow(x4, 2); // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (u - x1*x5*x[1] - x5*x6*x[0]); // Accumulate the output y = C*x + D*u y[0] = (1.0*u*x5 + x[0]*(1.0*x5 - x6*x7) + x[1]*(-x1*x7 + 2.0*x5)); // Make the predicted state the current state for (i=0; i < 2; ++i) { x[i] = xp[i]; } } [ Info: Perforing pole-zero cancellation (this might take a while) 0.016619 seconds (20 allocations: 432 bytes) 0.013056 seconds (15 allocations: 416 bytes) [ Info: Calling free_symbols [ Info: Set(Sym{PyCall.PyObject}[T, d, w, z]) [ Info: Finding common subexpressions [ Info: Writing numerator term 1/1 [ Info: Writing numerator term 2/1 [ Info: Writing numerator term 3/1 [ Info: Writing numerator term 4/1 [ Info: Writing denominator term 1/3 [ Info: Writing denominator term 2/3 [ Info: Writing denominator term 3/3 #include #include double transfer_function(double *u, double *y, double ui, double T, double d, double w) { int i; for (i=3; i > 0; --i) { u[i] = u[i-1]; } u[0] = ui; for (i=3; i > 0; --i) { y[i] = y[i-1]; } y[0] = 0; double x0 = 8000000.0*T; double x1 = pow(w, 2); double x2 = 1.0*x1; double x3 = d*w; double x4 = 80000.0*T*x3 + 40000.0; double x5 = x2 + x4; double x6 = 200.0*T*x1; double x7 = 400.0*x3; double x8 = x6 + x7; double x9 = 1.0/(x0 + x5 + x8); double x10 = x2*x9; double x11 = 3.0*x1*x9; double x12 = 24000000.0*T; double x13 = -3.0*x1 + x4; double x14 = -x6 - x7; y[0] += (x10)*u[0]; y[0] += (x11)*u[1]; y[0] += (x11)*u[2]; y[0] += (x10)*u[3]; y[0] += (-x9*(-x12 - x13 - x14))*y[1]; y[0] += (-x9*(x12 - x13 - x8))*y[2]; y[0] += (-x9*(-x0 + x14 + x5))*y[3]; return y[0]; } [ Info: Finding common subexpressions #include #include void transfer_function(double *x, double *y, double u, double T, double d, double w) { double xp[3] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x double x0 = 8000000.0*T; double x1 = pow(w, 2); double x2 = 1.0*x1; double x3 = d*w; double x4 = 80000.0*T*x3 + 40000.0; double x5 = x2 + x4; double x6 = 200.0*T*x1; double x7 = 400.0*x3; double x8 = -x6 - x7; double x9 = -x0 + x5 + x8; double x10 = x6 + x7; double x11 = x0 + x10 + x5; double x12 = 1.0/x11; double x13 = 24000000.0*T; double x14 = -3.0*x1 + x4; double x15 = -x10 + x13 - x14; double x16 = -x13 - x14 - x8; double x17 = x2/pow(x11, 2); double x18 = -3.0*x1*x12; // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (x[2]); xp[2] = (u - x12*x15*x[1] - x12*x16*x[2] - x12*x9*x[0]); // Accumulate the output y = C*x + D*u y[0] = (u*x12*x2 + x[0]*(1.0*x1*x12 - x17*x9) + x[1]*(-x15*x17 - x18) + x[2]*(-x16*x17 - x18)); // Make the predicted state the current state for (i=0; i < 3; ++i) { x[i] = xp[i]; } } [ Info: Symbolics: Testing Sym -> tf and vice versa [ Info: Testing conversion between SymPy and Symbolics Test Summary: | Pass Total Time SymbolicControlSystems.jl | 99 99 8m49.5s Testing SymbolicControlSystems tests passed Testing completed after 943.26s PkgEval succeeded after 1171.41s