diff --git a/.gitattributes b/.gitattributes index 7df615c..061c8ca 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ *.mo linguist-language=Modelica +*.bmo linguist-language=Modelica *.html.tpl linguist-language=HTML diff --git a/.github/workflows/test_julia.yml b/.github/workflows/test_julia.yml index 7f730b1..c063dc2 100644 --- a/.github/workflows/test_julia.yml +++ b/.github/workflows/test_julia.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - julia-version: [1.11] + julia-version: [1.12] fail-fast: false runs-on: ${{ matrix.os }} timeout-minutes: 60 @@ -45,7 +45,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - julia-version: [1.11] + julia-version: [1.12] omc-version: [stable] python-version: ['3.10'] fail-fast: false diff --git a/TestBaseModelica/.gitignore b/TestBaseModelica/.gitignore new file mode 100644 index 0000000..0ad117c --- /dev/null +++ b/TestBaseModelica/.gitignore @@ -0,0 +1,2 @@ +.CondaPkg/ +test/test_out/ diff --git a/TestBaseModelica/Manifest.toml b/TestBaseModelica/Manifest.toml index 87b5abe..cc459d1 100644 --- a/TestBaseModelica/Manifest.toml +++ b/TestBaseModelica/Manifest.toml @@ -1,13 +1,13 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.11.6" +julia_version = "1.12.2" manifest_format = "2.0" -project_hash = "31803fce940e10c34ff9207b23760fb52348415d" +project_hash = "ff02b4387029154838b392dfec68ad8bb41640a1" [[deps.ADTypes]] -git-tree-sha1 = "27cecae79e5cc9935255f90c53bb831cc3c870d7" +git-tree-sha1 = "8be2ae325471fc20b11c27bb34b518541d07dd3a" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "1.18.0" +version = "1.19.0" weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] [deps.ADTypes.extensions] @@ -46,9 +46,9 @@ version = "0.1.42" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" +git-tree-sha1 = "7e35fca2bdfba44d797c53dfe63a51fabf39bfc0" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.3.0" +version = "4.4.0" weakdeps = ["SparseArrays", "StaticArrays"] [deps.Adapt.extensions] @@ -61,12 +61,6 @@ git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" version = "1.1.3" -[[deps.AlmostBlockDiagonals]] -deps = ["ConcreteStructs"] -git-tree-sha1 = "743abe5e5fe8cff96dad4123f263c0d8eee281c0" -uuid = "a95523ee-d6da-40b5-98cc-27bc505739d5" -version = "0.1.10" - [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.2" @@ -79,15 +73,15 @@ version = "0.4.0" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra"] -git-tree-sha1 = "dbd8c3bbbdbb5c2778f85f4422c39960eac65a42" +git-tree-sha1 = "d81ae5489e13bc03567d4fbbb06c546a5e53c857" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.20.0" +version = "7.22.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" ArrayInterfaceCUDAExt = "CUDA" - ArrayInterfaceCUDSSExt = "CUDSS" + ArrayInterfaceCUDSSExt = ["CUDSS", "CUDA"] ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" ArrayInterfaceChainRulesExt = "ChainRules" ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" @@ -113,9 +107,9 @@ version = "7.20.0" [[deps.ArrayLayouts]] deps = ["FillArrays", "LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "120e392af69350960b1d3b89d41dcc1d66543858" +git-tree-sha1 = "122a06c8266e00035bfa572887ab52c344526eb4" uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.11.2" +version = "1.12.1" weakdeps = ["SparseArrays"] [deps.ArrayLayouts.extensions] @@ -130,31 +124,17 @@ git-tree-sha1 = "4ec6b48702dacc5994a835c1189831755e4e76ef" uuid = "15f4f7f2-30c1-5605-9d31-71845cf9641f" version = "2.2.0" -[[deps.BandedMatrices]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "PrecompileTools"] -git-tree-sha1 = "e35c672b239c5105f597963c33e740eeb46cf0ab" -uuid = "aae01518-5342-5314-be14-df237901396f" -version = "1.9.4" - - [deps.BandedMatrices.extensions] - BandedMatricesSparseArraysExt = "SparseArrays" - CliqueTreesExt = "CliqueTrees" - - [deps.BandedMatrices.weakdeps] - CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" version = "1.11.0" [[deps.BaseModelica]] -deps = ["MLStyle", "ModelingToolkit", "ParserCombinator"] -git-tree-sha1 = "faa2f71fd42aca26d7ffe70761d7830396cf2fe5" +deps = ["CondaPkg", "MLStyle", "ModelingToolkit", "ParserCombinator", "PythonCall"] +git-tree-sha1 = "a0a6fe9b496a9c9da2897b111277b885584807a9" repo-rev = "main" -repo-url = "https://github.com/SciML/BaseModelica.jl" +repo-url = "https://github.com/SciML/BaseModelica.jl.git" uuid = "a17d5099-185d-4ff5-b5d3-51aa4569e56d" -version = "1.1.0" +version = "1.3.0" [[deps.Bijections]] git-tree-sha1 = "a2d308fcd4c2fb90e943cf9cd2fbfa9c32b69733" @@ -169,79 +149,29 @@ version = "0.1.6" [[deps.BlockArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "79e651aa489a7879107d66e3d1948e9aa1b4055e" +git-tree-sha1 = "0f606a9894e2bcda541ceb82a91a13c5d450ed97" uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.7.2" -weakdeps = ["Adapt", "BandedMatrices"] +version = "1.9.3" [deps.BlockArrays.extensions] BlockArraysAdaptExt = "Adapt" BlockArraysBandedMatricesExt = "BandedMatrices" -[[deps.BoundaryValueDiffEq]] -deps = ["ADTypes", "BoundaryValueDiffEqAscher", "BoundaryValueDiffEqCore", "BoundaryValueDiffEqFIRK", "BoundaryValueDiffEqMIRK", "BoundaryValueDiffEqMIRKN", "BoundaryValueDiffEqShooting", "DiffEqBase", "FastClosures", "ForwardDiff", "LinearAlgebra", "Reexport", "SciMLBase"] -git-tree-sha1 = "d6ec33e4516b2e790a64128afdb54f3b536667a7" -uuid = "764a87c0-6b3e-53db-9096-fe964310641d" -version = "5.18.0" - - [deps.BoundaryValueDiffEq.extensions] - BoundaryValueDiffEqODEInterfaceExt = "ODEInterface" - - [deps.BoundaryValueDiffEq.weakdeps] - ODEInterface = "54ca160b-1b9f-5127-a996-1867f4bc2a2c" - -[[deps.BoundaryValueDiffEqAscher]] -deps = ["ADTypes", "AlmostBlockDiagonals", "BoundaryValueDiffEqCore", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastClosures", "ForwardDiff", "LinearAlgebra", "PreallocationTools", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield"] -git-tree-sha1 = "47c833c459738a3f27c5b458ecf7832a4731ef4d" -uuid = "7227322d-7511-4e07-9247-ad6ff830280e" -version = "1.8.0" - -[[deps.BoundaryValueDiffEqCore]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "ForwardDiff", "LineSearch", "LinearAlgebra", "Logging", "NonlinearSolveFirstOrder", "PreallocationTools", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "SparseArrays", "SparseConnectivityTracer", "SparseMatrixColorings"] -git-tree-sha1 = "b7b4d8cc80f116eab2eb6124dba58ea7aef31b85" -uuid = "56b672f2-a5fe-4263-ab2d-da677488eb3a" -version = "1.11.1" - -[[deps.BoundaryValueDiffEqFIRK]] -deps = ["ADTypes", "ArrayInterface", "BandedMatrices", "BoundaryValueDiffEqCore", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastAlmostBandedMatrices", "FastClosures", "ForwardDiff", "LinearAlgebra", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "SparseArrays"] -git-tree-sha1 = "325e6981a414cfa5181218936c23f0e16dee8f08" -uuid = "85d9eb09-370e-4000-bb32-543851f73618" -version = "1.9.0" - -[[deps.BoundaryValueDiffEqMIRK]] -deps = ["ADTypes", "ArrayInterface", "BandedMatrices", "BoundaryValueDiffEqCore", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastAlmostBandedMatrices", "FastClosures", "ForwardDiff", "LinearAlgebra", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "SparseArrays"] -git-tree-sha1 = "da6ae5e564ad06ced4d7504929c58130558007dd" -uuid = "1a22d4ce-7765-49ea-b6f2-13c8438986a6" -version = "1.9.0" - -[[deps.BoundaryValueDiffEqMIRKN]] -deps = ["ADTypes", "ArrayInterface", "BandedMatrices", "BoundaryValueDiffEqCore", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastAlmostBandedMatrices", "FastClosures", "ForwardDiff", "LinearAlgebra", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "SparseArrays"] -git-tree-sha1 = "609c2d03ea024df0d475fee483b93cf0e87c29d6" -uuid = "9255f1d6-53bf-473e-b6bd-23f1ff009da4" -version = "1.8.0" - -[[deps.BoundaryValueDiffEqShooting]] -deps = ["ADTypes", "ArrayInterface", "BandedMatrices", "BoundaryValueDiffEqCore", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastAlmostBandedMatrices", "FastClosures", "ForwardDiff", "LinearAlgebra", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "SparseArrays"] -git-tree-sha1 = "ba9bd1f31b58bfd5e48a56da0a426bcbd3462546" -uuid = "ed55bfe0-3725-4db6-871e-a1dc9f42a757" -version = "1.9.0" + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" [[deps.BracketingNonlinearSolve]] deps = ["CommonSolve", "ConcreteStructs", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] -git-tree-sha1 = "a9014924595b7a2c1dd14aac516e38fa10ada656" +git-tree-sha1 = "03100f03a58e14c60ba0a465e6f1ac9450eb495c" uuid = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" -version = "1.3.0" +version = "1.6.0" weakdeps = ["ChainRulesCore", "ForwardDiff"] [deps.BracketingNonlinearSolve.extensions] BracketingNonlinearSolveChainRulesCoreExt = ["ChainRulesCore", "ForwardDiff"] BracketingNonlinearSolveForwardDiffExt = "ForwardDiff" -[[deps.CEnum]] -git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" -uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.5.0" - [[deps.CPUSummary]] deps = ["CpuId", "IfElse", "PrecompileTools", "Preferences", "Static"] git-tree-sha1 = "f3a21d7fc84ba618a779d1ed2fcca2e682865bab" @@ -305,9 +235,9 @@ version = "1.0.0" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "0037835448781bb46feb39866934e243886d756a" +git-tree-sha1 = "9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.18.0" +version = "4.18.1" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -316,7 +246,7 @@ weakdeps = ["Dates", "LinearAlgebra"] [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.1+0" +version = "1.3.0+1" [[deps.CompositeTypes]] git-tree-sha1 = "bce26c3dab336582805503bed209faab1c279768" @@ -337,6 +267,12 @@ git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" version = "0.2.3" +[[deps.CondaPkg]] +deps = ["JSON3", "Markdown", "MicroMamba", "Pidfile", "Pkg", "Preferences", "Scratch", "TOML", "pixi_jll"] +git-tree-sha1 = "bd491d55b97a036caae1d78729bdb70bf7dababc" +uuid = "992eb4ea-22a4-4c89-a5bb-47a3300528ab" +version = "0.2.33" + [[deps.ConstructionBase]] git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" @@ -366,15 +302,15 @@ version = "1.16.0" [[deps.DataFrames]] deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] -git-tree-sha1 = "c967271c27a95160e30432e011b58f42cd7501b5" +git-tree-sha1 = "d8928e9169ff76c6281f39a659f9bca3a573f24c" uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -version = "1.8.0" +version = "1.8.1" [[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" +deps = ["OrderedCollections"] +git-tree-sha1 = "e357641bb3e0638d353c4b29ea0e40ea644066a6" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.22" +version = "0.19.3" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -386,22 +322,15 @@ deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" version = "1.11.0" -[[deps.DelayDiffEq]] -deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "FastBroadcast", "ForwardDiff", "LinearAlgebra", "Logging", "OrdinaryDiffEq", "OrdinaryDiffEqCore", "OrdinaryDiffEqDefault", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqRosenbrock", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SimpleUnPack", "SymbolicIndexingInterface"] -git-tree-sha1 = "38a6a29851deae145184e2010eb683d56988fb93" -uuid = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb" -version = "5.59.0" - [[deps.DiffEqBase]] -deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "TruncatedStacktraces"] -git-tree-sha1 = "1b1e070e57681d1176d99a5ec455717e24686612" +deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "d7259aa30ff9c4a512513d119882e3df3e656238" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.183.2" +version = "6.192.0" [deps.DiffEqBase.extensions] DiffEqBaseCUDAExt = "CUDA" DiffEqBaseChainRulesCoreExt = "ChainRulesCore" - DiffEqBaseDistributionsExt = "Distributions" DiffEqBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] DiffEqBaseForwardDiffExt = ["ForwardDiff"] DiffEqBaseGTPSAExt = "GTPSA" @@ -433,10 +362,16 @@ version = "6.183.2" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.DiffEqCallbacks]] -deps = ["ConcreteStructs", "DataStructures", "DiffEqBase", "DifferentiationInterface", "Functors", "LinearAlgebra", "Markdown", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "397ef6fffcf418ba55264ba785b032b8a136903b" +deps = ["ConcreteStructs", "DataStructures", "DiffEqBase", "DifferentiationInterface", "LinearAlgebra", "Markdown", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "448d118c4a7763b041fc41cf91c85d23773f1dc2" uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" -version = "4.9.0" +version = "4.10.1" + + [deps.DiffEqCallbacks.extensions] + DiffEqCallbacksFunctorsExt = "Functors" + + [deps.DiffEqCallbacks.weakdeps] + Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196" [[deps.DiffEqNoiseProcess]] deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"] @@ -462,17 +397,11 @@ git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" version = "1.15.1" -[[deps.DifferentialEquations]] -deps = ["BoundaryValueDiffEq", "DelayDiffEq", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "JumpProcesses", "LinearAlgebra", "LinearSolve", "NonlinearSolve", "OrdinaryDiffEq", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "SteadyStateDiffEq", "StochasticDiffEq", "Sundials"] -git-tree-sha1 = "afdc7dfee475828b4f0286d63ffe66b97d7a3fa7" -uuid = "0c46a032-eb83-5123-abaf-570d42b7fbaa" -version = "7.16.1" - [[deps.DifferentiationInterface]] deps = ["ADTypes", "LinearAlgebra"] -git-tree-sha1 = "c8d85ecfcbaef899308706bebdd8b00107f3fb43" +git-tree-sha1 = "80bd15222b3e8d0bc70d921d2201aa0084810ce5" uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.6.54" +version = "0.7.12" [deps.DifferentiationInterface.extensions] DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" @@ -529,17 +458,6 @@ weakdeps = ["ChainRulesCore", "EnzymeCore"] DispatchDoctorChainRulesCoreExt = "ChainRulesCore" DispatchDoctorEnzymeCoreExt = "EnzymeCore" -[[deps.Distances]] -deps = ["LinearAlgebra", "Statistics", "StatsAPI"] -git-tree-sha1 = "c7e3a542b999843086e2f29dac96a618c105be1d" -uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.10.12" -weakdeps = ["ChainRulesCore", "SparseArrays"] - - [deps.Distances.extensions] - DistancesChainRulesCoreExt = "ChainRulesCore" - DistancesSparseArraysExt = "SparseArrays" - [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" @@ -547,9 +465,9 @@ version = "1.11.0" [[deps.Distributions]] deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "3e6d038b77f22791b8e3472b7c633acea1ecac06" +git-tree-sha1 = "3bc002af51045ca3b47d2e1787d6ce02e68b943a" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.120" +version = "0.25.122" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -583,13 +501,13 @@ version = "0.7.16" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" +version = "1.7.0" [[deps.DynamicPolynomials]] deps = ["Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Reexport", "Test"] -git-tree-sha1 = "ca693f8707a77a0e365d49fe4622203b72b6cf1d" +git-tree-sha1 = "3f50fa86c968fc1a9e006c07b6bc40ccbb1b704d" uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" -version = "0.6.3" +version = "0.6.4" [[deps.DynamicQuantities]] deps = ["DispatchDoctor", "PrecompileTools", "TestItems", "Tricks"] @@ -615,9 +533,9 @@ uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" version = "1.0.5" [[deps.EnzymeCore]] -git-tree-sha1 = "787f5e2efb33af12cc3fde313c1b0195a3f08eba" +git-tree-sha1 = "820f06722a87d9544f42679182eb0850690f9b45" uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.8.13" +version = "0.8.17" weakdeps = ["Adapt"] [deps.EnzymeCore.extensions] @@ -625,9 +543,9 @@ weakdeps = ["Adapt"] [[deps.ExponentialUtilities]] deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "PrecompileTools", "Printf", "SparseArrays", "libblastrampoline_jll"] -git-tree-sha1 = "cae251c76f353e32d32d76fae2fea655eab652af" +git-tree-sha1 = "664daa6edba2f1cc848d5a4cd1928306919238cc" uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18" -version = "1.27.0" +version = "1.28.0" weakdeps = ["StaticArrays"] [deps.ExponentialUtilities.extensions] @@ -643,12 +561,6 @@ git-tree-sha1 = "c13f0b150373771b0fdc1713c97860f8df12e6c2" uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" version = "0.10.14" -[[deps.FastAlmostBandedMatrices]] -deps = ["ArrayInterface", "ArrayLayouts", "BandedMatrices", "ConcreteStructs", "LazyArrays", "LinearAlgebra", "MatrixFactorizations", "PrecompileTools", "Reexport"] -git-tree-sha1 = "9482a2b4face8ade73792c23a54796c79ed1bcbf" -uuid = "9d29842c-ecb8-4973-b1e9-a27b1157504e" -version = "0.1.5" - [[deps.FastBroadcast]] deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] git-tree-sha1 = "ab1b34570bcdf272899062e1a56285a53ecaae08" @@ -662,14 +574,14 @@ version = "0.3.2" [[deps.FastGaussQuadrature]] deps = ["LinearAlgebra", "SpecialFunctions", "StaticArrays"] -git-tree-sha1 = "fd923962364b645f3719855c88f7074413a6ad92" +git-tree-sha1 = "0044e9f5e49a57e88205e8f30ab73928b05fe5b6" uuid = "442a2c76-b920-505d-bb47-c5924d526838" -version = "1.0.2" +version = "1.1.0" [[deps.FastPower]] -git-tree-sha1 = "5f7afd4b1a3969dc34d692da2ed856047325b06e" +git-tree-sha1 = "e47c70bf430175e077d1955d7f04923504acc74c" uuid = "a4df4552-cc26-4903-aec0-212e50a0e84b" -version = "1.1.3" +version = "1.2.0" [deps.FastPower.extensions] FastPowerEnzymeExt = "Enzyme" @@ -706,9 +618,9 @@ version = "1.11.0" [[deps.FillArrays]] deps = ["LinearAlgebra"] -git-tree-sha1 = "173e4d8f14230a7523ae11b9a3fa9edb3e0efd78" +git-tree-sha1 = "5bfcd42851cf2f1b303f51525a54dc5e98d408a3" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.14.0" +version = "1.15.0" weakdeps = ["PDMats", "SparseArrays", "Statistics"] [deps.FillArrays.extensions] @@ -723,9 +635,9 @@ version = "1.4.2" [[deps.FiniteDiff]] deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] -git-tree-sha1 = "31fd32af86234b6b71add76229d53129aa1b87a9" +git-tree-sha1 = "9340ca07ca27093ff68418b7558ca37b05f8aeb1" uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.28.1" +version = "2.29.0" [deps.FiniteDiff.extensions] FiniteDiffBandedMatricesExt = "BandedMatrices" @@ -746,9 +658,9 @@ version = "1.3.7" [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "afb7c51ac63e40708a3071f80f5e84a752299d4f" +git-tree-sha1 = "cd33c7538e68650bd0ddbb3f5bd50a4a0fa95b50" uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.39" +version = "1.3.0" weakdeps = ["StaticArrays"] [deps.ForwardDiff.extensions] @@ -765,12 +677,6 @@ git-tree-sha1 = "b104d487b34566608f8b4e1c39fb0b10aa279ff8" uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" version = "0.1.3" -[[deps.Functors]] -deps = ["Compat", "ConstructionBase", "LinearAlgebra", "Random"] -git-tree-sha1 = "60a0339f28a233601cb74468032b5c302d5067de" -uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" -version = "0.5.2" - [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" @@ -784,9 +690,9 @@ version = "0.2.0" [[deps.GenericSchur]] deps = ["LinearAlgebra", "Printf"] -git-tree-sha1 = "f88e0ba1f6b42121a7c1dfe93a9687d8e164c91b" +git-tree-sha1 = "a694e2a57394e409f7a11ee0977362a9fafcb8c7" uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" -version = "0.5.5" +version = "0.5.6" [[deps.Ghostscript_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Zlib_jll"] @@ -816,6 +722,12 @@ git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" version = "0.1.1" +[[deps.ImplicitDiscreteSolve]] +deps = ["DiffEqBase", "OrdinaryDiffEqCore", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SymbolicIndexingInterface", "UnPack"] +git-tree-sha1 = "3e9ef0da0cabc23fc74e24cb233e184023f3b3ce" +uuid = "3263718b-31ed-49cf-8a0f-35a466e8af96" +version = "1.2.0" + [[deps.Inflate]] git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" @@ -851,9 +763,9 @@ uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" version = "1.11.0" [[deps.IntervalSets]] -git-tree-sha1 = "5fbb102dcb8b1a858111ae81d56682376130517d" +git-tree-sha1 = "d966f85b3b7a8e49d034d27a189e9a4874b4391a" uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.11" +version = "0.7.13" weakdeps = ["Random", "RecipesBase", "Statistics"] [deps.IntervalSets.extensions] @@ -877,9 +789,9 @@ uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" version = "1.3.1" [[deps.IrrationalConstants]] -git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" +git-tree-sha1 = "b2d91fe939cae05960e760110b328288867b5758" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.4" +version = "0.2.6" [[deps.IteratorInterfaceExtensions]] git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" @@ -892,6 +804,18 @@ git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" version = "1.7.1" +[[deps.JSON3]] +deps = ["Dates", "Mmap", "Parsers", "PrecompileTools", "StructTypes", "UUIDs"] +git-tree-sha1 = "411eccfe8aba0814ffa0fdf4860913ed09c34975" +uuid = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" +version = "1.14.3" + + [deps.JSON3.extensions] + JSON3ArrowExt = ["ArrowTypes"] + + [deps.JSON3.weakdeps] + ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" + [[deps.Jieko]] deps = ["ExproniconLite"] git-tree-sha1 = "2f05ed29618da60c06a87e9c033982d4f71d0b6c" @@ -906,20 +830,25 @@ version = "3.1.3+0" [[deps.JuliaFormatter]] deps = ["CommonMark", "Glob", "JuliaSyntax", "PrecompileTools", "TOML"] -git-tree-sha1 = "f512fefd5fdc7dd1ca05778f08f91e9e4c9fdc37" +git-tree-sha1 = "ca9470360f51697fc1bde747760b2d99936619ea" uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -version = "2.1.6" +version = "2.2.0" [[deps.JuliaSyntax]] git-tree-sha1 = "937da4713526b96ac9a178e2035019d3b78ead4a" uuid = "70703baa-626e-46a2-a12c-08ffd08c73b4" version = "0.4.10" +[[deps.JuliaSyntaxHighlighting]] +deps = ["StyledStrings"] +uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" +version = "1.12.0" + [[deps.JumpProcesses]] deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "PoissonRandom", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "SymbolicIndexingInterface", "UnPack"] -git-tree-sha1 = "d347adc76ff6dbdec3cb341cb867d9add90bf0d8" +git-tree-sha1 = "746d3ac930339ca8a37590892c98493fba89e9d3" uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" -version = "9.18.0" +version = "9.19.2" [deps.JumpProcesses.extensions] JumpProcessesKernelAbstractionsExt = ["Adapt", "KernelAbstractions"] @@ -931,9 +860,9 @@ version = "9.18.0" [[deps.Krylov]] deps = ["LinearAlgebra", "Printf", "SparseArrays"] -git-tree-sha1 = "b94257a1a8737099ca40bc7271a8b374033473ed" +git-tree-sha1 = "09895a8e17b0aa97df8964ed13c94d1b6d9de666" uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -version = "0.10.1" +version = "0.10.3" [[deps.LaTeXStrings]] git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" @@ -966,9 +895,9 @@ version = "0.1.17" [[deps.LazyArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] -git-tree-sha1 = "21057b6f4f5db1475e653735fda7d1de1c267b46" +git-tree-sha1 = "0f68899e54e5e98cff674bbe6380bcf89f603787" uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" -version = "2.6.3" +version = "2.9.1" [deps.LazyArrays.extensions] LazyArraysBandedMatricesExt = "BandedMatrices" @@ -987,36 +916,30 @@ deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" version = "1.11.0" -[[deps.LevyArea]] -deps = ["LinearAlgebra", "Random", "SpecialFunctions"] -git-tree-sha1 = "56513a09b8e0ae6485f34401ea9e2f31357958ec" -uuid = "2d8b4e74-eb68-11e8-0fb9-d5eb67b50637" -version = "1.0.0" - [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" version = "0.6.4" [[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.6.0+0" +version = "8.15.0+0" [[deps.LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" version = "1.11.0" [[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.7.2+0" +version = "1.9.0+0" [[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +deps = ["Artifacts", "Libdl", "OpenSSL_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.0+1" +version = "1.11.3+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -1034,20 +957,20 @@ weakdeps = ["LineSearches"] [[deps.LineSearches]] deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] -git-tree-sha1 = "4adee99b7262ad2a1a4bbbc59d993d24e55ea96f" +git-tree-sha1 = "a8b1215fb05581a1f9e403bec46a1333e7eb1ffb" uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" -version = "7.4.0" +version = "7.4.1" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" +version = "1.12.0" [[deps.LinearSolve]] -deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "StaticArraysCore", "UnPack"] -git-tree-sha1 = "e479c96c20e3fe6067d7ee6618839236d156f060" +deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "Setfield", "StaticArraysCore", "UnPack"] +git-tree-sha1 = "e00dff84aded96c3ec03cfe46ff8d13e0c5afc44" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "3.40.1" +version = "3.47.0" [deps.LinearSolve.extensions] LinearSolveAMDGPUExt = "AMDGPU" @@ -1067,6 +990,7 @@ version = "3.40.1" LinearSolveKernelAbstractionsExt = "KernelAbstractions" LinearSolveKrylovKitExt = "KrylovKit" LinearSolveMetalExt = "Metal" + LinearSolveMooncakeExt = "Mooncake" LinearSolvePardisoExt = ["Pardiso", "SparseArrays"] LinearSolveRecursiveFactorizationExt = "RecursiveFactorization" LinearSolveSparseArraysExt = "SparseArrays" @@ -1090,6 +1014,7 @@ version = "3.40.1" KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" LAPACK_jll = "51474c39-65e3-53ba-86ba-03b1b862ec14" Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" @@ -1116,6 +1041,12 @@ version = "0.3.29" uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" version = "1.11.0" +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "f00544d95982ea270145636c181ceda21c4e2575" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.2.0" + [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] git-tree-sha1 = "282cadc186e7b2ae0eeadbd7a4dffed4196ae2aa" @@ -1138,20 +1069,10 @@ uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" version = "0.1.8" [[deps.Markdown]] -deps = ["Base64"] +deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" version = "1.11.0" -[[deps.MatrixFactorizations]] -deps = ["ArrayLayouts", "LinearAlgebra", "Printf", "Random"] -git-tree-sha1 = "16a726dba99685d9e94c8d0a8f655383121fc608" -uuid = "a3b82374-2e81-5b9e-98ce-41277c0e4c87" -version = "3.0.1" -weakdeps = ["BandedMatrices"] - - [deps.MatrixFactorizations.extensions] - MatrixFactorizationsBandedMatricesExt = "BandedMatrices" - [[deps.MaybeInplace]] deps = ["ArrayInterface", "LinearAlgebra", "MacroTools"] git-tree-sha1 = "54e2fdc38130c05b42be423e90da3bade29b74bd" @@ -1162,10 +1083,11 @@ weakdeps = ["SparseArrays"] [deps.MaybeInplace.extensions] MaybeInplaceSparseArraysExt = "SparseArrays" -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.6+0" +[[deps.MicroMamba]] +deps = ["Pkg", "Scratch", "micromamba_jll"] +git-tree-sha1 = "011cab361eae7bcd7d278f0a7a00ff9c69000c51" +uuid = "0b3b1443-0f03-428d-bdfb-f27f9c1191ea" +version = "0.1.14" [[deps.Missings]] deps = ["DataAPI"] @@ -1178,10 +1100,10 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" version = "1.11.0" [[deps.ModelingToolkit]] -deps = ["ADTypes", "AbstractTrees", "ArrayInterface", "BlockArrays", "ChainRulesCore", "Combinatorics", "CommonSolve", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "DiffRules", "DifferentiationInterface", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "DynamicQuantities", "EnumX", "ExprTools", "FindFirstFunctions", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "Graphs", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "Moshi", "NaNMath", "NonlinearSolve", "OffsetArrays", "OrderedCollections", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] -git-tree-sha1 = "c846aeb43d6e9207f5f51d8e1ae7c6620dfa741f" +deps = ["ADTypes", "AbstractTrees", "ArrayInterface", "BlockArrays", "ChainRulesCore", "Combinatorics", "CommonSolve", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "DiffRules", "DifferentiationInterface", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "DynamicQuantities", "EnumX", "ExprTools", "FillArrays", "FindFirstFunctions", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "Graphs", "ImplicitDiscreteSolve", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "Moshi", "NaNMath", "OffsetArrays", "OrderedCollections", "OrdinaryDiffEqCore", "PreallocationTools", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLPublic", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] +git-tree-sha1 = "ea3a5c734abae9de7f892e1f63f1549e7d1a7179" uuid = "961ee093-0014-501f-94e3-6117800e7a78" -version = "9.82.0" +version = "10.29.0" [deps.ModelingToolkit.extensions] MTKBifurcationKitExt = "BifurcationKit" @@ -1190,6 +1112,7 @@ version = "9.82.0" MTKFMIExt = "FMI" MTKInfiniteOptExt = "InfiniteOpt" MTKLabelledArraysExt = "LabelledArrays" + MTKPyomoDynamicOptExt = "Pyomo" [deps.ModelingToolkit.weakdeps] BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665" @@ -1198,6 +1121,7 @@ version = "9.82.0" FMI = "14a09403-18e3-468f-ad8a-74f8dda2d9ac" InfiniteOpt = "20393b10-9daf-11e9-18c9-8db751c92c57" LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" + Pyomo = "0e8e1daf-01b5-4eba-a626-3897743a3816" [[deps.Moshi]] deps = ["ExproniconLite", "Jieko"] @@ -1207,7 +1131,7 @@ version = "0.3.7" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.12.12" +version = "2025.5.20" [[deps.MuladdMacro]] git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" @@ -1215,16 +1139,20 @@ uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" version = "0.2.4" [[deps.MultivariatePolynomials]] -deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"] -git-tree-sha1 = "fade91fe9bee7b142d332fc6ab3f0deea29f637b" +deps = ["DataStructures", "LinearAlgebra", "MutableArithmetics"] +git-tree-sha1 = "d38b8653b1cdfac5a7da3b819c0a8d6024f9a18c" uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" -version = "0.5.9" +version = "0.5.13" +weakdeps = ["ChainRulesCore"] + + [deps.MultivariatePolynomials.extensions] + MultivariatePolynomialsChainRulesCoreExt = "ChainRulesCore" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] -git-tree-sha1 = "a03ae6a640a92191615fb53baae6a74b74bce56d" +git-tree-sha1 = "22df8573f8e7c593ac205455ca088989d0a2c7a0" uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" -version = "1.6.5" +version = "1.6.7" [[deps.NLSolversBase]] deps = ["ADTypes", "DifferentiationInterface", "Distributed", "FiniteDiff", "ForwardDiff"] @@ -1232,12 +1160,6 @@ git-tree-sha1 = "25a6638571a902ecfb1ae2a18fc1575f86b1d4df" uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" version = "7.10.0" -[[deps.NLsolve]] -deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] -git-tree-sha1 = "019f12e9a1a7880459d0173c182e6a99365d7ac1" -uuid = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" -version = "4.5.1" - [[deps.NaNMath]] deps = ["OpenLibm_jll"] git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" @@ -1246,13 +1168,13 @@ version = "1.1.3" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.2.0" +version = "1.3.0" [[deps.NonlinearSolve]] -deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseMatrixColorings", "StaticArraysCore", "SymbolicIndexingInterface"] -git-tree-sha1 = "d2ec18c1e4eccbb70b64be2435fc3b06fbcdc0a1" +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "StaticArraysCore", "SymbolicIndexingInterface"] +git-tree-sha1 = "1d091cfece012662b06d25c792b3a43a0804c47b" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "4.10.0" +version = "4.12.0" [deps.NonlinearSolve.extensions] NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" @@ -1261,7 +1183,7 @@ version = "4.10.0" NonlinearSolveMINPACKExt = "MINPACK" NonlinearSolveNLSolversExt = "NLSolvers" NonlinearSolveNLsolveExt = ["NLsolve", "LineSearches"] - NonlinearSolvePETScExt = ["PETSc", "MPI"] + NonlinearSolvePETScExt = ["PETSc", "MPI", "SparseArrays"] NonlinearSolveSIAMFANLEquationsExt = "SIAMFANLEquations" NonlinearSolveSpeedMappingExt = "SpeedMapping" NonlinearSolveSundialsExt = "Sundials" @@ -1277,46 +1199,63 @@ version = "4.10.0" NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" PETSc = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0" SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412" Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" [[deps.NonlinearSolveBase]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnzymeCore", "FastClosures", "LinearAlgebra", "Markdown", "MaybeInplace", "Preferences", "Printf", "RecursiveArrayTools", "SciMLBase", "SciMLJacobianOperators", "SciMLOperators", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] -git-tree-sha1 = "1d42a315ba627ca0027d49d0efb44e3d88db24aa" +deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnzymeCore", "FastClosures", "LinearAlgebra", "Markdown", "MaybeInplace", "Preferences", "Printf", "RecursiveArrayTools", "SciMLBase", "SciMLJacobianOperators", "SciMLLogging", "SciMLOperators", "SciMLStructures", "Setfield", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] +git-tree-sha1 = "a72dc6e5bba0fd9bb3bd9cc4abade8552d9fc982" uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" -version = "1.14.0" -weakdeps = ["BandedMatrices", "DiffEqBase", "ForwardDiff", "LineSearch", "LinearSolve", "SparseArrays", "SparseMatrixColorings"] +version = "2.4.0" [deps.NonlinearSolveBase.extensions] NonlinearSolveBaseBandedMatricesExt = "BandedMatrices" - NonlinearSolveBaseDiffEqBaseExt = "DiffEqBase" + NonlinearSolveBaseChainRulesCoreExt = "ChainRulesCore" + NonlinearSolveBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] NonlinearSolveBaseForwardDiffExt = "ForwardDiff" NonlinearSolveBaseLineSearchExt = "LineSearch" NonlinearSolveBaseLinearSolveExt = "LinearSolve" + NonlinearSolveBaseMooncakeExt = "Mooncake" + NonlinearSolveBaseReverseDiffExt = "ReverseDiff" NonlinearSolveBaseSparseArraysExt = "SparseArrays" NonlinearSolveBaseSparseMatrixColoringsExt = "SparseMatrixColorings" + NonlinearSolveBaseTrackerExt = "Tracker" + + [deps.NonlinearSolveBase.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + LineSearch = "87fe0de2-c867-4266-b59a-2f0a94fc965b" + LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [[deps.NonlinearSolveFirstOrder]] -deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLJacobianOperators", "Setfield", "StaticArraysCore"] -git-tree-sha1 = "3f1198ae5cbf21e84b8251a9e62fa1f888f3e4cb" +deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConcreteStructs", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLJacobianOperators", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "872c32bc8a524e1a51bfc0a0cf72ff2a2f886226" uuid = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d" -version = "1.7.0" +version = "1.10.0" [[deps.NonlinearSolveQuasiNewton]] -deps = ["ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLOperators", "StaticArraysCore"] -git-tree-sha1 = "40dfaf1bf74f1f700f81d0002d4dd90999598eb2" +deps = ["ArrayInterface", "CommonSolve", "ConcreteStructs", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLOperators", "StaticArraysCore"] +git-tree-sha1 = "21596ddee2e18c95bfe92803988611ab6daa9cfe" uuid = "9a2c21bd-3a47-402d-9113-8faf9a0ee114" -version = "1.8.0" +version = "1.11.0" weakdeps = ["ForwardDiff"] [deps.NonlinearSolveQuasiNewton.extensions] NonlinearSolveQuasiNewtonForwardDiffExt = "ForwardDiff" [[deps.NonlinearSolveSpectralMethods]] -deps = ["CommonSolve", "ConcreteStructs", "DiffEqBase", "LineSearch", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] -git-tree-sha1 = "84de5a469e119eb2c22ae07c543dc4e7f7001ee7" +deps = ["CommonSolve", "ConcreteStructs", "LineSearch", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "eafd027b5cd768f19bb5de76c0e908a9065ddd36" uuid = "26075421-4e9a-44e1-8bd1-420ed7ad02b2" -version = "1.3.0" +version = "1.6.0" weakdeps = ["ForwardDiff"] [deps.NonlinearSolveSpectralMethods.extensions] @@ -1334,12 +1273,17 @@ weakdeps = ["Adapt"] [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" +version = "0.3.29+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.5+0" +version = "0.8.7+0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "3.5.4+0" [[deps.OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] @@ -1365,10 +1309,10 @@ uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" version = "1.8.1" [[deps.OrdinaryDiffEq]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqDefault", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqExplicitRK", "OrdinaryDiffEqExponentialRK", "OrdinaryDiffEqExtrapolation", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqFeagin", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqHighOrderRK", "OrdinaryDiffEqIMEXMultistep", "OrdinaryDiffEqLinear", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqNordsieck", "OrdinaryDiffEqPDIRK", "OrdinaryDiffEqPRK", "OrdinaryDiffEqQPRK", "OrdinaryDiffEqRKN", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqSSPRK", "OrdinaryDiffEqStabilizedIRK", "OrdinaryDiffEqStabilizedRK", "OrdinaryDiffEqSymplecticRK", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "Static", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "55c21fdb4626037cdbcb04fec3afa192345a24de" +deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqDefault", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqExplicitRK", "OrdinaryDiffEqExponentialRK", "OrdinaryDiffEqExtrapolation", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqFeagin", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqHighOrderRK", "OrdinaryDiffEqIMEXMultistep", "OrdinaryDiffEqLinear", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqNordsieck", "OrdinaryDiffEqPDIRK", "OrdinaryDiffEqPRK", "OrdinaryDiffEqQPRK", "OrdinaryDiffEqRKN", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqSSPRK", "OrdinaryDiffEqStabilizedIRK", "OrdinaryDiffEqStabilizedRK", "OrdinaryDiffEqSymplecticRK", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "Static", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "89172157d16139165d470602f1e552484b357771" uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.101.0" +version = "6.103.0" [[deps.OrdinaryDiffEqAdamsBashforthMoulton]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqLowOrderRK", "Polyester", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] @@ -1378,15 +1322,15 @@ version = "1.5.0" [[deps.OrdinaryDiffEqBDF]] deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqSDIRK", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "3890acc80d814e45234d18b592f5db5d1a75f84a" +git-tree-sha1 = "ce8db53fd1e4e41c020fd53961e7314f75e4c21c" uuid = "6ad6398a-0878-4a85-9266-38940aa047c8" -version = "1.9.0" +version = "1.10.1" [[deps.OrdinaryDiffEqCore]] deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FastPower", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] -git-tree-sha1 = "e579c9a4f9102e82da3d97c349a74d6bc11cf8dc" +git-tree-sha1 = "4b68f9ca0cfa68cb9ee544df96391d47ca0e62a9" uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" -version = "1.30.0" +version = "1.36.0" [deps.OrdinaryDiffEqCore.extensions] OrdinaryDiffEqCoreEnzymeCoreExt = "EnzymeCore" @@ -1398,15 +1342,19 @@ version = "1.30.0" [[deps.OrdinaryDiffEqDefault]] deps = ["ADTypes", "DiffEqBase", "EnumX", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "PrecompileTools", "Preferences", "Reexport", "SciMLBase"] -git-tree-sha1 = "982760cd1e8f9b25307970f613e24d255e3fe929" +git-tree-sha1 = "7d5ddeee97e1bdcc848f1397cbc3d03bd57f33e7" uuid = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" -version = "1.7.0" +version = "1.8.0" [[deps.OrdinaryDiffEqDifferentiation]] -deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqCore", "SciMLBase", "SciMLOperators", "SparseArrays", "SparseMatrixColorings", "StaticArrayInterface", "StaticArrays"] -git-tree-sha1 = "906da94c9b81054b974e97590d24b092369026b8" +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqCore", "SciMLBase", "SciMLOperators", "SparseMatrixColorings", "StaticArrayInterface", "StaticArrays"] +git-tree-sha1 = "320b5f3e4e61ca0ad863c63c803f69973ba6efce" uuid = "4302a76b-040a-498a-8c04-15b101fed76b" -version = "1.11.0" +version = "1.16.1" +weakdeps = ["SparseArrays"] + + [deps.OrdinaryDiffEqDifferentiation.extensions] + OrdinaryDiffEqDifferentiationSparseArraysExt = "SparseArrays" [[deps.OrdinaryDiffEqExplicitRK]] deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "TruncatedStacktraces"] @@ -1416,21 +1364,21 @@ version = "1.4.0" [[deps.OrdinaryDiffEqExponentialRK]] deps = ["ADTypes", "DiffEqBase", "ExponentialUtilities", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "RecursiveArrayTools", "Reexport", "SciMLBase"] -git-tree-sha1 = "6cbcbb8059501b33c66f06e849d949b2013db1cb" +git-tree-sha1 = "3b81416ff11e55ea0ae7b449efc818256d9d450b" uuid = "e0540318-69ee-4070-8777-9e2de6de23de" -version = "1.7.0" +version = "1.8.0" [[deps.OrdinaryDiffEqExtrapolation]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "FastPower", "LinearSolve", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "RecursiveArrayTools", "Reexport", "SciMLBase"] -git-tree-sha1 = "148ba491e4e46e0891fdffc5f61a8596c46ee660" +git-tree-sha1 = "9e1b11cf448a2c1bca640103c1c848a20aa2f967" uuid = "becaefa8-8ca2-5cf9-886d-c06f3d2bd2c4" -version = "1.7.0" +version = "1.9.0" [[deps.OrdinaryDiffEqFIRK]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "FastGaussQuadrature", "FastPower", "LinearAlgebra", "LinearSolve", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] -git-tree-sha1 = "faa332f06747088d91ce9bf2823a143492882c49" +git-tree-sha1 = "b968d66de3de5ffcf18544bc202ca792bad20710" uuid = "5960d6e9-dd7a-4743-88e7-cf307b64f125" -version = "1.15.0" +version = "1.16.0" [[deps.OrdinaryDiffEqFeagin]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] @@ -1452,9 +1400,9 @@ version = "1.5.0" [[deps.OrdinaryDiffEqIMEXMultistep]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Reexport", "SciMLBase"] -git-tree-sha1 = "c0355dd1270c4fd71e34fbeaeeb0f5b0634523aa" +git-tree-sha1 = "a5dcd75959dada0005b1707a5ca9359faa1734ba" uuid = "9f002381-b378-40b7-97a6-27a27c83f129" -version = "1.6.0" +version = "1.7.0" [[deps.OrdinaryDiffEqLinear]] deps = ["DiffEqBase", "ExponentialUtilities", "LinearAlgebra", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] @@ -1476,9 +1424,9 @@ version = "1.7.0" [[deps.OrdinaryDiffEqNonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "FastClosures", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "PreallocationTools", "RecursiveArrayTools", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "StaticArrays"] -git-tree-sha1 = "4afa7ffda353163eb7ba7f3241668ad50bdcde0f" +git-tree-sha1 = "f59c1c07cfa674c1d3f5dd386c4274d9bc2be221" uuid = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" -version = "1.13.0" +version = "1.15.0" [[deps.OrdinaryDiffEqNordsieck]] deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqTsit5", "Polyester", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] @@ -1488,9 +1436,9 @@ version = "1.4.0" [[deps.OrdinaryDiffEqPDIRK]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "Reexport", "SciMLBase", "StaticArrays"] -git-tree-sha1 = "9bc0b757d960183468618eb5cb84c4b87416e24c" +git-tree-sha1 = "9d599d2eafdf74ab26ea6bf3feb28183a2ade143" uuid = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89" -version = "1.5.0" +version = "1.6.0" [[deps.OrdinaryDiffEqPRK]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "Reexport", "SciMLBase"] @@ -1512,15 +1460,15 @@ version = "1.5.0" [[deps.OrdinaryDiffEqRosenbrock]] deps = ["ADTypes", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] -git-tree-sha1 = "c31944e4a1f6795d6914bf563fb591c3d1c5d62c" +git-tree-sha1 = "f34bc2f58656843596d09a4c4de8c20724ebc2f1" uuid = "43230ef6-c299-4910-a778-202eb28ce4ce" -version = "1.14.0" +version = "1.18.1" [[deps.OrdinaryDiffEqSDIRK]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "SciMLBase", "TruncatedStacktraces"] -git-tree-sha1 = "6b941dba1c669f8dbb24faf951e5ec8665ff5019" +git-tree-sha1 = "20caa72c004414435fb5769fadb711e96ed5bcd4" uuid = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" -version = "1.6.0" +version = "1.7.0" [[deps.OrdinaryDiffEqSSPRK]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static", "StaticArrays"] @@ -1530,9 +1478,9 @@ version = "1.7.0" [[deps.OrdinaryDiffEqStabilizedIRK]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqStabilizedRK", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays"] -git-tree-sha1 = "5ea64a22a009d9385539a8d50d68d2bcdd4299e5" +git-tree-sha1 = "75abe7462f4b0b2a2463bb512c8a5458bbd39185" uuid = "e3e12d00-db14-5390-b879-ac3dd2ef6296" -version = "1.5.0" +version = "1.6.0" [[deps.OrdinaryDiffEqStabilizedRK]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays"] @@ -1560,9 +1508,13 @@ version = "1.6.0" [[deps.PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "f07c06228a1c670ae4c87d1276b92c7c597fdda0" +git-tree-sha1 = "d922b4d80d1e12c658da7785e754f4796cc1d60d" uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.35" +version = "0.11.36" +weakdeps = ["StatsBase"] + + [deps.PDMats.extensions] + StatsBaseExt = "StatsBase" [[deps.Parameters]] deps = ["OrderedCollections", "UnPack"] @@ -1582,22 +1534,26 @@ git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.3" +[[deps.Pidfile]] +deps = ["FileWatching", "Test"] +git-tree-sha1 = "2d8aaf8ee10df53d0dfb9b8ee44ae7c04ced2b03" +uuid = "fa939f87-e72e-5be4-a000-7fc836dbe307" +version = "1.3.0" + [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.11.0" +version = "1.12.0" +weakdeps = ["REPL"] [deps.Pkg.extensions] REPLExt = "REPL" - [deps.Pkg.weakdeps] - REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - [[deps.PoissonRandom]] deps = ["LogExpFunctions", "Random"] -git-tree-sha1 = "c1ea45aa9f209fe97192afa233907bc4e551c8aa" +git-tree-sha1 = "67afbcbe9e184d6729a92a022147ed4cf972ca7b" uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" -version = "0.4.6" +version = "0.4.7" [[deps.Polyester]] deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] @@ -1624,24 +1580,26 @@ uuid = "85a6dd25-e78a-55b7-8502-1745935b8125" version = "0.2.4" [[deps.PreallocationTools]] -deps = ["Adapt", "ArrayInterface", "ForwardDiff"] -git-tree-sha1 = "2cc315bb7f6e4d59081bad744cdb911d6374fc7f" +deps = ["Adapt", "ArrayInterface", "PrecompileTools"] +git-tree-sha1 = "c05b4c6325262152483a1ecb6c69846d2e01727b" uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "0.4.29" +version = "0.4.34" [deps.PreallocationTools.extensions] + PreallocationToolsForwardDiffExt = "ForwardDiff" PreallocationToolsReverseDiffExt = "ReverseDiff" PreallocationToolsSparseConnectivityTracerExt = "SparseConnectivityTracer" [deps.PreallocationTools.weakdeps] + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" [[deps.PrecompileTools]] deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" +version = "1.3.3" [[deps.Preferences]] deps = ["TOML"] @@ -1650,10 +1608,10 @@ uuid = "21216c6a-2e73-6563-6e65-726566657250" version = "1.5.0" [[deps.PrettyTables]] -deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] -git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34" +deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "REPL", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "c5a07210bd060d6a8491b0ccdee2fa0235fc00bf" uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" -version = "2.4.0" +version = "3.1.2" [[deps.Primes]] deps = ["IntegerMathUtils"] @@ -1671,6 +1629,20 @@ git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" version = "1.3.0" +[[deps.PythonCall]] +deps = ["CondaPkg", "Dates", "Libdl", "MacroTools", "Markdown", "Pkg", "Serialization", "Tables", "UnsafePointers"] +git-tree-sha1 = "c576260774cc832998c2a9d1b2efc9452c172d35" +uuid = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" +version = "0.9.30" + + [deps.PythonCall.extensions] + CategoricalArraysExt = "CategoricalArrays" + PyCallExt = "PyCall" + + [deps.PythonCall.weakdeps] + CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" + PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" + [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" @@ -1683,6 +1655,11 @@ version = "2.11.2" [deps.QuadGK.weakdeps] Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" +[[deps.REPL]] +deps = ["InteractiveUtils", "JuliaSyntaxHighlighting", "Markdown", "Sockets", "StyledStrings", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" + [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" @@ -1708,9 +1685,9 @@ version = "1.3.4" [[deps.RecursiveArrayTools]] deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "96bef5b9ac123fff1b379acf0303cf914aaabdfd" +git-tree-sha1 = "51bdb23afaaa551f923a0e990f7c44a4451a26f1" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.37.1" +version = "3.39.0" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" @@ -1757,9 +1734,9 @@ version = "1.1.1" [[deps.Rmath]] deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "852bd0f55565a9e973fcfee83a84413270224dc4" +git-tree-sha1 = "5b3d50eb374cea306873b371d3f8d3915a018f0b" uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.8.0" +version = "0.9.0" [[deps.Rmath_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1769,15 +1746,15 @@ version = "0.5.1+0" [[deps.RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] -git-tree-sha1 = "86a8a8b783481e1ea6b9c91dd949cb32191f8ab4" +git-tree-sha1 = "2f609ec2295c452685d3142bc4df202686e555d2" uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -version = "0.5.15" +version = "0.5.16" [[deps.SCCNonlinearSolve]] deps = ["CommonSolve", "PrecompileTools", "Reexport", "SciMLBase", "SymbolicIndexingInterface"] -git-tree-sha1 = "5595105cef621942aceb1aa546b883c79ccbfa8f" +git-tree-sha1 = "a40cbc91630ef834bc71370ed05372a20bc086c7" uuid = "9dfe8606-65a1-4bb3-9748-cb89d1561431" -version = "1.4.0" +version = "1.6.0" [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" @@ -1789,30 +1766,48 @@ uuid = "94e857df-77ce-4151-89e5-788b33177be4" version = "0.1.0" [[deps.SciMLBase]] -deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "1a1b2ed5178814d32374d98f808163c24d47f1d8" +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PreallocationTools", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLLogging", "SciMLOperators", "SciMLPublic", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] +git-tree-sha1 = "dc93eb05a8101a58c844e0e20a47f8a92be33048" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.110.0" +version = "2.127.0" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" + SciMLBaseDifferentiationInterfaceExt = "DifferentiationInterface" + SciMLBaseDistributionsExt = "Distributions" + SciMLBaseEnzymeExt = "Enzyme" + SciMLBaseForwardDiffExt = "ForwardDiff" SciMLBaseMLStyleExt = "MLStyle" SciMLBaseMakieExt = "Makie" + SciMLBaseMeasurementsExt = "Measurements" + SciMLBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + SciMLBaseMooncakeExt = "Mooncake" SciMLBasePartialFunctionsExt = "PartialFunctions" SciMLBasePyCallExt = "PyCall" SciMLBasePythonCallExt = "PythonCall" SciMLBaseRCallExt = "RCall" + SciMLBaseReverseDiffExt = "ReverseDiff" + SciMLBaseTrackerExt = "Tracker" SciMLBaseZygoteExt = ["Zygote", "ChainRulesCore"] [deps.SciMLBase.weakdeps] ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" RCall = "6f49c342-dc21-5d91-9882-a32aef131414" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [[deps.SciMLJacobianOperators]] @@ -1821,11 +1816,17 @@ git-tree-sha1 = "a273b291c90909ba6fe08402dd68e09aae423008" uuid = "19f34311-ddf3-4b8b-af20-060888a46c0e" version = "0.1.11" +[[deps.SciMLLogging]] +deps = ["Logging", "LoggingExtras", "Preferences"] +git-tree-sha1 = "70d5b2fc50fde8d868f906b54045eb12b490e867" +uuid = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" +version = "1.5.0" + [[deps.SciMLOperators]] deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"] -git-tree-sha1 = "024d829102878141aaee5cf8f8288bcabd2f57a0" +git-tree-sha1 = "a1e12aee1eb7e6f957e8483eeebf9a98f3e135d6" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "1.7.2" +version = "1.13.0" weakdeps = ["SparseArrays", "StaticArraysCore"] [deps.SciMLOperators.extensions] @@ -1843,6 +1844,12 @@ git-tree-sha1 = "566c4ed301ccb2a44cbd5a27da5f885e0ed1d5df" uuid = "53ae85a6-f571-4167-b2af-e1d143709226" version = "1.7.0" +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "9b81b8393e50b7d4e6d0a9f14e192294d3b7c109" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.3.0" + [[deps.SentinelArrays]] deps = ["Dates", "Random"] git-tree-sha1 = "712fb0231ee6f9120e005ccd56297abbc053e7e0" @@ -1866,19 +1873,17 @@ version = "1.11.0" [[deps.SimpleNonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "Setfield", "StaticArraysCore"] -git-tree-sha1 = "09d986e27a606f172c5b6cffbd8b8b2f10bf1c75" +git-tree-sha1 = "8825064775bf4ae0f22d04ea63979d8c868fd510" uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" -version = "2.7.0" +version = "2.9.0" [deps.SimpleNonlinearSolve.extensions] SimpleNonlinearSolveChainRulesCoreExt = "ChainRulesCore" - SimpleNonlinearSolveDiffEqBaseExt = "DiffEqBase" SimpleNonlinearSolveReverseDiffExt = "ReverseDiff" SimpleNonlinearSolveTrackerExt = "Tracker" [deps.SimpleNonlinearSolve.weakdeps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" @@ -1906,59 +1911,42 @@ version = "1.2.2" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" - -[[deps.SparseConnectivityTracer]] -deps = ["ADTypes", "DocStringExtensions", "FillArrays", "LinearAlgebra", "Random", "SparseArrays"] -git-tree-sha1 = "182990067a09adf950274f97f38f68c76f81d2d0" -uuid = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" -version = "0.6.21" - - [deps.SparseConnectivityTracer.extensions] - SparseConnectivityTracerDataInterpolationsExt = "DataInterpolations" - SparseConnectivityTracerLogExpFunctionsExt = "LogExpFunctions" - SparseConnectivityTracerNNlibExt = "NNlib" - SparseConnectivityTracerNaNMathExt = "NaNMath" - SparseConnectivityTracerSpecialFunctionsExt = "SpecialFunctions" - - [deps.SparseConnectivityTracer.weakdeps] - DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0" - LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" - NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" - NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" - SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "1.12.0" [[deps.SparseMatrixColorings]] deps = ["ADTypes", "DocStringExtensions", "LinearAlgebra", "PrecompileTools", "Random", "SparseArrays"] -git-tree-sha1 = "9de43e0b9b976f1019bf7a879a686c4514520078" +git-tree-sha1 = "6ed48d9a3b22417c765dc273ae3e1e4de035e7c8" uuid = "0a514795-09f3-496d-8182-132a7b665d35" -version = "0.4.21" +version = "0.4.23" [deps.SparseMatrixColorings.extensions] SparseMatrixColoringsCUDAExt = "CUDA" SparseMatrixColoringsCliqueTreesExt = "CliqueTrees" SparseMatrixColoringsColorsExt = "Colors" + SparseMatrixColoringsJuMPExt = ["JuMP", "MathOptInterface"] [deps.SparseMatrixColorings.weakdeps] CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + JuMP = "4076af6c-e467-56ae-b986-b466b2749572" + MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "41852b8679f78c8d8961eeadc8f62cef861a52e3" +git-tree-sha1 = "f2685b435df2613e25fc10ad8c26dddb8640f547" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.5.1" +version = "2.6.1" weakdeps = ["ChainRulesCore"] [deps.SpecialFunctions.extensions] SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.Static]] -deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"] -git-tree-sha1 = "f737d444cb0ad07e61b3c1bef8eb91203c321eff" +deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools", "SciMLPublic"] +git-tree-sha1 = "49440414711eddc7227724ae6e570c7d5559a086" uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "1.2.0" +version = "1.3.1" [[deps.StaticArrayInterface]] deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Static"] @@ -1983,9 +1971,9 @@ weakdeps = ["ChainRulesCore", "Statistics"] StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" +git-tree-sha1 = "6ab403037779dae8c514bad259f32a447262455a" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" +version = "1.4.4" [[deps.Statistics]] deps = ["LinearAlgebra"] @@ -2005,33 +1993,21 @@ version = "1.7.1" [[deps.StatsBase]] deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "2c962245732371acd51700dbb268af311bddd719" +git-tree-sha1 = "064b532283c97daae49e544bb9cb413c26511f8c" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.6" +version = "0.34.8" [[deps.StatsFuns]] deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" +git-tree-sha1 = "91f091a8716a6bb38417a6e6f274602a19aaa685" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.5.0" +version = "1.5.2" weakdeps = ["ChainRulesCore", "InverseFunctions"] [deps.StatsFuns.extensions] StatsFunsChainRulesCoreExt = "ChainRulesCore" StatsFunsInverseFunctionsExt = "InverseFunctions" -[[deps.SteadyStateDiffEq]] -deps = ["ConcreteStructs", "DiffEqBase", "DiffEqCallbacks", "LinearAlgebra", "NonlinearSolveBase", "Reexport", "SciMLBase"] -git-tree-sha1 = "66a028f9a2bb44d0f6de0814a2b9840af548143a" -uuid = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" -version = "2.5.0" - -[[deps.StochasticDiffEq]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqNoiseProcess", "DocStringExtensions", "FastPower", "FiniteDiff", "ForwardDiff", "JumpProcesses", "LevyArea", "LinearAlgebra", "Logging", "MuladdMacro", "NLsolve", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SparseArrays", "StaticArrays", "UnPack"] -git-tree-sha1 = "c3a55a2a1e180e249a0550d30a58c700487aa7ef" -uuid = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" -version = "6.81.0" - [[deps.StrideArraysCore]] deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] git-tree-sha1 = "83151ba8065a73f53ca2ae98bc7274d817aa30f2" @@ -2040,9 +2016,19 @@ version = "0.5.8" [[deps.StringManipulation]] deps = ["PrecompileTools"] -git-tree-sha1 = "725421ae8e530ec29bcbdddbe91ff8053421d023" +git-tree-sha1 = "a3c1536470bf8c5e02096ad4853606d7c8f62721" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" -version = "0.4.1" +version = "0.4.2" + +[[deps.StructTypes]] +deps = ["Dates", "UUIDs"] +git-tree-sha1 = "159331b30e94d7b11379037feeb9b690950cace8" +uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" +version = "1.11.0" + +[[deps.StyledStrings]] +uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" +version = "1.11.0" [[deps.SuiteSparse]] deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] @@ -2051,25 +2037,13 @@ uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" - -[[deps.Sundials]] -deps = ["CEnum", "DataStructures", "DiffEqBase", "Libdl", "LinearAlgebra", "Logging", "PrecompileTools", "Reexport", "SciMLBase", "SparseArrays", "Sundials_jll"] -git-tree-sha1 = "7c7a7ee705724b3c80d5451ac49779db36c6f758" -uuid = "c3572dad-4567-51f8-b174-8c6c989267f4" -version = "4.28.0" - -[[deps.Sundials_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "SuiteSparse_jll", "libblastrampoline_jll"] -git-tree-sha1 = "91db7ed92c66f81435fe880947171f1212936b14" -uuid = "fb77eaff-e24c-56d4-86b1-d163f2edb164" -version = "5.2.3+0" +version = "7.8.3+2" [[deps.SymbolicIndexingInterface]] deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "b19cf024a2b11d72bef7c74ac3d1cbe86ec9e4ed" +git-tree-sha1 = "94c58884e013efff548002e8dc2fdd1cb74dfce5" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.44" +version = "0.3.46" weakdeps = ["PrettyTables"] [deps.SymbolicIndexingInterface.extensions] @@ -2097,9 +2071,9 @@ version = "3.32.0" [[deps.Symbolics]] deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "LaTeXStrings", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "OffsetArrays", "PrecompileTools", "Primes", "RecipesBase", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "SciMLPublic", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] -git-tree-sha1 = "9c9c6c74d3c88ca0bb66ff7751537f77ea3ef55d" +git-tree-sha1 = "8206e177903a41519145f577cb7f3793f3b7c960" uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "6.55.0" +version = "6.57.0" [deps.Symbolics.extensions] SymbolicsD3TreesExt = "D3Trees" @@ -2158,6 +2132,12 @@ deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" version = "1.11.0" +[[deps.TestBaseModelica]] +deps = ["BaseModelica", "CSV", "DataFrames", "ModelingToolkit", "SciMLBase"] +path = "." +uuid = "bba3f925-4bbc-4b14-b723-9b95a7c9c63c" +version = "0.1.0" + [[deps.TestItems]] git-tree-sha1 = "42fd9023fef18b9b78c8343a4e2f3813ffbcefcb" uuid = "1c621080-faea-4a02-84b6-bbd5e436b8fe" @@ -2187,9 +2167,9 @@ uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.11.3" [[deps.Tricks]] -git-tree-sha1 = "372b90fe551c019541fafc6ff034199dc19c8436" +git-tree-sha1 = "311349fd1c93a31f783f977a71e8b062a57d4101" uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.12" +version = "0.1.13" [[deps.TruncatedStacktraces]] deps = ["InteractiveUtils", "MacroTools", "Preferences"] @@ -2218,9 +2198,9 @@ version = "1.11.0" [[deps.Unitful]] deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "cec2df8cf14e0844a8c4d770d12347fda5931d72" +git-tree-sha1 = "83360bda12f61c250835830cc40b64f487cc2230" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.25.0" +version = "1.25.1" weakdeps = ["ConstructionBase", "ForwardDiff", "InverseFunctions", "LaTeXStrings", "Latexify", "Printf"] [deps.Unitful.extensions] @@ -2236,6 +2216,11 @@ git-tree-sha1 = "25008b734a03736c41e2a7dc314ecb95bd6bbdb0" uuid = "a7c27f48-0311-42f6-a7f8-2c11e75eb415" version = "0.1.6" +[[deps.UnsafePointers]] +git-tree-sha1 = "c81331b3b2e60a982be57c046ec91f599ede674a" +uuid = "e17b2a0c-0bdf-430a-bd0c-3a23cae4ff39" +version = "1.0.0" + [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" @@ -2250,25 +2235,37 @@ version = "1.6.1" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+1" +version = "1.3.1+2" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.11.0+0" +version = "5.15.0+0" + +[[deps.micromamba_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "2ca2ac0b23a8e6b76752453e08428b3b4de28095" +uuid = "f8abcde7-e9b7-5caa-b8af-a437887ae8e4" +version = "1.5.12+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.59.0+0" +version = "1.64.0+1" [[deps.oneTBB_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d5a767a3bb77135a99e433afe0eb14cd7f6914c3" +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "1350188a69a6e46f799d3945beef36435ed7262f" uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" -version = "2022.0.0+0" +version = "2022.0.0+1" [[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" +version = "17.7.0+0" + +[[deps.pixi_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "f349584316617063160a947a82638f7611a8ef0f" +uuid = "4d7b5844-a134-5dcd-ac86-c8f19cd51bed" +version = "0.41.3+0" diff --git a/TestBaseModelica/Project.toml b/TestBaseModelica/Project.toml index 05ec5c3..dc2375a 100644 --- a/TestBaseModelica/Project.toml +++ b/TestBaseModelica/Project.toml @@ -1,14 +1,23 @@ name = "TestBaseModelica" uuid = "bba3f925-4bbc-4b14-b723-9b95a7c9c63c" -authors = ["AnHeuermann <38031952+AnHeuermann@users.noreply.github.com>"] version = "0.1.0" +authors = ["AnHeuermann <38031952+AnHeuermann@users.noreply.github.com>"] [deps] BaseModelica = "a17d5099-185d-4ff5-b5d3-51aa4569e56d" CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" +OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" +SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" + +[sources] +BaseModelica = {rev = "main", url = "https://github.com/SciML/BaseModelica.jl.git"} + +[compat] +ModelingToolkit = "10" +OrdinaryDiffEq = "6" +SciMLBase = "2" [extras] SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" diff --git a/TestBaseModelica/README.md b/TestBaseModelica/README.md index fb945e8..17184ea 100644 --- a/TestBaseModelica/README.md +++ b/TestBaseModelica/README.md @@ -5,36 +5,36 @@ Test coupling of Base Modelica export off OpenModelica and For a Base Modelica file exported by OpenModelica parsing with [BaseModelica.jl](https://github.com/SciML/BaseModelica.jl) and simulating with -[DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl) is +[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) is tested. ## Dependencies - - Julia - - Julia packages +- Julia +- Julia packages ## Precompilation To speed up the execution of the test and reduce the TTFP-overhad of Julia there are two options: 1. Precompile this package with - [PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl) and - start a new Julia session for each test. + [PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl) and + start a new Julia session for each test. - ```julia - julia> using PackageCompiler - (@v1.11) pkg> activate . - julia> create_sysimage(["TestBaseModelica"]; sysimage_path="TestBaseModelica.so", precompile_execution_file="precompile_skript.jl" ) - ``` + ```julia + julia> using PackageCompiler + (@v1.11) pkg> activate . + julia> create_sysimage(["TestBaseModelica"]; sysimage_path="TestBaseModelica.so", precompile_execution_file="precompile_skript.jl" ) + ``` - ```bash - time julia --project=$(pwd) -e 'using TestBaseModelica; solver_settings=SolverSettings(start_time=0.0, stop_time=1.0, interval=0.02, tolerance=1e-6); test_settings=TestSettings(modelname="ExampleFirstOrder", output_directory="ExampleFirstOrder", solver_settings=solver_settings); run_test(joinpath("examples", "ExampleFirstOrder.mo"); settings=test_settings)' + ```bash + time julia --project=$(pwd) -e 'using TestBaseModelica; solver_settings=SolverSettings(start_time=0.0, stop_time=1.0, interval=0.02, tolerance=1e-6); test_settings=TestSettings(modelname="FirstOrder", output_directory="FirstOrder", solver_settings=solver_settings); run_test(joinpath("examples", "FirstOrder.bmo"); settings=test_settings)' - time julia --sysimage=TestBaseModelica.so -e 'using .TestBaseModelica; solver_settings=SolverSettings(start_time=0.0, stop_time=1.0, interval=0.02, tolerance=1e-6); test_settings=TestSettings(modelname="ExampleFirstOrder", output_directory="ExampleFirstOrder", solver_settings=solver_settings); run_test(joinpath("examples", "ExampleFirstOrder.mo"); settings=test_settings)' - ``` + time julia --sysimage=TestBaseModelica.so -e 'using .TestBaseModelica; solver_settings=SolverSettings(start_time=0.0, stop_time=1.0, interval=0.02, tolerance=1e-6); test_settings=TestSettings(modelname="FirstOrder", output_directory="FirstOrder", solver_settings=solver_settings); run_test(joinpath("examples", "FirstOrder.bmo"); settings=test_settings)' + ``` 2. Keep a Julia daemon running in the background for all tests by using - [DaemonMode.jl](https://github.com/dmolina/DaemonMode.jl) + [DaemonMode.jl](https://github.com/dmolina/DaemonMode.jl) ## How to use @@ -49,9 +49,9 @@ solver_settings = SolverSettings( ) test_settings = TestSettings( - modelname = "ExampleFirstOrder", - output_directory = "ExampleFirstOrder", + modelname = "FirstOrder", + output_directory = "FirstOrder", solver_settings = solver_settings) -run_test(joinpath("examples", "ExampleFirstOrder.mo"); settings = test_settings) +run_test(joinpath("examples", "FirstOrder.bmo"); settings = test_settings) ``` diff --git a/TestBaseModelica/examples/CauerLowPassAnalog.bmo b/TestBaseModelica/examples/CauerLowPassAnalog.bmo new file mode 100644 index 0000000..106fbbb --- /dev/null +++ b/TestBaseModelica/examples/CauerLowPassAnalog.bmo @@ -0,0 +1,177 @@ +//! base 0.1.0 +package 'CauerLowPassAnalog' + model 'CauerLowPassAnalog' "Cauer low pass filter with analog components" + parameter Real 'l1'(unit = "H", quantity = "Inductance") = 1.304 "Filter coefficient I1"; + parameter Real 'l2'(unit = "H", quantity = "Inductance") = 0.8586 "Filter coefficient I2"; + parameter Real 'c1'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.072 "Filter coefficient c1"; + parameter Real 'c2'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.0 / (2.906997720064 * 'l1') "Filter coefficient c2"; + parameter Real 'c3'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.682 "Filter coefficient c3"; + parameter Real 'c4'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.0 / (1.392270203025 * 'l2') "Filter coefficient c4"; + parameter Real 'c5'(min = 0.0, unit = "F", quantity = "Capacitance") = 0.7262 "Filter coefficient c5"; + Real 'G.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'G.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C1.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c1' "Capacitance"; + Real 'C2.v'(start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C2.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C2.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c2' "Capacitance"; + Real 'C3.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C3.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C3.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C3.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C3.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C3.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C3.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c3' "Capacitance"; + Real 'C4.v'(start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C4.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C4.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C4.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C4.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C4.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C4.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c4' "Capacitance"; + Real 'C5.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C5.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C5.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C5.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C5.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C5.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C5.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c5' "Capacitance"; + Real 'L1.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'L1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L1.i'(fixed = true, start = 0.0, unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'L1.L'(start = 1.0, unit = "H", quantity = "Inductance") = 'l1' "Inductance"; + Real 'L2.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'L2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L2.i'(fixed = true, start = 0.0, unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'L2.L'(start = 1.0, unit = "H", quantity = "Inductance") = 'l2' "Inductance"; + parameter Real 'R1.R'(start = 1.0, unit = "Ohm", quantity = "Resistance") = 1.0 "Resistance at temperature T_ref"; + parameter Real 'R1.T_ref'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 300.15 "Reference temperature"; + parameter Real 'R1.alpha'(unit = "1/K", quantity = "LinearTemperatureCoefficient") = 0.0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))"; + Real 'R1.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'R1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R1.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Boolean 'R1.useHeatPort' = false "= true, if heatPort is enabled" annotation(Evaluate = true); + parameter Real 'R1.T'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 'R1.T_ref' "Fixed device temperature if useHeatPort = false"; + Real 'R1.LossPower'(unit = "W", quantity = "Power") "Loss power leaving component via heatPort"; + Real 'R1.T_heatPort'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") "Temperature of heatPort"; + Real 'R1.R_actual'(unit = "Ohm", quantity = "Resistance") "Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))"; + parameter Real 'R2.R'(start = 1.0, unit = "Ohm", quantity = "Resistance") = 1.0 "Resistance at temperature T_ref"; + parameter Real 'R2.T_ref'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 300.15 "Reference temperature"; + parameter Real 'R2.alpha'(unit = "1/K", quantity = "LinearTemperatureCoefficient") = 0.0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))"; + Real 'R2.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'R2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R2.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Boolean 'R2.useHeatPort' = false "= true, if heatPort is enabled" annotation(Evaluate = true); + parameter Real 'R2.T'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 'R2.T_ref' "Fixed device temperature if useHeatPort = false"; + Real 'R2.LossPower'(unit = "W", quantity = "Power") "Loss power leaving component via heatPort"; + Real 'R2.T_heatPort'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") "Temperature of heatPort"; + Real 'R2.R_actual'(unit = "Ohm", quantity = "Resistance") "Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))"; + parameter Real 'V.V'(start = 1.0, unit = "V", quantity = "ElectricPotential") = 1.0 "Height of step"; + Real 'V.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'V.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'V.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'V.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'V.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'V.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'V.signalSource.height' = 'V.V' "Height of step"; + Real 'V.signalSource.y' "Connector of Real output signal"; + parameter Real 'V.signalSource.offset' = 'V.offset' "Offset of output signal y"; + parameter Real 'V.signalSource.startTime'(unit = "s", quantity = "Time") = 'V.startTime' "Output y = offset for time < startTime"; + parameter Real 'V.offset'(unit = "V", quantity = "ElectricPotential") = 0.0 "Voltage offset"; + parameter Real 'V.startTime'(unit = "s", quantity = "Time") = 1.0 "Time offset"; + equation + 'L1.p.v' = 'C1.p.v'; + 'L1.p.v' = 'C2.p.v'; + 'L1.p.v' = 'R1.n.v'; + 'C2.n.v' = 'L2.p.v'; + 'C2.n.v' = 'C4.p.v'; + 'C2.n.v' = 'C3.p.v'; + 'C2.n.v' = 'L1.n.v'; + 'C4.n.v' = 'R2.p.v'; + 'C4.n.v' = 'C5.p.v'; + 'C4.n.v' = 'L2.n.v'; + 'V.n.v' = 'G.p.v'; + 'V.n.v' = 'R2.n.v'; + 'V.n.v' = 'C1.n.v'; + 'V.n.v' = 'C5.n.v'; + 'V.n.v' = 'C3.n.v'; + 'R1.p.v' = 'V.p.v'; + 'V.n.i' + 'R2.n.i' + 'C5.n.i' + 'C3.n.i' + 'C1.n.i' + 'G.p.i' = 0.0; + 'L2.p.i' + 'L1.n.i' + 'C4.p.i' + 'C3.p.i' + 'C2.n.i' = 0.0; + 'R2.p.i' + 'L2.n.i' + 'C5.p.i' + 'C4.n.i' = 0.0; + 'V.p.i' + 'R1.p.i' = 0.0; + 'R1.n.i' + 'L1.p.i' + 'C2.p.i' + 'C1.p.i' = 0.0; + 'G.p.v' = 0.0; + 'C1.i' = 'C1.C' * der('C1.v'); + 0.0 = 'C1.p.i' + 'C1.n.i'; + 'C1.i' = 'C1.p.i'; + 'C1.v' = 'C1.p.v' - 'C1.n.v'; + 'C2.i' = 'C2.C' * der('C2.v'); + 0.0 = 'C2.p.i' + 'C2.n.i'; + 'C2.i' = 'C2.p.i'; + 'C2.v' = 'C2.p.v' - 'C2.n.v'; + 'C3.i' = 'C3.C' * der('C3.v'); + 0.0 = 'C3.p.i' + 'C3.n.i'; + 'C3.i' = 'C3.p.i'; + 'C3.v' = 'C3.p.v' - 'C3.n.v'; + 'C4.i' = 'C4.C' * der('C4.v'); + 0.0 = 'C4.p.i' + 'C4.n.i'; + 'C4.i' = 'C4.p.i'; + 'C4.v' = 'C4.p.v' - 'C4.n.v'; + 'C5.i' = 'C5.C' * der('C5.v'); + 0.0 = 'C5.p.i' + 'C5.n.i'; + 'C5.i' = 'C5.p.i'; + 'C5.v' = 'C5.p.v' - 'C5.n.v'; + 'L1.L' * der('L1.i') = 'L1.v'; + 0.0 = 'L1.p.i' + 'L1.n.i'; + 'L1.i' = 'L1.p.i'; + 'L1.v' = 'L1.p.v' - 'L1.n.v'; + 'L2.L' * der('L2.i') = 'L2.v'; + 0.0 = 'L2.p.i' + 'L2.n.i'; + 'L2.i' = 'L2.p.i'; + 'L2.v' = 'L2.p.v' - 'L2.n.v'; + assert(1.0 + 'R1.alpha' * ('R1.T_heatPort' - 'R1.T_ref') >= 2.220446049250313e-16, "Temperature outside scope of model!", AssertionLevel.error); + 'R1.R_actual' = 'R1.R' * (1.0 + 'R1.alpha' * ('R1.T_heatPort' - 'R1.T_ref')); + 'R1.v' = 'R1.R_actual' * 'R1.i'; + 'R1.LossPower' = 'R1.v' * 'R1.i'; + 'R1.T_heatPort' = 'R1.T'; + 0.0 = 'R1.p.i' + 'R1.n.i'; + 'R1.i' = 'R1.p.i'; + 'R1.v' = 'R1.p.v' - 'R1.n.v'; + assert(1.0 + 'R2.alpha' * ('R2.T_heatPort' - 'R2.T_ref') >= 2.220446049250313e-16, "Temperature outside scope of model!", AssertionLevel.error); + 'R2.R_actual' = 'R2.R' * (1.0 + 'R2.alpha' * ('R2.T_heatPort' - 'R2.T_ref')); + 'R2.v' = 'R2.R_actual' * 'R2.i'; + 'R2.LossPower' = 'R2.v' * 'R2.i'; + 'R2.T_heatPort' = 'R2.T'; + 0.0 = 'R2.p.i' + 'R2.n.i'; + 'R2.i' = 'R2.p.i'; + 'R2.v' = 'R2.p.v' - 'R2.n.v'; + 'V.signalSource.y' = 'V.signalSource.offset' + (if time < 'V.signalSource.startTime' then 0.0 else 'V.signalSource.height'); + 'V.v' = 'V.signalSource.y'; + 0.0 = 'V.p.i' + 'V.n.i'; + 'V.i' = 'V.p.i'; + 'V.v' = 'V.p.v' - 'V.n.v'; + annotation(experiment(StopTime = 60)); + end 'CauerLowPassAnalog'; +end 'CauerLowPassAnalog'; diff --git a/TestBaseModelica/examples/CauerLowPassAnalogSine.bmo b/TestBaseModelica/examples/CauerLowPassAnalogSine.bmo new file mode 100644 index 0000000..4f0bf5e --- /dev/null +++ b/TestBaseModelica/examples/CauerLowPassAnalogSine.bmo @@ -0,0 +1,182 @@ +//! base 0.1.0 +package 'CauerLowPassAnalogSine' + model 'CauerLowPassAnalogSine' "Cauer low pass filter with analog components" + parameter Real 'l1'(unit = "H", quantity = "Inductance") = 1.304 "Filter coefficient I1"; + parameter Real 'l2'(unit = "H", quantity = "Inductance") = 0.8586 "Filter coefficient I2"; + parameter Real 'c1'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.072 "Filter coefficient c1"; + parameter Real 'c2'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.0 / (2.906997720064 * 'l1') "Filter coefficient c2"; + parameter Real 'c3'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.682 "Filter coefficient c3"; + parameter Real 'c4'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.0 / (1.392270203025 * 'l2') "Filter coefficient c4"; + parameter Real 'c5'(min = 0.0, unit = "F", quantity = "Capacitance") = 0.7262 "Filter coefficient c5"; + Real 'G.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'G.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C1.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c1' "Capacitance"; + Real 'C2.v'(start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C2.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C2.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c2' "Capacitance"; + Real 'C3.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C3.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C3.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C3.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C3.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C3.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C3.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c3' "Capacitance"; + Real 'C4.v'(start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C4.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C4.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C4.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C4.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C4.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C4.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c4' "Capacitance"; + Real 'C5.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C5.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C5.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C5.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C5.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C5.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C5.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c5' "Capacitance"; + Real 'L1.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'L1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L1.i'(fixed = true, start = 0.0, unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'L1.L'(start = 1.0, unit = "H", quantity = "Inductance") = 'l1' "Inductance"; + Real 'L2.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'L2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L2.i'(fixed = true, start = 0.0, unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'L2.L'(start = 1.0, unit = "H", quantity = "Inductance") = 'l2' "Inductance"; + parameter Real 'R1.R'(start = 1.0, unit = "Ohm", quantity = "Resistance") = 1.0 "Resistance at temperature T_ref"; + parameter Real 'R1.T_ref'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 300.15 "Reference temperature"; + parameter Real 'R1.alpha'(unit = "1/K", quantity = "LinearTemperatureCoefficient") = 0.0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))"; + Real 'R1.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'R1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R1.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Boolean 'R1.useHeatPort' = false "= true, if heatPort is enabled" annotation(Evaluate = true); + parameter Real 'R1.T'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 'R1.T_ref' "Fixed device temperature if useHeatPort = false"; + Real 'R1.LossPower'(unit = "W", quantity = "Power") "Loss power leaving component via heatPort"; + Real 'R1.T_heatPort'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") "Temperature of heatPort"; + Real 'R1.R_actual'(unit = "Ohm", quantity = "Resistance") "Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))"; + parameter Real 'R2.R'(start = 1.0, unit = "Ohm", quantity = "Resistance") = 1.0 "Resistance at temperature T_ref"; + parameter Real 'R2.T_ref'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 300.15 "Reference temperature"; + parameter Real 'R2.alpha'(unit = "1/K", quantity = "LinearTemperatureCoefficient") = 0.0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))"; + Real 'R2.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'R2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R2.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Boolean 'R2.useHeatPort' = false "= true, if heatPort is enabled" annotation(Evaluate = true); + parameter Real 'R2.T'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 'R2.T_ref' "Fixed device temperature if useHeatPort = false"; + Real 'R2.LossPower'(unit = "W", quantity = "Power") "Loss power leaving component via heatPort"; + Real 'R2.T_heatPort'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") "Temperature of heatPort"; + Real 'R2.R_actual'(unit = "Ohm", quantity = "Resistance") "Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))"; + parameter Real 'V.V'(start = 1.0, unit = "V", quantity = "ElectricPotential") = 10.0 "Amplitude of sine wave"; + parameter Real 'V.phase'(displayUnit = "deg", unit = "rad", quantity = "Angle") = 0.0 "Phase of sine wave"; + parameter Real 'V.f'(start = 1.0, unit = "Hz", quantity = "Frequency") = 0.5 "Frequency of sine wave"; + Real 'V.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'V.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'V.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'V.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'V.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'V.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'V.signalSource.amplitude' = 'V.V' "Amplitude of sine wave"; + parameter Real 'V.signalSource.f'(start = 1.0, unit = "Hz", quantity = "Frequency") = 'V.f' "Frequency of sine wave"; + parameter Real 'V.signalSource.phase'(displayUnit = "deg", unit = "rad", quantity = "Angle") = 'V.phase' "Phase of sine wave"; + parameter Boolean 'V.signalSource.continuous' = false "Make output continuous by starting at offset + amplitude*sin(phase)" annotation(Evaluate = true); + Real 'V.signalSource.y' "Connector of Real output signal"; + parameter Real 'V.signalSource.offset' = 'V.offset' "Offset of output signal y"; + parameter Real 'V.signalSource.startTime'(unit = "s", quantity = "Time") = 'V.startTime' "Output y = offset for time < startTime"; + parameter Real 'V.offset'(unit = "V", quantity = "ElectricPotential") = 0.0 "Voltage offset"; + parameter Real 'V.startTime'(unit = "s", quantity = "Time") = 0.0 "Time offset"; + equation + 'L1.p.v' = 'C1.p.v'; + 'L1.p.v' = 'C2.p.v'; + 'L1.p.v' = 'R1.n.v'; + 'C2.n.v' = 'L2.p.v'; + 'C2.n.v' = 'C4.p.v'; + 'C2.n.v' = 'C3.p.v'; + 'C2.n.v' = 'L1.n.v'; + 'C4.n.v' = 'R2.p.v'; + 'C4.n.v' = 'C5.p.v'; + 'C4.n.v' = 'L2.n.v'; + 'V.n.v' = 'G.p.v'; + 'V.n.v' = 'R2.n.v'; + 'V.n.v' = 'C1.n.v'; + 'V.n.v' = 'C5.n.v'; + 'V.n.v' = 'C3.n.v'; + 'R1.p.v' = 'V.p.v'; + 'V.n.i' + 'R2.n.i' + 'C5.n.i' + 'C3.n.i' + 'C1.n.i' + 'G.p.i' = 0.0; + 'L2.p.i' + 'L1.n.i' + 'C4.p.i' + 'C3.p.i' + 'C2.n.i' = 0.0; + 'R2.p.i' + 'L2.n.i' + 'C5.p.i' + 'C4.n.i' = 0.0; + 'V.p.i' + 'R1.p.i' = 0.0; + 'R1.n.i' + 'L1.p.i' + 'C2.p.i' + 'C1.p.i' = 0.0; + 'G.p.v' = 0.0; + 'C1.i' = 'C1.C' * der('C1.v'); + 0.0 = 'C1.p.i' + 'C1.n.i'; + 'C1.i' = 'C1.p.i'; + 'C1.v' = 'C1.p.v' - 'C1.n.v'; + 'C2.i' = 'C2.C' * der('C2.v'); + 0.0 = 'C2.p.i' + 'C2.n.i'; + 'C2.i' = 'C2.p.i'; + 'C2.v' = 'C2.p.v' - 'C2.n.v'; + 'C3.i' = 'C3.C' * der('C3.v'); + 0.0 = 'C3.p.i' + 'C3.n.i'; + 'C3.i' = 'C3.p.i'; + 'C3.v' = 'C3.p.v' - 'C3.n.v'; + 'C4.i' = 'C4.C' * der('C4.v'); + 0.0 = 'C4.p.i' + 'C4.n.i'; + 'C4.i' = 'C4.p.i'; + 'C4.v' = 'C4.p.v' - 'C4.n.v'; + 'C5.i' = 'C5.C' * der('C5.v'); + 0.0 = 'C5.p.i' + 'C5.n.i'; + 'C5.i' = 'C5.p.i'; + 'C5.v' = 'C5.p.v' - 'C5.n.v'; + 'L1.L' * der('L1.i') = 'L1.v'; + 0.0 = 'L1.p.i' + 'L1.n.i'; + 'L1.i' = 'L1.p.i'; + 'L1.v' = 'L1.p.v' - 'L1.n.v'; + 'L2.L' * der('L2.i') = 'L2.v'; + 0.0 = 'L2.p.i' + 'L2.n.i'; + 'L2.i' = 'L2.p.i'; + 'L2.v' = 'L2.p.v' - 'L2.n.v'; + assert(1.0 + 'R1.alpha' * ('R1.T_heatPort' - 'R1.T_ref') >= 2.220446049250313e-16, "Temperature outside scope of model!", AssertionLevel.error); + 'R1.R_actual' = 'R1.R' * (1.0 + 'R1.alpha' * ('R1.T_heatPort' - 'R1.T_ref')); + 'R1.v' = 'R1.R_actual' * 'R1.i'; + 'R1.LossPower' = 'R1.v' * 'R1.i'; + 'R1.T_heatPort' = 'R1.T'; + 0.0 = 'R1.p.i' + 'R1.n.i'; + 'R1.i' = 'R1.p.i'; + 'R1.v' = 'R1.p.v' - 'R1.n.v'; + assert(1.0 + 'R2.alpha' * ('R2.T_heatPort' - 'R2.T_ref') >= 2.220446049250313e-16, "Temperature outside scope of model!", AssertionLevel.error); + 'R2.R_actual' = 'R2.R' * (1.0 + 'R2.alpha' * ('R2.T_heatPort' - 'R2.T_ref')); + 'R2.v' = 'R2.R_actual' * 'R2.i'; + 'R2.LossPower' = 'R2.v' * 'R2.i'; + 'R2.T_heatPort' = 'R2.T'; + 0.0 = 'R2.p.i' + 'R2.n.i'; + 'R2.i' = 'R2.p.i'; + 'R2.v' = 'R2.p.v' - 'R2.n.v'; + 'V.signalSource.y' = 'V.signalSource.offset' + (if time < 'V.signalSource.startTime' then 0.0 else 'V.signalSource.amplitude' * sin(6.283185307179586 * 'V.signalSource.f' * (time - 'V.signalSource.startTime') + 'V.signalSource.phase')); + 'V.v' = 'V.signalSource.y'; + 0.0 = 'V.p.i' + 'V.n.i'; + 'V.i' = 'V.p.i'; + 'V.v' = 'V.p.v' - 'V.n.v'; + annotation(experiment(StopTime = 60)); + end 'CauerLowPassAnalogSine'; +end 'CauerLowPassAnalogSine'; diff --git a/TestBaseModelica/examples/CauerLowPassAnalogSineNoAssert.bmo b/TestBaseModelica/examples/CauerLowPassAnalogSineNoAssert.bmo new file mode 100644 index 0000000..1050fb2 --- /dev/null +++ b/TestBaseModelica/examples/CauerLowPassAnalogSineNoAssert.bmo @@ -0,0 +1,180 @@ +//! base 0.1.0 +package 'CauerLowPassAnalogSine' + model 'CauerLowPassAnalogSine' "Cauer low pass filter with analog components" + parameter Real 'l1'(unit = "H", quantity = "Inductance") = 1.304 "Filter coefficient I1"; + parameter Real 'l2'(unit = "H", quantity = "Inductance") = 0.8586 "Filter coefficient I2"; + parameter Real 'c1'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.072 "Filter coefficient c1"; + parameter Real 'c2'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.0 / (2.906997720064 * 'l1') "Filter coefficient c2"; + parameter Real 'c3'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.682 "Filter coefficient c3"; + parameter Real 'c4'(min = 0.0, unit = "F", quantity = "Capacitance") = 1.0 / (1.392270203025 * 'l2') "Filter coefficient c4"; + parameter Real 'c5'(min = 0.0, unit = "F", quantity = "Capacitance") = 0.7262 "Filter coefficient c5"; + Real 'G.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'G.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C1.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c1' "Capacitance"; + Real 'C2.v'(start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C2.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C2.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c2' "Capacitance"; + Real 'C3.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C3.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C3.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C3.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C3.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C3.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C3.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c3' "Capacitance"; + Real 'C4.v'(start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C4.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C4.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C4.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C4.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C4.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C4.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c4' "Capacitance"; + Real 'C5.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C5.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C5.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C5.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C5.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C5.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C5.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 'c5' "Capacitance"; + Real 'L1.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'L1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L1.i'(fixed = true, start = 0.0, unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'L1.L'(start = 1.0, unit = "H", quantity = "Inductance") = 'l1' "Inductance"; + Real 'L2.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'L2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L2.i'(fixed = true, start = 0.0, unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'L2.L'(start = 1.0, unit = "H", quantity = "Inductance") = 'l2' "Inductance"; + parameter Real 'R1.R'(start = 1.0, unit = "Ohm", quantity = "Resistance") = 1.0 "Resistance at temperature T_ref"; + parameter Real 'R1.T_ref'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 300.15 "Reference temperature"; + parameter Real 'R1.alpha'(unit = "1/K", quantity = "LinearTemperatureCoefficient") = 0.0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))"; + Real 'R1.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'R1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R1.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Boolean 'R1.useHeatPort' = false "= true, if heatPort is enabled" annotation(Evaluate = true); + parameter Real 'R1.T'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 'R1.T_ref' "Fixed device temperature if useHeatPort = false"; + Real 'R1.LossPower'(unit = "W", quantity = "Power") "Loss power leaving component via heatPort"; + Real 'R1.T_heatPort'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") "Temperature of heatPort"; + Real 'R1.R_actual'(unit = "Ohm", quantity = "Resistance") "Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))"; + parameter Real 'R2.R'(start = 1.0, unit = "Ohm", quantity = "Resistance") = 1.0 "Resistance at temperature T_ref"; + parameter Real 'R2.T_ref'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 300.15 "Reference temperature"; + parameter Real 'R2.alpha'(unit = "1/K", quantity = "LinearTemperatureCoefficient") = 0.0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))"; + Real 'R2.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'R2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'R2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'R2.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Boolean 'R2.useHeatPort' = false "= true, if heatPort is enabled" annotation(Evaluate = true); + parameter Real 'R2.T'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 'R2.T_ref' "Fixed device temperature if useHeatPort = false"; + Real 'R2.LossPower'(unit = "W", quantity = "Power") "Loss power leaving component via heatPort"; + Real 'R2.T_heatPort'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") "Temperature of heatPort"; + Real 'R2.R_actual'(unit = "Ohm", quantity = "Resistance") "Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))"; + parameter Real 'V.V'(start = 1.0, unit = "V", quantity = "ElectricPotential") = 10.0 "Amplitude of sine wave"; + parameter Real 'V.phase'(displayUnit = "deg", unit = "rad", quantity = "Angle") = 0.0 "Phase of sine wave"; + parameter Real 'V.f'(start = 1.0, unit = "Hz", quantity = "Frequency") = 0.5 "Frequency of sine wave"; + Real 'V.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'V.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'V.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'V.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'V.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'V.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'V.signalSource.amplitude' = 'V.V' "Amplitude of sine wave"; + parameter Real 'V.signalSource.f'(start = 1.0, unit = "Hz", quantity = "Frequency") = 'V.f' "Frequency of sine wave"; + parameter Real 'V.signalSource.phase'(displayUnit = "deg", unit = "rad", quantity = "Angle") = 'V.phase' "Phase of sine wave"; + parameter Boolean 'V.signalSource.continuous' = false "Make output continuous by starting at offset + amplitude*sin(phase)" annotation(Evaluate = true); + Real 'V.signalSource.y' "Connector of Real output signal"; + parameter Real 'V.signalSource.offset' = 'V.offset' "Offset of output signal y"; + parameter Real 'V.signalSource.startTime'(unit = "s", quantity = "Time") = 'V.startTime' "Output y = offset for time < startTime"; + parameter Real 'V.offset'(unit = "V", quantity = "ElectricPotential") = 0.0 "Voltage offset"; + parameter Real 'V.startTime'(unit = "s", quantity = "Time") = 0.0 "Time offset"; + equation + 'L1.p.v' = 'C1.p.v'; + 'L1.p.v' = 'C2.p.v'; + 'L1.p.v' = 'R1.n.v'; + 'C2.n.v' = 'L2.p.v'; + 'C2.n.v' = 'C4.p.v'; + 'C2.n.v' = 'C3.p.v'; + 'C2.n.v' = 'L1.n.v'; + 'C4.n.v' = 'R2.p.v'; + 'C4.n.v' = 'C5.p.v'; + 'C4.n.v' = 'L2.n.v'; + 'V.n.v' = 'G.p.v'; + 'V.n.v' = 'R2.n.v'; + 'V.n.v' = 'C1.n.v'; + 'V.n.v' = 'C5.n.v'; + 'V.n.v' = 'C3.n.v'; + 'R1.p.v' = 'V.p.v'; + 'V.n.i' + 'R2.n.i' + 'C5.n.i' + 'C3.n.i' + 'C1.n.i' + 'G.p.i' = 0.0; + 'L2.p.i' + 'L1.n.i' + 'C4.p.i' + 'C3.p.i' + 'C2.n.i' = 0.0; + 'R2.p.i' + 'L2.n.i' + 'C5.p.i' + 'C4.n.i' = 0.0; + 'V.p.i' + 'R1.p.i' = 0.0; + 'R1.n.i' + 'L1.p.i' + 'C2.p.i' + 'C1.p.i' = 0.0; + 'G.p.v' = 0.0; + 'C1.i' = 'C1.C' * der('C1.v'); + 0.0 = 'C1.p.i' + 'C1.n.i'; + 'C1.i' = 'C1.p.i'; + 'C1.v' = 'C1.p.v' - 'C1.n.v'; + 'C2.i' = 'C2.C' * der('C2.v'); + 0.0 = 'C2.p.i' + 'C2.n.i'; + 'C2.i' = 'C2.p.i'; + 'C2.v' = 'C2.p.v' - 'C2.n.v'; + 'C3.i' = 'C3.C' * der('C3.v'); + 0.0 = 'C3.p.i' + 'C3.n.i'; + 'C3.i' = 'C3.p.i'; + 'C3.v' = 'C3.p.v' - 'C3.n.v'; + 'C4.i' = 'C4.C' * der('C4.v'); + 0.0 = 'C4.p.i' + 'C4.n.i'; + 'C4.i' = 'C4.p.i'; + 'C4.v' = 'C4.p.v' - 'C4.n.v'; + 'C5.i' = 'C5.C' * der('C5.v'); + 0.0 = 'C5.p.i' + 'C5.n.i'; + 'C5.i' = 'C5.p.i'; + 'C5.v' = 'C5.p.v' - 'C5.n.v'; + 'L1.L' * der('L1.i') = 'L1.v'; + 0.0 = 'L1.p.i' + 'L1.n.i'; + 'L1.i' = 'L1.p.i'; + 'L1.v' = 'L1.p.v' - 'L1.n.v'; + 'L2.L' * der('L2.i') = 'L2.v'; + 0.0 = 'L2.p.i' + 'L2.n.i'; + 'L2.i' = 'L2.p.i'; + 'L2.v' = 'L2.p.v' - 'L2.n.v'; + 'R1.R_actual' = 'R1.R' * (1.0 + 'R1.alpha' * ('R1.T_heatPort' - 'R1.T_ref')); + 'R1.v' = 'R1.R_actual' * 'R1.i'; + 'R1.LossPower' = 'R1.v' * 'R1.i'; + 'R1.T_heatPort' = 'R1.T'; + 0.0 = 'R1.p.i' + 'R1.n.i'; + 'R1.i' = 'R1.p.i'; + 'R1.v' = 'R1.p.v' - 'R1.n.v'; + 'R2.R_actual' = 'R2.R' * (1.0 + 'R2.alpha' * ('R2.T_heatPort' - 'R2.T_ref')); + 'R2.v' = 'R2.R_actual' * 'R2.i'; + 'R2.LossPower' = 'R2.v' * 'R2.i'; + 'R2.T_heatPort' = 'R2.T'; + 0.0 = 'R2.p.i' + 'R2.n.i'; + 'R2.i' = 'R2.p.i'; + 'R2.v' = 'R2.p.v' - 'R2.n.v'; + 'V.signalSource.y' = 'V.signalSource.offset' + (if time < 'V.signalSource.startTime' then 0.0 else 'V.signalSource.amplitude' * sin(6.283185307179586 * 'V.signalSource.f' * (time - 'V.signalSource.startTime') + 'V.signalSource.phase')); + 'V.v' = 'V.signalSource.y'; + 0.0 = 'V.p.i' + 'V.n.i'; + 'V.i' = 'V.p.i'; + 'V.v' = 'V.p.v' - 'V.n.v'; + annotation(experiment(StopTime = 60)); + end 'CauerLowPassAnalogSine'; +end 'CauerLowPassAnalogSine'; diff --git a/TestBaseModelica/examples/ChuaCircuit.bmo b/TestBaseModelica/examples/ChuaCircuit.bmo new file mode 100644 index 0000000..bcbd547 --- /dev/null +++ b/TestBaseModelica/examples/ChuaCircuit.bmo @@ -0,0 +1,113 @@ +//! base 0.1.0 +package 'ChuaCircuit' + model 'ChuaCircuit' "Chua's circuit, ns, V, A" + Real 'L.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'L.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L.i'(fixed = true, start = 0.0, unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'L.L'(start = 1.0, unit = "H", quantity = "Inductance") = 18.0 "Inductance"; + parameter Real 'Ro.R'(start = 1.0, unit = "Ohm", quantity = "Resistance") = 0.0125 "Resistance at temperature T_ref"; + parameter Real 'Ro.T_ref'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 300.15 "Reference temperature"; + parameter Real 'Ro.alpha'(unit = "1/K", quantity = "LinearTemperatureCoefficient") = 0.0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))"; + Real 'Ro.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'Ro.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'Ro.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'Ro.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'Ro.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'Ro.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Boolean 'Ro.useHeatPort' = false "= true, if heatPort is enabled" annotation(Evaluate = true); + parameter Real 'Ro.T'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 'Ro.T_ref' "Fixed device temperature if useHeatPort = false"; + Real 'Ro.LossPower'(unit = "W", quantity = "Power") "Loss power leaving component via heatPort"; + Real 'Ro.T_heatPort'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") "Temperature of heatPort"; + Real 'Ro.R_actual'(unit = "Ohm", quantity = "Resistance") "Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))"; + parameter Real 'G.G'(start = 1.0, unit = "S", quantity = "Conductance") = 0.565 "Conductance at temperature T_ref"; + parameter Real 'G.T_ref'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 300.15 "Reference temperature"; + parameter Real 'G.alpha'(unit = "1/K", quantity = "LinearTemperatureCoefficient") = 0.0 "Temperature coefficient of conductance (G_actual = G_ref/(1 + alpha*(T_heatPort - T_ref))"; + Real 'G.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'G.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'G.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'G.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'G.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'G.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Boolean 'G.useHeatPort' = false "= true, if heatPort is enabled" annotation(Evaluate = true); + parameter Real 'G.T'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 'G.T_ref' "Fixed device temperature if useHeatPort = false"; + Real 'G.LossPower'(unit = "W", quantity = "Power") "Loss power leaving component via heatPort"; + Real 'G.T_heatPort'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") "Temperature of heatPort"; + Real 'G.G_actual'(unit = "S", quantity = "Conductance") "Actual conductance = G_ref/(1 + alpha*(T_heatPort - T_ref))"; + Real 'C1.v'(fixed = true, start = 4.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C1.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 10.0 "Capacitance"; + Real 'C2.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C2.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C2.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 100.0 "Capacitance"; + Real 'Nr.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'Nr.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'Nr.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'Nr.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'Nr.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'Nr.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'Nr.Ga'(min = -1.0, unit = "S", quantity = "Conductance") = -0.757576 "Conductance in inner voltage range"; + parameter Real 'Nr.Gb'(min = -1.0, unit = "S", quantity = "Conductance") = -0.409091 "Conductance in outer voltage range"; + parameter Real 'Nr.Ve'(unit = "V", quantity = "ElectricPotential") = 1.0 "Inner voltage range limit"; + Real 'Gnd.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'Gnd.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + equation + 'L.n.v' = 'Ro.p.v'; + 'L.p.v' = 'G.p.v'; + 'L.p.v' = 'C2.p.v'; + 'C1.p.v' = 'G.n.v'; + 'C1.p.v' = 'Nr.p.v'; + 'Gnd.p.v' = 'Nr.n.v'; + 'Gnd.p.v' = 'C1.n.v'; + 'Gnd.p.v' = 'C2.n.v'; + 'Gnd.p.v' = 'Ro.n.v'; + 'Ro.p.i' + 'L.n.i' = 0.0; + 'Gnd.p.i' + 'Nr.n.i' + 'C2.n.i' + 'C1.n.i' + 'Ro.n.i' = 0.0; + 'C2.p.i' + 'G.p.i' + 'L.p.i' = 0.0; + 'Nr.p.i' + 'C1.p.i' + 'G.n.i' = 0.0; + 'L.L' * der('L.i') = 'L.v'; + 0.0 = 'L.p.i' + 'L.n.i'; + 'L.i' = 'L.p.i'; + 'L.v' = 'L.p.v' - 'L.n.v'; + assert(1.0 + 'Ro.alpha' * ('Ro.T_heatPort' - 'Ro.T_ref') >= 2.220446049250313e-16, "Temperature outside scope of model!", AssertionLevel.error); + 'Ro.R_actual' = 'Ro.R' * (1.0 + 'Ro.alpha' * ('Ro.T_heatPort' - 'Ro.T_ref')); + 'Ro.v' = 'Ro.R_actual' * 'Ro.i'; + 'Ro.LossPower' = 'Ro.v' * 'Ro.i'; + 'Ro.T_heatPort' = 'Ro.T'; + 0.0 = 'Ro.p.i' + 'Ro.n.i'; + 'Ro.i' = 'Ro.p.i'; + 'Ro.v' = 'Ro.p.v' - 'Ro.n.v'; + assert(1.0 + 'G.alpha' * ('G.T_heatPort' - 'G.T_ref') >= 2.220446049250313e-16, "Temperature outside scope of model!", AssertionLevel.error); + 'G.G_actual' = 'G.G' / (1.0 + 'G.alpha' * ('G.T_heatPort' - 'G.T_ref')); + 'G.i' = 'G.G_actual' * 'G.v'; + 'G.LossPower' = 'G.v' * 'G.i'; + 'G.T_heatPort' = 'G.T'; + 0.0 = 'G.p.i' + 'G.n.i'; + 'G.i' = 'G.p.i'; + 'G.v' = 'G.p.v' - 'G.n.v'; + 'C1.i' = 'C1.C' * der('C1.v'); + 0.0 = 'C1.p.i' + 'C1.n.i'; + 'C1.i' = 'C1.p.i'; + 'C1.v' = 'C1.p.v' - 'C1.n.v'; + 'C2.i' = 'C2.C' * der('C2.v'); + 0.0 = 'C2.p.i' + 'C2.n.i'; + 'C2.i' = 'C2.p.i'; + 'C2.v' = 'C2.p.v' - 'C2.n.v'; + 'Nr.i' = if 'Nr.v' < (-'Nr.Ve') then 'Nr.Gb' * ('Nr.v' + 'Nr.Ve') - 'Nr.Ga' * 'Nr.Ve' else if 'Nr.v' > 'Nr.Ve' then 'Nr.Gb' * ('Nr.v' - 'Nr.Ve') + 'Nr.Ga' * 'Nr.Ve' else 'Nr.Ga' * 'Nr.v'; + 0.0 = 'Nr.p.i' + 'Nr.n.i'; + 'Nr.i' = 'Nr.p.i'; + 'Nr.v' = 'Nr.p.v' - 'Nr.n.v'; + 'Gnd.p.v' = 0.0; + annotation(experiment(StopTime = 5e4, Interval = 1)); + end 'ChuaCircuit'; +end 'ChuaCircuit'; diff --git a/TestBaseModelica/examples/ChuaCircuitNoAssert.bmo b/TestBaseModelica/examples/ChuaCircuitNoAssert.bmo new file mode 100644 index 0000000..a593fc1 --- /dev/null +++ b/TestBaseModelica/examples/ChuaCircuitNoAssert.bmo @@ -0,0 +1,113 @@ +//! base 0.1.0 +package 'ChuaCircuit' + model 'ChuaCircuit' "Chua's circuit, ns, V, A" + Real 'L.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'L.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'L.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'L.i'(fixed = true, start = 0.0, unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'L.L'(start = 1.0, unit = "H", quantity = "Inductance") = 18.0 "Inductance"; + parameter Real 'Ro.R'(start = 1.0, unit = "Ohm", quantity = "Resistance") = 0.0125 "Resistance at temperature T_ref"; + parameter Real 'Ro.T_ref'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 300.15 "Reference temperature"; + parameter Real 'Ro.alpha'(unit = "1/K", quantity = "LinearTemperatureCoefficient") = 0.0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))"; + Real 'Ro.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'Ro.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'Ro.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'Ro.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'Ro.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'Ro.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Boolean 'Ro.useHeatPort' = false "= true, if heatPort is enabled" annotation(Evaluate = true); + parameter Real 'Ro.T'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 'Ro.T_ref' "Fixed device temperature if useHeatPort = false"; + Real 'Ro.LossPower'(unit = "W", quantity = "Power") "Loss power leaving component via heatPort"; + Real 'Ro.T_heatPort'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") "Temperature of heatPort"; + Real 'Ro.R_actual'(unit = "Ohm", quantity = "Resistance") "Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))"; + parameter Real 'G.G'(start = 1.0, unit = "S", quantity = "Conductance") = 0.565 "Conductance at temperature T_ref"; + parameter Real 'G.T_ref'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 300.15 "Reference temperature"; + parameter Real 'G.alpha'(unit = "1/K", quantity = "LinearTemperatureCoefficient") = 0.0 "Temperature coefficient of conductance (G_actual = G_ref/(1 + alpha*(T_heatPort - T_ref))"; + Real 'G.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'G.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'G.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'G.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'G.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'G.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Boolean 'G.useHeatPort' = false "= true, if heatPort is enabled" annotation(Evaluate = true); + parameter Real 'G.T'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") = 'G.T_ref' "Fixed device temperature if useHeatPort = false"; + Real 'G.LossPower'(unit = "W", quantity = "Power") "Loss power leaving component via heatPort"; + Real 'G.T_heatPort'(nominal = 300.0, start = 288.15, min = 0.0, displayUnit = "degC", unit = "K", quantity = "ThermodynamicTemperature") "Temperature of heatPort"; + Real 'G.G_actual'(unit = "S", quantity = "Conductance") "Actual conductance = G_ref/(1 + alpha*(T_heatPort - T_ref))"; + Real 'C1.v'(fixed = true, start = 4.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C1.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C1.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C1.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C1.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C1.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 10.0 "Capacitance"; + Real 'C2.v'(fixed = true, start = 0.0, unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'C2.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C2.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C2.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'C2.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'C2.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'C2.C'(start = 1.0, min = 0.0, unit = "F", quantity = "Capacitance") = 100.0 "Capacitance"; + Real 'Nr.v'(unit = "V", quantity = "ElectricPotential") "Voltage drop of the two pins (= p.v - n.v)"; + Real 'Nr.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'Nr.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'Nr.n.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'Nr.n.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + Real 'Nr.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing from pin p to pin n"; + parameter Real 'Nr.Ga'(min = -1.0, unit = "S", quantity = "Conductance") = -0.757576 "Conductance in inner voltage range"; + parameter Real 'Nr.Gb'(min = -1.0, unit = "S", quantity = "Conductance") = -0.409091 "Conductance in outer voltage range"; + parameter Real 'Nr.Ve'(unit = "V", quantity = "ElectricPotential") = 1.0 "Inner voltage range limit"; + Real 'Gnd.p.v'(unit = "V", quantity = "ElectricPotential") "Potential at the pin"; + Real 'Gnd.p.i'(unit = "A", quantity = "ElectricCurrent") "Current flowing into the pin"; + equation + 'L.n.v' = 'Ro.p.v'; + 'L.p.v' = 'G.p.v'; + 'L.p.v' = 'C2.p.v'; + 'C1.p.v' = 'G.n.v'; + 'C1.p.v' = 'Nr.p.v'; + 'Gnd.p.v' = 'Nr.n.v'; + 'Gnd.p.v' = 'C1.n.v'; + 'Gnd.p.v' = 'C2.n.v'; + 'Gnd.p.v' = 'Ro.n.v'; + 'Ro.p.i' + 'L.n.i' = 0.0; + 'Gnd.p.i' + 'Nr.n.i' + 'C2.n.i' + 'C1.n.i' + 'Ro.n.i' = 0.0; + 'C2.p.i' + 'G.p.i' + 'L.p.i' = 0.0; + 'Nr.p.i' + 'C1.p.i' + 'G.n.i' = 0.0; + 'L.L' * der('L.i') = 'L.v'; + 0.0 = 'L.p.i' + 'L.n.i'; + 'L.i' = 'L.p.i'; + 'L.v' = 'L.p.v' - 'L.n.v'; + assert(1.0 + 'Ro.alpha' * ('Ro.T_heatPort' - 'Ro.T_ref') >= 2.220446049250313e-16, "Temperature outside scope of model!", AssertionLevel.error); + 'Ro.R_actual' = 'Ro.R' * (1.0 + 'Ro.alpha' * ('Ro.T_heatPort' - 'Ro.T_ref')); + 'Ro.v' = 'Ro.R_actual' * 'Ro.i'; + 'Ro.LossPower' = 'Ro.v' * 'Ro.i'; + 'Ro.T_heatPort' = 'Ro.T'; + 0.0 = 'Ro.p.i' + 'Ro.n.i'; + 'Ro.i' = 'Ro.p.i'; + 'Ro.v' = 'Ro.p.v' - 'Ro.n.v'; + assert(1.0 + 'G.alpha' * ('G.T_heatPort' - 'G.T_ref') >= 2.220446049250313e-16, "Temperature outside scope of model!", AssertionLevel.error); + 'G.G_actual' = 'G.G' / (1.0 + 'G.alpha' * ('G.T_heatPort' - 'G.T_ref')); + 'G.i' = 'G.G_actual' * 'G.v'; + 'G.LossPower' = 'G.v' * 'G.i'; + 'G.T_heatPort' = 'G.T'; + 0.0 = 'G.p.i' + 'G.n.i'; + 'G.i' = 'G.p.i'; + 'G.v' = 'G.p.v' - 'G.n.v'; + 'C1.i' = 'C1.C' * der('C1.v'); + 0.0 = 'C1.p.i' + 'C1.n.i'; + 'C1.i' = 'C1.p.i'; + 'C1.v' = 'C1.p.v' - 'C1.n.v'; + 'C2.i' = 'C2.C' * der('C2.v'); + 0.0 = 'C2.p.i' + 'C2.n.i'; + 'C2.i' = 'C2.p.i'; + 'C2.v' = 'C2.p.v' - 'C2.n.v'; + 'Nr.i' = if 'Nr.v' < (-'Nr.Ve') then 'Nr.Gb' * ('Nr.v' + 'Nr.Ve') - 'Nr.Ga' * 'Nr.Ve' else if 'Nr.v' > 'Nr.Ve' then 'Nr.Gb' * ('Nr.v' - 'Nr.Ve') + 'Nr.Ga' * 'Nr.Ve' else 'Nr.Ga' * 'Nr.v'; + 0.0 = 'Nr.p.i' + 'Nr.n.i'; + 'Nr.i' = 'Nr.p.i'; + 'Nr.v' = 'Nr.p.v' - 'Nr.n.v'; + 'Gnd.p.v' = 0.0; + annotation(experiment(StopTime = 5e4, Interval = 1)); + end 'ChuaCircuit'; +end 'ChuaCircuit'; diff --git a/TestBaseModelica/examples/Experiment.bmo b/TestBaseModelica/examples/Experiment.bmo new file mode 100644 index 0000000..00e7081 --- /dev/null +++ b/TestBaseModelica/examples/Experiment.bmo @@ -0,0 +1,12 @@ +//! base 0.1.0 +package 'Experiment' + model 'Experiment' + parameter Real 'x0' = 1.0; + Real 'x'; + initial equation + 'x' = 'x0'; + equation + der('x') = 'x'; + annotation(experiment(StartTime = 0, StopTime = 2.0, Tolerance = 1e-06, Interval = 0.004)); + end 'Experiment'; +end 'Experiment'; \ No newline at end of file diff --git a/TestBaseModelica/examples/ExampleFirstOrder.mo b/TestBaseModelica/examples/FirstOrder.bmo similarity index 69% rename from TestBaseModelica/examples/ExampleFirstOrder.mo rename to TestBaseModelica/examples/FirstOrder.bmo index 7d14ac9..b29ecfd 100644 --- a/TestBaseModelica/examples/ExampleFirstOrder.mo +++ b/TestBaseModelica/examples/FirstOrder.bmo @@ -1,10 +1,12 @@ +//! base 0.1.0 package 'FirstOrder' model 'FirstOrder' parameter Real 'x0' = 0 "Initial value for 'x'"; + parameter Real 'a' = 1.1 "Parameter to multiply with 'x'"; Real 'x' "Real variable called 'x'"; initial equation 'x' = 'x0' "Set initial value of 'x' to 'x0'"; equation - der('x') = 1.0 - 'x'; + der('x') = 1.0 - 'a' * 'x'; end 'FirstOrder'; end 'FirstOrder'; diff --git a/TestBaseModelica/examples/IfEquation.bmo b/TestBaseModelica/examples/IfEquation.bmo new file mode 100644 index 0000000..fb97d51 --- /dev/null +++ b/TestBaseModelica/examples/IfEquation.bmo @@ -0,0 +1,14 @@ +//! base 0.1.0 +package 'IfEquation' + model 'IfEquation' + Real 'x'; + Real 'y' (start = 1.0, fixed = true); + equation + if time < 0.5 then + 'x' = 1.0; + elseif true then + 'x' = 2.0; + end if; + der('y') = 'x'; + end 'IfEquation'; +end 'IfEquation'; diff --git a/TestBaseModelica/examples/MinimalValid.bmo b/TestBaseModelica/examples/MinimalValid.bmo new file mode 100644 index 0000000..d55b945 --- /dev/null +++ b/TestBaseModelica/examples/MinimalValid.bmo @@ -0,0 +1,5 @@ +//! base 3.5.0 +package _F + model _F + end _F; +end _F; \ No newline at end of file diff --git a/TestBaseModelica/examples/Modifier.bmo b/TestBaseModelica/examples/Modifier.bmo new file mode 100644 index 0000000..f8dcaa2 --- /dev/null +++ b/TestBaseModelica/examples/Modifier.bmo @@ -0,0 +1,9 @@ +//! base 0.1.0 +package 'Modifier' + model 'Modifier' + Real 'x'(fixed = true, start = 1.0); + parameter Real 'a'(nominal = 100.0, start = 400.0) = 10.0; + equation + der('x') = 'a'*'x'; + end 'Modifier'; +end 'Modifier'; \ No newline at end of file diff --git a/TestBaseModelica/examples/NegativeVariable.bmo b/TestBaseModelica/examples/NegativeVariable.bmo new file mode 100644 index 0000000..039a8e6 --- /dev/null +++ b/TestBaseModelica/examples/NegativeVariable.bmo @@ -0,0 +1,8 @@ +//! base 0.1.0 +package 'Negate' + model 'Negate' + Real 'x'; + equation + der('x') = -'x'; + end 'Negate'; +end 'Negate'; \ No newline at end of file diff --git a/TestBaseModelica/examples/NewtonCoolingBase.bmo b/TestBaseModelica/examples/NewtonCoolingBase.bmo new file mode 100644 index 0000000..bd2e3d0 --- /dev/null +++ b/TestBaseModelica/examples/NewtonCoolingBase.bmo @@ -0,0 +1,16 @@ +//! base 0.1.0 +package 'NewtonCoolingWithDefaults' + model 'NewtonCoolingWithDefaults' "Cooling example with default parameter values" + parameter Real 'T_inf' = 25.0 "Ambient temperature"; + parameter Real 'T0' = 90.0 "Initial temperature"; + parameter Real 'h' = 0.7 "Convective cooling coefficient"; + parameter Real 'A' = 1.0 "Surface area"; + parameter Real 'm' = 0.1 "Mass of thermal capacitance"; + parameter Real 'c_p' = 1.2 "Specific heat"; + Real 'T' "Temperature"; + initial equation + 'T' = 'T0' "Specify initial value for T"; + equation + 'm' * 'c_p' * der('T') = 'h' * 'A' * ('T_inf' - 'T') "Newton's law of cooling"; + end 'NewtonCoolingWithDefaults'; +end 'NewtonCoolingWithDefaults'; diff --git a/TestBaseModelica/examples/ParameterWithModifiers.bmo b/TestBaseModelica/examples/ParameterWithModifiers.bmo new file mode 100644 index 0000000..22c2591 --- /dev/null +++ b/TestBaseModelica/examples/ParameterWithModifiers.bmo @@ -0,0 +1,11 @@ +//! base 0.1.0 +package 'Parameter' + model 'Parameter' + Real 'x'(fixed = true, start = 1.0); + parameter Real 'T_ref'(nominal = 300.0, start = 288.15, + min = 0.0, displayUnit = "degC", unit = "K", + quantity = "ThermodynamicTemperature") = 300.15; + equation + der('x') = 'x'; + end 'Parameter'; +end 'Parameter'; diff --git a/TestBaseModelica/examples/README.md b/TestBaseModelica/examples/README.md new file mode 100644 index 0000000..446d29f --- /dev/null +++ b/TestBaseModelica/examples/README.md @@ -0,0 +1,6 @@ +# Notes + +Files taken from +[SciML/BaseModelica.jl](https://github.com/SciML/BaseModelica.jl/tree/36574b10a354bc9be8db0f3dc185ff55cf4a83b5/test/testfiles). +I don't think this is a substantial part of the software, so I didn't copy the +MIT License and copyright notice. diff --git a/TestBaseModelica/precompile_skript.jl b/TestBaseModelica/precompile_skript.jl index a7c49d5..d694fa3 100644 --- a/TestBaseModelica/precompile_skript.jl +++ b/TestBaseModelica/precompile_skript.jl @@ -1,5 +1,13 @@ using TestBaseModelica +# Collect all .bmo files from examples directory +examples = [ + (splitext(basename(file))[1], file) for file in filter( + f -> endswith(f, ".bmo"), + readdir(joinpath("examples"), join=true) + ) +] + solver_settings = SolverSettings( start_time = 0.0, stop_time = 1.0, @@ -7,12 +15,20 @@ solver_settings = SolverSettings( tolerance = 1e-6 ) -output_directory = "tmp_out_dir" -test_settings = TestSettings( - modelname = "ExampleFirstOrder", - output_directory = output_directory, - solver_settings = solver_settings -) - -run_test(joinpath(@__DIR__, "examples", "ExampleFirstOrder.mo"); settings = test_settings) -rm(output_directory, force=true, recursive=true) +for (modelname, bmo_file) in examples + output_directory = "tmp_out_dir" + test_settings = TestSettings( + modelname = modelname, + output_directory = output_directory, + solver_settings = solver_settings + ) + try + @info "Running $modelname ..." + run_test(bmo_file; settings = test_settings) + @info "... done!" + catch err + @warn "... failed!" + showerror(stdout, err) + end + rm(output_directory, force=true, recursive=true) +end diff --git a/TestBaseModelica/src/TestBaseModelica.jl b/TestBaseModelica/src/TestBaseModelica.jl index da89cce..64e2f0c 100644 --- a/TestBaseModelica/src/TestBaseModelica.jl +++ b/TestBaseModelica/src/TestBaseModelica.jl @@ -3,9 +3,9 @@ module TestBaseModelica import BaseModelica import CSV import DataFrames -import DifferentialEquations +import SciMLBase +import OrdinaryDiffEq -include("dump.jl") include("settings.jl") """ @@ -17,50 +17,26 @@ Test coupling of Base Modelica and ModelingToolkit.jl. function run_test(base_modelica_file::AbstractString; settings::TestSettings) mkpath(abspath(settings.output_directory)) - # Parse Base Modelica - parsed_model = nothing + # Parse Base Modelica and create ODEProblem + ode_problem = nothing time_parsing = @elapsed begin - parsed_model = BaseModelica.parse_basemodelica(base_modelica_file) + ode_problem = BaseModelica.create_odeproblem(base_modelica_file) end open(settings.time_measurements_file, "w") do file - write(file, "BaseModelica.parse_basemodelica, $(time_parsing)\n") - end - - # Dump parsed model to file for debugging purpose - open(joinpath(settings.output_directory, settings.modelname * "_dump.txt"), "w") do file - dump_parsed_model(file, parsed_model) - end - open(joinpath(settings.output_directory, settings.modelname * ".jl"), "w") do file - show(file, parsed_model) - end - - # Create ODEProblem - ode_problem = nothing - time_ODEProblem = @elapsed begin - ode_problem = DifferentialEquations.ODEProblem(parsed_model) - end - open(settings.time_measurements_file, "a") do file - write(file, "DifferentialEquations.ODEProblem, $(time_ODEProblem)\n") + write(file, "BaseModelica.create_odeproblem, $(time_parsing)\n") end - # Simulate + # Simulate ODEProblem ode_solution = nothing time_solve = @elapsed begin if isnothing(settings.solver_settings.solver) - ode_solution = DifferentialEquations.solve( - ode_problem, - tspan = (settings.solver_settings.start_time, settings.solver_settings.stop_time), - saveat = settings.solver_settings.interval) + ode_solution = OrdinaryDiffEq.solve(ode_problem) else - ode_solution = DifferentialEquations.solve( - ode_problem, - settings.solver_settings.solver, - tspan = (settings.solver_settings.start_time, settings.solver_settings.stop_time), - saveat = settings.solver_settings.interval) + ode_solution = OrdinaryDiffEq.solve(ode_problem, settings.solver_settings.solver) end end open(settings.time_measurements_file, "a") do file - write(file, "DifferentialEquations.solve, $(time_solve)\n") + write(file, "OrdinaryDiffEq.solve, $(time_solve)\n") end # Save simulation result diff --git a/TestBaseModelica/src/dump.jl b/TestBaseModelica/src/dump.jl deleted file mode 100644 index dd91550..0000000 --- a/TestBaseModelica/src/dump.jl +++ /dev/null @@ -1,34 +0,0 @@ -using ModelingToolkit - -""" - dump_parsed_model([io::IO=stdout], model::ModelingToolkit.AbstractODESystem) - -Dumps equations, unknowns and parameters of `model`. -If `io` is not supplied, prints to the default output stream `stdout`. -""" -function dump_parsed_model( - io::IO=stdout, - model::Union{ModelingToolkit.AbstractODESystem,Nothing}=nothing -) - - if isnothing(model) - return - end - - println(io, "Model: $(ModelingToolkit.get_name(model))") - println(io) - println(io, "Equations:") - for (eq_nr, eq) in enumerate(equations(model)) - println(io, "$eq_nr: $eq") - end - println(io) - println(io, "Unknowns:") - for (var_nr, var) in enumerate(ModelingToolkit.dump_unknowns(model)) - println(io, "$var_nr: $var") - end - println(io) - println(io, "Parameters:") - for (param_nr, param) in enumerate(ModelingToolkit.dump_parameters(model)) - println(io, "$param_nr: $param") - end -end diff --git a/TestBaseModelica/src/settings.jl b/TestBaseModelica/src/settings.jl index f914af1..a8200fc 100644 --- a/TestBaseModelica/src/settings.jl +++ b/TestBaseModelica/src/settings.jl @@ -1,9 +1,5 @@ -using DifferentialEquations - """ Solver settings to solve ODE system. - -If `solver` is `nothing` DifferentialEquations.jl will select a default solver. """ struct SolverSettings solver diff --git a/TestBaseModelica/test/.gitignore b/TestBaseModelica/test/.gitignore deleted file mode 100644 index 4322f6f..0000000 --- a/TestBaseModelica/test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/test_out/ diff --git a/TestBaseModelica/test/dump.jl b/TestBaseModelica/test/dump.jl deleted file mode 100644 index dac149d..0000000 --- a/TestBaseModelica/test/dump.jl +++ /dev/null @@ -1,43 +0,0 @@ -using Test -using TestBaseModelica -using ModelingToolkit -using ModelingToolkit: t_nounits as t, D_nounits as D - -function test_first_order_dump() - - @mtkmodel FirstOrder begin - @parameters begin - x0 = 0.0 - end - @variables begin - x(t) - end - @equations begin - D(x) ~ 1.0 - x - end - end - - @mtkbuild firstOrder = FirstOrder() - - io = IOBuffer() - TestBaseModelica.dump_parsed_model(io, firstOrder) - dump = String(take!(io)) - - @test dump == """Model: firstOrder - - Equations: - 1: Differential(t)(x(t)) ~ 1.0 - x(t) - - Unknowns: - 1: (var = x(t), variable_source = :variables, name = :x, variable_type = ModelingToolkit.VARIABLE, irreducible = false, tunable = false, type = Real) - - Parameters: - 1: (var = x0, variable_source = :variables, name = :x0, variable_type = ModelingToolkit.PARAMETER, irreducible = false, tunable = true, type = Real, default = 0.0) - """ -end - -@testset "dump.jl" begin - @testset "Dump First Order" begin - test_first_order_dump() - end -end diff --git a/TestBaseModelica/test/runtests.jl b/TestBaseModelica/test/runtests.jl index 674264d..c7a2b92 100644 --- a/TestBaseModelica/test/runtests.jl +++ b/TestBaseModelica/test/runtests.jl @@ -1,5 +1,4 @@ using Test using SafeTestsets -include("dump.jl") include("test_parse.jl") diff --git a/TestBaseModelica/test/test_parse.jl b/TestBaseModelica/test/test_parse.jl index 70989d7..0e2bd01 100644 --- a/TestBaseModelica/test/test_parse.jl +++ b/TestBaseModelica/test/test_parse.jl @@ -3,56 +3,39 @@ using TestBaseModelica using DataFrames using CSV -function test_parse_and_simulate_ExampleFirstOrder() - modelname = "ExampleFirstOrder" - base_modelica_file = joinpath(dirname(@__DIR__), "examples", modelname * ".mo") +function test_parse_and_simulate_FirstOrder() + modelname = "FirstOrder" + base_modelica_file = joinpath(dirname(@__DIR__), "examples", modelname * ".bmo") output_directory = joinpath(@__DIR__, "test_out") rm(output_directory, force=true, recursive=true) run_test(base_modelica_file; - settings=TestSettings( - modelname = modelname, - output_directory=output_directory, - timeout_parsing = 60)) + settings=TestSettings( + modelname = modelname, + output_directory=output_directory, + timeout_parsing = 60) + ) times_file = joinpath(output_directory, modelname * "_times.csv") @test isfile(times_file) content = readlines(times_file) - @test occursin(r"BaseModelica\.parse_basemodelica, [0-9]+\.[0-9]+", content[1]) - @test occursin(r"DifferentialEquations\.ODEProblem, [0-9]+\.[0-9]+", content[2]) - @test occursin(r"DifferentialEquations\.solve, [0-9]+\.[0-9]+", content[3]) - - dump_file = joinpath(output_directory, modelname * "_dump.txt") - @test isfile(dump_file) - @test read(dump_file, String) == """Model: model - - Equations: - 1: Differential(t)(x(t)) ~ 1.0 - x(t) - - Unknowns: - 1: (var = x(t), variable_source = :variables, name = :x, variable_type = ModelingToolkit.VARIABLE, irreducible = false, tunable = false, type = Real, default = 0.0) - - Parameters: - 1: (var = x0, variable_source = :parameters, name = :x0, variable_type = ModelingToolkit.PARAMETER, irreducible = false, tunable = true, type = Real, default = 0.0) - """ - - jl_dump_file = joinpath(output_directory, modelname * ".jl") - @test isfile(jl_dump_file) + @info content + @test occursin(r"BaseModelica\.create_odeproblem, [0-9]+\.[0-9]+", content[1]) + @test occursin(r"OrdinaryDiffEq\.solve, [0-9]+\.[0-9]+", content[2]) result_file = joinpath(output_directory, modelname * "_res.csv") @test isfile(result_file) df = CSV.read(result_file, DataFrame) - filter!(row -> row.time in [0.0, 0.5, 1.0], df) + filter!(row -> row.time in [0.0, 1.0], df) @test df[1,2] == 0.0 - @test df[2,2] ≈ 0.3934694834116825 - @test df[3,2] ≈ 0.632120511313765 + @test df[2,2] ≈ 0.6064807012910736 rm(output_directory, force=true, recursive=true) end @testset "run_test" begin - @testset "ExampleFirstOrder" begin - test_parse_and_simulate_ExampleFirstOrder() + @testset "FirstOrder" begin + test_parse_and_simulate_FirstOrder() end end