SciML / ModelingToolkit.jl

An acausal modeling framework for automatically parallelized scientific machine learning (SciML) in Julia. A computer algebra system for integrated symbolics for physics-informed machine learning and automated transformations of differential equations
https://mtk.sciml.ai/dev/
Other
1.41k stars 203 forks source link

`structural_simplify` changes the name of the variables from discretized PDEs in the observed equations ( X[n](t) -> var"X(t)[n]_t" ) #2360

Open GHE-HS opened 9 months ago

GHE-HS commented 9 months ago

Describe the bug 🐞

When structural_simplify ing a system, the names of many observed variables (ie. variable X(t)) become var"Xˍt" in an equation describing an observed state, messing up with everything downstream.

Expected behavior

The variable should not change name after applying structural_simplify.

Minimal Reproducible Example πŸ‘‡

Unfortunately my code is quite complex, so simplifying it to make a MWE would take me a time I don't have right now, I mostly wanted to report the issue. I will provide one later if time allows.

Environment:

[9901752a] Ai4EComponentLib v0.10.2 `https://github.com/ai4energy/Ai4EComponentLib.jl#main`
  [c9ce4bd3] ArchGDAL v0.10.1
  [6e4b80f9] BenchmarkTools v1.3.2
  [a134a8b2] BlackBoxOptim v0.6.2
βŒƒ [336ed68f] CSV v0.10.10
βŒƒ [35d6a980] ColorSchemes v3.21.0
  [5ae59095] Colors v0.12.10
βŒƒ [3abffc1c] ControlSystemIdentification v2.5.3
βŒƒ [a6e380b2] ControlSystems v1.7.2
βŒƒ [aaaaaaaa] ControlSystemsBase v1.4.2
βŒƒ [687d7614] ControlSystemsMTK v0.1.12
  [e084ae63] CoolProp v0.1.0
βŒƒ [a93c6f00] DataFrames v1.5.0
βŒƒ [82cc6244] DataInterpolations v4.0.1
βŒƒ [0c46a032] DifferentialEquations v7.7.0
βŒƒ [31c24e10] Distributions v0.25.88
βŒ… [5b8099bc] DomainSets v0.6.6
βŒƒ [634d3b9d] DrWatson v2.12.4
βŒƒ [b18b359b] FourierTools v0.4.1
βŒƒ [5c1252a2] GeometryBasics v0.4.7
βŒ… [cd3eb016] HTTP v0.9.17
  [615f187c] IfElse v0.1.1
  [a98d9a8b] Interpolations v0.14.7
βŒ… [d1acc4aa] IntervalArithmetic v0.20.9
  [d2bf35a9] IntervalRootFinding v0.5.11
  [682c06a0] JSON v0.21.4
βŒƒ [0f8b85d8] JSON3 v1.12.0
  [b9914132] JSONTables v1.0.3
βŒ… [ee78f7c6] Makie v0.19.6
βŒƒ [94925ecb] MethodOfLines v0.9.2
βŒƒ [961ee093] ModelingToolkit v8.55.1
βŒƒ [23d639d0] ModelingToolkitDesigner v0.3.0
βŒ… [16a59e39] ModelingToolkitStandardLibrary v1.15.0
βŒƒ [0987c9cc] MonteCarloMeasurements v1.1.4
βŒƒ [1dea7af3] OrdinaryDiffEq v6.50.0
  [ccf2f8ad] PlotThemes v3.1.0
  [58dd65bb] Plotly v0.4.1
  [91a5bcdd] Plots v1.39.0
βŒ… [f27b6e38] Polynomials v3.2.10
βŒƒ [1fd47b50] QuadGK v2.8.2
βŒƒ [f2b01f46] Roots v2.0.13
  [3f865c0f] ScatteredInterpolation v0.3.6
βŒƒ [276daf66] SpecialFunctions v2.2.0
βŒƒ [f3b207a7] StatsPlots v0.15.5
  [fd094767] Suppressor v0.2.6
βŒƒ [0c5d862f] Symbolics v5.3.1
βŒƒ [1986cc42] Unitful v1.13.1
  [3351c21f] CoolProp_jll v6.5.0+0
  [ade2ca70] Dates
  [8f399da3] Libdl
[47edcb42] ADTypes v0.2.4
βŒ… [c3fe647b] AbstractAlgebra v0.30.9
  [621f4979] AbstractFFTs v1.5.0
  [7f219486] AbstractNFFTs v0.8.2
  [1520ce14] AbstractTrees v0.4.4
  [79e6a3ab] Adapt v3.6.2
  [9901752a] Ai4EComponentLib v0.10.2 `https://github.com/ai4energy/Ai4EComponentLib.jl#main`
  [27a7e980] Animations v0.4.1
  [c9ce4bd3] ArchGDAL v0.10.1
  [dce04be8] ArgCheck v2.3.0
  [ec485272] ArnoldiMethod v0.2.0
  [7d9fca2a] Arpack v0.5.4
  [4fba245c] ArrayInterface v7.4.11
  [30b0a656] ArrayInterfaceCore v0.1.29
βŒƒ [4c555306] ArrayLayouts v0.8.18
  [bf4720bc] AssetRegistry v0.1.0
βŒ… [67c07d97] Automa v0.8.4
  [13072b0f] AxisAlgorithms v1.0.1
  [39de3d68] AxisArrays v0.4.7
βŒ… [aae01518] BandedMatrices v0.17.18
  [198e06fe] BangBang v0.3.39
  [9718e550] Baselet v0.1.1
  [26cce99e] BasicInterpolators v0.7.1
  [6e4b80f9] BenchmarkTools v1.3.2
  [e2ed5e7c] Bijections v0.1.5
  [9e28174c] BinDeps v1.0.2
  [62783981] BitTwiddlingConvenienceFunctions v0.1.5
  [a134a8b2] BlackBoxOptim v0.6.2
βŒƒ [ad839575] Blink v0.12.5
βŒ… [764a87c0] BoundaryValueDiffEq v2.11.0
βŒ… [fa961155] CEnum v0.4.2
  [2a0fbf3d] CPUSummary v0.2.4
  [a9c8d775] CPUTime v1.0.0
  [96374032] CRlibm v1.0.1
  [00ebfdb7] CSTParser v3.3.6
βŒƒ [336ed68f] CSV v0.10.10
  [159f3aea] Cairo v1.0.5
βŒƒ [13f3f980] CairoMakie v0.10.6
  [49dc2e85] Calculus v0.5.1
  [d360d2e6] ChainRulesCore v1.17.0
  [9e997f8a] ChangesOfVariables v0.1.8
  [fb6a15b2] CloseOpenIntervals v0.1.12
  [aaaa29a8] Clustering v0.15.5
  [944b1d66] CodecZlib v0.7.3
  [a2cac450] ColorBrewer v0.4.0
βŒƒ [35d6a980] ColorSchemes v3.21.0
  [3da002f7] ColorTypes v0.11.4
βŒ… [c3611d14] ColorVectorSpace v0.9.10
  [5ae59095] Colors v0.12.10
  [861a8166] Combinatorics v1.0.2
  [a80b9123] CommonMark v0.8.12
  [38540f10] CommonSolve v0.2.4
  [bbf7d656] CommonSubexpressions v0.3.0
  [34da2185] Compat v4.10.0
βŒ… [b0b7db55] ComponentArrays v0.13.15
  [b152e2b5] CompositeTypes v0.1.3
  [a33af91c] CompositionsBase v0.1.2
  [187b0558] ConstructionBase v1.5.4
  [6add18c4] ContextVariablesX v0.1.3
  [d38c429a] Contour v0.6.2
βŒƒ [3abffc1c] ControlSystemIdentification v2.5.3
βŒƒ [a6e380b2] ControlSystems v1.7.2
βŒƒ [aaaaaaaa] ControlSystemsBase v1.4.2
βŒƒ [687d7614] ControlSystemsMTK v0.1.12
  [e084ae63] CoolProp v0.1.0
  [adafc99b] CpuId v0.3.1
  [a8cc5b0e] Crayons v4.1.1
  [717857b8] DSP v0.7.9
  [9a962f9c] DataAPI v1.15.0
βŒƒ [a93c6f00] DataFrames v1.5.0
βŒƒ [82cc6244] DataInterpolations v4.0.1
  [864edb3b] DataStructures v0.18.15
  [e2d170a0] DataValueInterfaces v1.0.0
  [244e2a9f] DefineSingletons v0.1.2
  [bcd4f6db] DelayDiffEq v5.43.1
  [8bb1440f] DelimitedFiles v1.9.1
  [b429d917] DensityInterface v0.4.0
  [a81e2ce2] DescriptorSystems v1.3.9
βŒƒ [2b5f629d] DiffEqBase v6.130.0
  [459566f4] DiffEqCallbacks v2.33.1
  [77a26b50] DiffEqNoiseProcess v5.19.0
  [163ba53b] DiffResults v1.1.0
  [b552c78f] DiffRules v1.15.1
βŒƒ [0c46a032] DifferentialEquations v7.7.0
  [3c3547ce] DiskArrays v0.3.22
  [b4f34e82] Distances v0.10.10
βŒƒ [31c24e10] Distributions v0.25.88
  [ffbed154] DocStringExtensions v0.9.3
βŒ… [5b8099bc] DomainSets v0.6.6
βŒƒ [634d3b9d] DrWatson v2.12.4
  [fa6b7ba4] DualNumbers v0.6.8
βŒ… [7c1d4256] DynamicPolynomials v0.4.6
  [4e289a0a] EnumX v1.0.4
  [90fa49ef] ErrorfreeArithmetic v0.5.2
  [d4d017d3] ExponentialUtilities v1.25.0
  [e2ba6199] ExprTools v0.1.10
  [411431e0] Extents v0.1.2
  [c87230d0] FFMPEG v0.4.1
  [7a1cc6ca] FFTW v1.7.1
  [cc61a311] FLoops v0.2.1
  [b9860ae5] FLoopsBase v0.1.1
  [7034ab61] FastBroadcast v0.2.7
  [9aa1b823] FastClosures v0.3.2
βŒ… [29a986be] FastLapackInterface v1.2.9
  [fa42c844] FastRounding v0.3.1
  [5789e2e9] FileIO v1.16.1
  [48062228] FilePathsBase v0.9.21
βŒ… [1a297f60] FillArrays v0.13.11
  [d8f44d74] FilterHelpers v0.2.0
  [6a86dc24] FiniteDiff v2.21.1
  [53c48c17] FixedPointNumbers v0.8.4
  [59287772] Formatting v0.4.2
  [f6369f11] ForwardDiff v0.10.36
βŒƒ [b18b359b] FourierTools v0.4.1
  [b38be410] FreeType v4.1.0
  [663a7486] FreeTypeAbstraction v0.10.0
  [069b7b12] FunctionWrappers v1.1.3
  [77dc65aa] FunctionWrappersWrappers v0.1.3
  [de31a74c] FunctionalCollections v0.5.0
  [d9f16b24] Functors v0.4.5
βŒƒ [add2ef01] GDAL v1.6.1
  [f7f18e0c] GLFW v3.4.1
βŒƒ [e9467ef8] GLMakie v0.8.6
βŒƒ [0c68f7d7] GPUArrays v8.8.1
  [46192b85] GPUArraysCore v0.1.5
βŒƒ [28b8d3ca] GR v0.72.8
  [c145ed77] GenericSchur v0.5.3
  [68eda718] GeoFormatTypes v0.4.1
  [cf35fbd7] GeoInterface v1.3.2
  [0329782f] GeoInterfaceRecipes v1.0.1
βŒƒ [5c1252a2] GeometryBasics v0.4.7
  [c27321d9] Glob v1.3.1
  [a2bd30eb] Graphics v1.1.2
  [86223c79] Graphs v1.9.0
  [3955a311] GridLayoutBase v0.9.2
  [42e2da0e] Grisu v1.0.2
βŒ… [0b43b601] Groebner v0.3.6
  [d5909c97] GroupsCore v0.4.0
βŒ… [cd3eb016] HTTP v0.9.17
  [9fb69e20] Hiccup v0.2.2
  [3e5b6fbb] HostCPUFeatures v0.1.16
  [e91730f6] Hungarian v0.7.0
  [34004b35] HypergeometricFunctions v0.3.23
  [615f187c] IfElse v0.1.1
  [2803e5a7] ImageAxes v0.6.11
βŒƒ [c817782e] ImageBase v0.1.5
βŒ… [a09fc81d] ImageCore v0.9.4
  [82e4d734] ImageIO v0.6.7
  [bc367c6b] ImageMetadata v0.9.9
  [613c443e] IndexFunArrays v0.2.6
  [9b13fd28] IndirectArrays v1.0.0
  [d25df0c9] Inflate v0.1.4
  [83e8ac13] IniFile v0.5.1
  [22cec73e] InitialValues v0.3.1
  [842dd82b] InlineStrings v1.4.0
  [18e54dd8] IntegerMathUtils v0.1.2
  [a98d9a8b] Interpolations v0.14.7
βŒ… [d1acc4aa] IntervalArithmetic v0.20.9
  [d2bf35a9] IntervalRootFinding v0.5.11
  [8197267c] IntervalSets v0.7.7
  [3587e190] InverseFunctions v0.1.12
  [41ab1584] InvertedIndices v1.3.0
  [92d709cd] IrrationalConstants v0.2.2
  [f1662d9f] Isoband v0.1.1
βŒƒ [c8e1da08] IterTools v1.4.0
  [42fd0dbc] IterativeSolvers v0.9.2
  [82899510] IteratorInterfaceExtensions v1.0.0
  [033835bb] JLD2 v0.4.35
  [1019f520] JLFzf v0.1.6
  [692b3bcd] JLLWrappers v1.5.0
  [97c1335a] JSExpr v0.5.4
  [682c06a0] JSON v0.21.4
βŒƒ [0f8b85d8] JSON3 v1.12.0
  [b9914132] JSONTables v1.0.3
  [b835a17e] JpegTurbo v0.1.4
  [98e50ef6] JuliaFormatter v1.0.39
  [b14d175d] JuliaVariables v0.2.4
  [ccbc3e58] JumpProcesses v9.8.0
  [ef3ab10e] KLU v0.4.1
  [5ab0869b] KernelDensity v0.6.7
  [ba0b0d4f] Krylov v0.9.4
  [0b1a1467] KrylovKit v0.6.0
βŒƒ [929cbde3] LLVM v6.1.0
  [b964fa9f] LaTeXStrings v1.3.0
  [2ee39098] LabelledArrays v1.14.0
  [984bce1d] LambertW v0.4.6
  [23fbe1c1] Latexify v0.16.1
  [10f19ff3] LayoutPointers v0.1.14
  [50d2b5c4] Lazy v0.15.1
  [8cdb02fc] LazyModules v0.3.1
  [2d8b4e74] LevyArea v1.0.0
  [d3d80556] LineSearches v7.2.0
  [7a12625a] LinearMaps v3.11.1
βŒ… [7ed4a6bd] LinearSolve v1.42.0
  [2ab3a3ac] LogExpFunctions v0.3.26
  [bdcacae8] LoopVectorization v0.12.165
βŒƒ [d9d29d28] LowLevelParticleFilters v3.3.8
  [d8e11817] MLStyle v0.4.17
  [1914dd2f] MacroTools v0.5.11
βŒ… [ee78f7c6] Makie v0.19.6
βŒ… [20f20a25] MakieCore v0.6.3
  [d125e4d3] ManualMemory v0.1.8
  [dbb5928d] MappedArrays v0.4.2
βŒ… [7eb4fadd] Match v1.2.0
  [0a4f8689] MathTeXEngine v0.5.6
  [99c1a7ee] MatrixEquations v2.2.11
  [48965c70] MatrixPencils v1.7.11
  [739be429] MbedTLS v1.1.7
  [442fdcdd] Measures v0.3.2
  [c03570c3] Memoize v0.4.4
  [7269a6da] MeshIO v0.4.10
βŒƒ [94925ecb] MethodOfLines v0.9.2
  [128add7d] MicroCollections v0.1.4
  [978d7f02] MiniQhull v0.4.0
  [e1d29d7a] Missings v1.1.0
βŒƒ [961ee093] ModelingToolkit v8.55.1
βŒƒ [23d639d0] ModelingToolkitDesigner v0.3.0
βŒ… [16a59e39] ModelingToolkitStandardLibrary v1.15.0
  [66fc600b] ModernGL v1.1.7
βŒƒ [0987c9cc] MonteCarloMeasurements v1.1.4
  [e94cdb99] MosaicViews v0.3.4
  [46d2c3a1] MuladdMacro v0.2.4
βŒ… [102ac46a] MultivariatePolynomials v0.4.7
  [6f286f6a] MultivariateStats v0.10.2
  [ffc61752] Mustache v1.0.17
  [d8a4904e] MutableArithmetics v1.3.3
βŒ… [a975b10e] Mux v0.7.6
  [98581153] NDTools v0.5.2
  [efe261a4] NFFT v0.13.3
  [d41bc354] NLSolversBase v7.8.3
  [2774e3e8] NLsolve v4.5.1
  [77ba4419] NaNMath v1.0.2
  [71a1bf82] NameResolution v0.1.5
  [b8a86587] NearestNeighbors v0.4.13
  [f09324ee] Netpbm v1.1.1
βŒ… [8913a72c] NonlinearSolve v1.6.0
  [510215fc] Observables v0.5.4
  [6fe1bfb0] OffsetArrays v1.12.10
  [52e1d378] OpenEXR v0.3.2
  [429524aa] Optim v1.7.8
  [bac558e1] OrderedCollections v1.6.2
βŒƒ [1dea7af3] OrdinaryDiffEq v6.50.0
  [a7812802] PDEBase v0.1.5
βŒƒ [90014a1f] PDMats v0.11.26
  [f57f5aa1] PNGFiles v0.4.0
  [65ce6f38] PackageExtensionCompat v1.0.2
  [19eb6ba3] Packing v0.5.0
  [5432bcbf] PaddedViews v0.5.12
  [d96e819e] Parameters v0.12.3
  [69de0a69] Parsers v2.7.2
  [fa939f87] Pidfile v1.3.0
  [b98c9c47] Pipe v1.3.0
  [eebad327] PkgVersion v0.3.3
  [ccf2f8ad] PlotThemes v3.1.0
  [995b91a9] PlotUtils v1.3.5
  [58dd65bb] Plotly v0.4.1
  [a03496cd] PlotlyBase v0.8.19
  [f0f68f2c] PlotlyJS v0.18.11
  [91a5bcdd] Plots v1.39.0
  [e409e4f3] PoissonRandom v0.4.4
  [f517fe37] Polyester v0.7.8
  [1d0040c9] PolyesterWeave v0.2.1
  [647866c9] PolygonOps v0.1.2
βŒ… [f27b6e38] Polynomials v3.2.10
  [2dfb63ee] PooledArrays v1.4.3
  [85a6dd25] PositiveFactorizations v0.2.4
  [d236fae5] PreallocationTools v0.4.12
  [aea7be01] PrecompileTools v1.2.0
  [21216c6a] Preferences v1.4.1
  [8162dcfd] PrettyPrint v0.2.0
  [08abe8d2] PrettyTables v2.2.7
  [27ebfcd6] Primes v0.5.4
  [92933f4c] ProgressMeter v1.9.0
  [4b34888f] QOI v1.0.0
βŒƒ [1fd47b50] QuadGK v2.8.2
  [74087812] Random123 v1.6.1
  [fb686558] RandomExtensions v0.4.4
  [e6cf234a] RandomNumbers v1.5.3
  [b3c3ace0] RangeArrays v0.3.2
  [c84ed2f1] Ratios v0.4.5
  [3cdcf5f2] RecipesBase v1.3.4
  [01d81517] RecipesPipeline v0.6.12
  [731186ca] RecursiveArrayTools v2.39.0
  [f2c3362d] RecursiveFactorization v0.2.20
  [189a3867] Reexport v1.2.2
  [05181044] RelocatableFolders v1.0.1
  [ae029012] Requires v1.3.0
  [ae5879a3] ResettableStacks v1.1.1
  [37e2e3b7] ReverseDiff v1.15.1
  [79098fc4] Rmath v0.7.1
βŒƒ [21fd56a4] RobustAndOptimalControl v0.4.26
βŒƒ [f2b01f46] Roots v2.0.13
  [5eaf0fd0] RoundingEmulator v0.2.1
  [7e49a35a] RuntimeGeneratedFunctions v0.5.12
  [94e857df] SIMDTypes v0.1.0
  [476501e8] SLEEFPirates v0.6.39
  [1bc83da4] SafeTestsets v0.1.0
  [3f865c0f] ScatteredInterpolation v0.3.6
βŒ… [0bca4576] SciMLBase v1.97.0
  [e9a6253c] SciMLNLSolve v0.1.9
βŒ… [c0aeaf25] SciMLOperators v0.2.12
  [6c6a2e73] Scratch v1.2.0
  [91c51154] SentinelArrays v1.4.0
  [3cc68bcd] SetRounding v0.2.1
  [efcf1570] Setfield v1.1.1
βŒ… [65257c39] ShaderAbstractions v0.3.0
  [1277b4bf] ShiftedArrays v2.0.0
  [992d4aef] Showoff v1.0.3
  [73760f76] SignedDistanceFields v0.4.0
  [727e6d20] SimpleNonlinearSolve v0.1.20
  [699a6c99] SimpleTraits v0.9.4
  [ce78b400] SimpleUnPack v1.1.0
  [45858cf5] Sixel v0.1.3
  [66db9d55] SnoopPrecompile v1.0.3
  [a2af1166] SortingAlgorithms v1.1.1
βŒ… [47a9eef4] SparseDiffTools v1.31.0
  [e56a9233] Sparspak v0.3.9
  [d4ead438] SpatialIndexing v0.1.5
βŒƒ [276daf66] SpecialFunctions v2.2.0
  [171d559e] SplittablesBase v0.1.15
βŒ… [c5dd0088] StableHashTraits v0.3.1
  [cae243ae] StackViews v0.1.1
  [aedffcd0] Static v0.8.8
  [0d7ed370] StaticArrayInterface v1.4.1
  [90137ffa] StaticArrays v1.6.5
  [1e83bf80] StaticArraysCore v1.4.2
  [82ae8749] StatsAPI v1.7.0
βŒ… [2913bbd2] StatsBase v0.33.21
  [4c63d2b9] StatsFuns v1.3.0
βŒƒ [f3b207a7] StatsPlots v0.15.5
  [9672c7b4] SteadyStateDiffEq v1.16.1
βŒƒ [789caeaf] StochasticDiffEq v6.60.0
βŒ… [7792a7ef] StrideArraysCore v0.4.17
  [892a3eda] StringManipulation v0.3.4
  [09ab397b] StructArrays v0.6.16
  [856f2bd8] StructTypes v1.10.0
  [c3572dad] Sundials v4.20.0
  [fd094767] Suppressor v0.2.6
  [2efcf032] SymbolicIndexingInterface v0.2.2
βŒƒ [d1185830] SymbolicUtils v1.1.0
βŒƒ [0c5d862f] Symbolics v5.3.1
  [ab02a1b2] TableOperations v1.2.0
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.11.0
  [62fd8b95] TensorCore v0.1.1
  [8ea1fca8] TermInterface v0.3.3
  [8290d209] ThreadingUtilities v0.5.2
βŒ… [731e570b] TiffImages v0.6.8
  [a759f4b9] TimerOutputs v0.5.23
  [0796e94c] Tokenize v0.5.25
βŒƒ [028f657a] TotalLeastSquares v1.7.5
βŒ… [3bb67fe8] TranscodingStreams v0.9.13
  [28d57a85] Transducers v0.4.78
  [a2a6695c] TreeViews v0.3.0
  [d5829a12] TriangularSolve v0.1.19
  [410a4b4d] Tricks v0.1.8
  [981d1d27] TriplotBase v0.1.0
  [781d530d] TruncatedStacktraces v1.4.0
  [9d95972d] TupleTools v1.4.3
  [30578b45] URIParser v0.4.1
  [5c2747f8] URIs v1.5.1
  [3a884ed6] UnPack v1.0.2
  [1cfade01] UnicodeFun v0.4.1
βŒƒ [1986cc42] Unitful v1.13.1
  [45397f5d] UnitfulLatexify v1.6.3
  [a7c27f48] Unityper v0.1.5
  [41fe7b60] Unzip v0.2.0
  [3d5dd08c] VectorizationBase v0.21.64
  [19fa3120] VertexSafeGraphs v0.2.0
  [ea10d353] WeakRefStrings v1.4.2
  [0f1e0344] WebIO v0.8.21
βŒƒ [104b5d7c] WebSockets v1.5.9
  [cc8bc4a8] Widgets v0.6.6
  [efce3f68] WoodburyMatrices v0.5.5
  [76eceee3] WorkerUtilities v1.6.1
  [700de1a5] ZygoteRules v0.2.3
βŒ… [68821587] Arpack_jll v3.5.1+1
  [8ce61222] Arrow_jll v10.0.0+1
  [6e34b625] Bzip2_jll v1.0.8+0
  [4e9b3aee] CRlibm_jll v1.0.1+0
  [83423d85] Cairo_jll v1.16.1+1
  [3351c21f] CoolProp_jll v6.5.0+0
  [5ae413db] EarCut_jll v2.2.4+0
  [2702e6a9] EpollShim_jll v0.0.20230411+0
  [2e619515] Expat_jll v2.5.0+0
βŒƒ [b22a6f82] FFMPEG_jll v4.4.2+2
  [f5851436] FFTW_jll v3.3.10+0
  [a3f928ae] Fontconfig_jll v2.13.93+0
  [d7e528f0] FreeType2_jll v2.13.1+0
  [559328eb] FriBidi_jll v1.0.10+0
βŒƒ [a7073274] GDAL_jll v301.600.200+0
βŒ… [d604d12d] GEOS_jll v3.11.2+0
  [0656b61e] GLFW_jll v3.3.8+0
βŒ… [d2c73de3] GR_jll v0.72.8+0
  [78b55507] Gettext_jll v0.21.0+0
  [7746bdde] Glib_jll v2.76.5+0
  [3b182d85] Graphite2_jll v1.3.14+0
βŒ… [0234f1f7] HDF5_jll v1.12.2+2
  [2e76f6c2] HarfBuzz_jll v2.8.1+1
  [905a6f67] Imath_jll v3.1.7+0
  [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0
  [aacddb02] JpegTurbo_jll v2.1.91+0
  [f7e6163d] Kaleido_jll v0.2.1+0
  [b39eb1a6] Kerberos_krb5_jll v1.19.3+0
  [c1c5ebd0] LAME_jll v3.100.1+0
  [88015f11] LERC_jll v3.0.0+1
βŒ… [dad2f222] LLVMExtra_jll v0.0.23+0
  [1d63c593] LLVMOpenMP_jll v15.0.4+0
  [dd4b983a] LZO_jll v2.10.1+0
βŒƒ [08be9ffa] LibPQ_jll v14.3.0+1
βŒ… [e9f186c6] Libffi_jll v3.2.2+1
  [d4300ac3] Libgcrypt_jll v1.8.7+0
  [7e76a0d4] Libglvnd_jll v1.6.0+0
  [7add5ba3] Libgpg_error_jll v1.42.0+0
  [94ce4f54] Libiconv_jll v1.17.0+0
  [4b2f31a3] Libmount_jll v2.35.0+0
βŒ… [89763e89] Libtiff_jll v4.4.0+0
  [38a345b3] Libuuid_jll v2.36.0+0
βŒƒ [d3a379c0] LittleCMS_jll v2.12.0+0
  [5ced341a] Lz4_jll v1.9.4+0
  [856f044c] MKL_jll v2023.2.0+0
βŒƒ [7243133f] NetCDF_jll v400.902.206+0
  [e7412a2a] Ogg_jll v1.3.5+1
  [18a262bb] OpenEXR_jll v3.1.4+0
βŒƒ [643b3616] OpenJpeg_jll v2.4.0+0
βŒ… [458c3c95] OpenSSL_jll v1.1.23+0
  [efe28fd5] OpenSpecFun_jll v0.5.5+0
  [91d4177d] Opus_jll v1.3.2+0
βŒ… [58948b4f] PROJ_jll v900.100.0+0
  [36c8627f] Pango_jll v1.50.14+0
  [30392449] Pixman_jll v0.42.2+0
  [460c41e3] QhullMiniWrapper_jll v1.0.0+1
βŒ… [784f63db] Qhull_jll v8.0.1003+0
  [ea2cea3b] Qt5Base_jll v5.15.3+2
  [f50d1b31] Rmath_jll v0.4.0+0
  [76ed43ae] SQLite_jll v3.43.0+0
βŒ… [fb77eaff] Sundials_jll v5.2.1+0
βŒ… [e0b8ae26] Thrift_jll v0.16.0+0
  [a2964d1f] Wayland_jll v1.21.0+1
  [2381bf8a] Wayland_protocols_jll v1.25.0+0
  [02c8fc9c] XML2_jll v2.11.5+0
  [aed1982a] XSLT_jll v1.1.34+0
  [4f6342f7] Xorg_libX11_jll v1.8.6+0
  [0c0b7dd1] Xorg_libXau_jll v1.0.11+0
  [935fb764] Xorg_libXcursor_jll v1.2.0+4
  [a3789734] Xorg_libXdmcp_jll v1.1.4+0
  [1082639a] Xorg_libXext_jll v1.3.4+4
  [d091e8ba] Xorg_libXfixes_jll v5.0.3+4
  [a51aa0fd] Xorg_libXi_jll v1.7.10+4
  [d1454406] Xorg_libXinerama_jll v1.1.4+4
  [ec84b674] Xorg_libXrandr_jll v1.5.2+4
  [ea2f1a96] Xorg_libXrender_jll v0.9.10+4
  [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0
  [c7cfdc94] Xorg_libxcb_jll v1.15.0+0
  [cc61e674] Xorg_libxkbfile_jll v1.1.2+0
  [12413925] Xorg_xcb_util_image_jll v0.4.0+1
  [2def613f] Xorg_xcb_util_jll v0.4.0+1
  [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1
  [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1
  [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1
  [35661453] Xorg_xkbcomp_jll v1.4.6+0
  [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0
  [c5fb5394] Xorg_xtrans_jll v1.5.0+0
  [3161d3a3] Zstd_jll v1.5.5+0
βŒ… [28df3c45] boost_jll v1.76.0+1
  [214eeab7] fzf_jll v0.35.1+0
  [9a68df92] isoband_jll v0.2.3+0
  [a4ae2306] libaom_jll v3.4.0+0
  [0ac62f75] libass_jll v0.15.1+0
  [f638f0a6] libfdk_aac_jll v2.0.2+0
βŒƒ [06c338fa] libgeotiff_jll v100.700.100+0
  [b53b4c65] libpng_jll v1.6.38+0
  [075b6546] libsixel_jll v1.10.3+0
  [f27f6e37] libvorbis_jll v1.3.7+1
  [fe1e1685] snappy_jll v1.1.9+1
  [1270edf5] x264_jll v2021.5.5+0
  [dfaa095f] x265_jll v3.5.0+0
  [d8fb68d0] xkbcommon_jll v1.4.1+1
  [0dad84c5] ArgTools v1.1.1
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [8bf52ea8] CRC32c
  [ade2ca70] Dates
  [8ba89e20] Distributed
  [f43a241f] Downloads v1.6.0
  [7b1f6079] FileWatching
  [9fa8497b] Future
  [b77e0a4c] InteractiveUtils
  [4af54fe1] LazyArtifacts
  [b27032c2] LibCURL v0.6.3
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions v1.2.0
  [44cfe95a] Pkg v1.9.0
  [de0858da] Printf
  [9abbd945] Profile
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization
  [1a1011a3] SharedArrays
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics v1.9.0
  [4607b0f0] SuiteSparse
  [fa267f1f] TOML v1.0.3
  [a4e569a6] Tar v1.10.0
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll v1.0.2+0
  [deac9b47] LibCURL_jll v7.84.0+0
  [29816b5a] LibSSH2_jll v1.10.2+0
  [c8ffd9c3] MbedTLS_jll v2.28.2+0
  [14a3606d] MozillaCACerts_jll v2022.10.11
  [4536629a] OpenBLAS_jll v0.3.21+4
  [05823500] OpenLibm_jll v0.8.1+0
  [efcefdf7] PCRE2_jll v10.42.0+0
  [bea87d4a] SuiteSparse_jll v5.10.1+6
  [83775a58] Zlib_jll v1.2.13+0
  [8e850b90] libblastrampoline_jll v5.7.0+0
  [8e850ede] nghttp2_jll v1.48.0+0
  [3f19e933] p7zip_jll v17.4.0+0
Julia Version 1.9.0
Commit 8e63055292 (2023-05-07 11:25 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 Γ— Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS =

Additional context

What I am doing in my code is to symbolically discretize a PDE system with MethodOfLines and then tinkering with the ODESystem that comes out of it then simplyfying and finally solving it with MTK. I believe this problem only happens with the discretized variables (written X(t)[n]).

GHE-HS commented 9 months ago

I think I found the piece of code that is responsible for this transformation but fixing it is beyond what I can do I'm afraid: In model_parsing.jl, l 73-77:

if ext[] === nothing
    push!(exprs.args, :(var"#___sys___" = $sys))
else
    push!(exprs.args, :(var"#___sys___" = $extend($sys, $(ext[]))))
end

Any advice will be appreciated!

ChrisRackauckas commented 9 months ago

the names of many observed variables (ie. variable X(t)) become var"Xˍt" in an equation describing an observed state

That's not the same variable. The latter is the dummy derivative of the first variable