Skip to content

v9.15.0: When multiple @extend, only the last one takes effectΒ #2758

@wang890

Description

@wang890

Describe the bug 🐞

MTK v9.15.0:
When multiple @extend in a @mtkmodel
only the last one takes effect

Expected behavior
@extend multiple objects

Minimal Reproducible Example πŸ‘‡
The example code is a github page here, just one-page jl file,
it can be copied, pasted in your VS code and debugged immediately.
Thanks!
It is a RC circuit system,
but has a conditional HeatPort in order to describe the power loss via Resistor to a thermal network.

Error & Stacktrace ⚠️

Exception has occurred: ArgumentError
ArgumentError: System resistor: variable p does not exist

Environment (please complete the following information):

  • Output of using Pkg; Pkg.status()
  [961ee093] ModelingToolkit v9.15.0
  [1dea7af3] OrdinaryDiffEq v6.80.1
  [91a5bcdd] Plots v1.40.4
  • Output of versioninfo()
ulia Version 1.10.3
Commit 0b4590a550 (2024-04-30 10:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 6 Γ— AMD Ryzen 5 3500X 6-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver2)
Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions