You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,12 @@
1
1
# NetworkDynamics Release Notes
2
2
3
+
## v0.10.2 Changelog
4
+
-[#299](https://github.com/JuliaDynamics/NetworkDynamics.jl/pull/299) enhance metadata system with pattern matching and utility functions:
5
+
- Add String/Regex pattern matching for all metadata functions (`has_metadata`, `get_metadata`, `set_metadata!`, etc.)
6
+
- Add `strip_*!` functions to remove all metadata of a specific type from components
7
+
- Add `free_u()` and `free_p()` functions to identify variables/parameters without default values
8
+
- Support removing metadata by passing `nothing` or `missing` to `set_*!` functions
9
+
3
10
## v0.10.1 Changelog
4
11
-[#294](https://github.com/JuliaDynamics/NetworkDynamics.jl/pull/294) add linear stability analysis functions: `isfixpoint`, `jacobian_eigenvals`, and `is_linear_stable` with support for both ODE and DAE systems
5
12
-[#283](https://github.com/JuliaDynamics/NetworkDynamics.jl/pull/283) add automatic sparsity detection using `get_jac_prototype` and `set_jac_prototype!`
Copy file name to clipboardExpand all lines: docs/src/metadata.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ details.
22
22
## Symbol Metadata
23
23
Each component stores symbol metadata. The symbol metadata is a `Dict{Symbol, Dict{Symbol, Any}}` which stores a metadata dict per symbol. Symbols are everything that appears in [`sym`](@ref), [`psym`](@ref), [`obssym`](@ref) and [`insym`](@ref).
24
24
25
-
To access the data, you can use the methods `has_metadata`, `get_metadata`, `set_metadata!` and `delete_metadata!` (see [Per Symbol Metadata API](@ref)).
25
+
To access the data, you can use the methods `has_metadata`, `get_metadata`, `set_metadata!` and `delete_metadata!` (see [Per Symbol Metadata API](@ref)). These functions also support pattern matching using String or Regex patterns to match symbol names, making it easier to work with symbols containing special characters or when you only know part of the symbol name.
26
26
27
27
Special cases for symbol metadata are:
28
28
@@ -31,7 +31,7 @@ Special cases for symbol metadata are:
31
31
-`bounds`: Stores bounds for variables/parameters
32
32
-`init`: Stores the solution of the "free" variables, this is rarely set manually but instead when calling [`initialize_component!`](@ref).
33
33
34
-
For those, there are special functions `has_*`, `get_*`, `set_*!`and `delete_*!`. See [Per Symbol Metadata API](@ref).
34
+
For those, there are special functions `has_*`, `get_*`, `set_*!`, `delete_*!`and `strip_*!`. The `strip_*!` functions remove all metadata of a specific type from all symbols in a component. See [Per Symbol Metadata API](@ref).
35
35
36
36
These are closely aligned with the [metadata use in ModelingToolkit](@extref ModelingToolkit symbolic_metadata). They are automatically copied from the `ODESystem` if you use MTK models to create NetworkDynamics models.
37
37
@@ -42,5 +42,7 @@ common task. We provide several helper methods to do so. Please check out their
42
42
-[`dump_state`](@ref)
43
43
-[`dump_initial_state`](@ref)
44
44
-[`get_initial_state`](@ref)
45
+
-[`free_u`](@ref) - find variables without default values
46
+
-[`free_p`](@ref) - find parameters without default values
0 commit comments