Skip to content

Commit fb10f6d

Browse files
YingboMaChrisRackauckas
authored andcommitted
Add get_noiseeqs
1 parent af56da8 commit fb10f6d

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

docs/src/systems/AbstractSystem.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Optionally, a system could have:
3434
condition.
3535
- `get_default_p(sys)`: A `Dict` that maps parameters into their default value.
3636
- `independent_variable(sys)`: The independent variable of a system.
37+
- `get_noiseeqs(sys)`: Noise equations of the current-level system.
3738

3839
Note that there's `get_iv(sys)`, but it is not advised to use, since it errors
3940
when the system has no field `iv`. `independent_variable(sys)` returns `nothing`

src/systems/abstractsystem.jl

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,22 @@ function structure(sys::AbstractSystem)
134134
s isa SystemStructure || throw(ArgumentError("SystemStructure is not yet initialized, please run `sys = initialize_system_structure(sys)` or `sys = alias_elimination(sys)`."))
135135
return s
136136
end
137-
for prop in [:eqs, :iv, :states, :ps, :default_p, :default_u0, :observed, :tgrad, :jac, :Wfact, :Wfact_t, :systems, :structure]
137+
for prop in [
138+
:eqs
139+
:noiseeqs
140+
:iv
141+
:states
142+
:ps
143+
:default_p
144+
:default_u0
145+
:observed
146+
:tgrad
147+
:jac
148+
:Wfact
149+
:Wfact_t
150+
:systems
151+
:structure
152+
]
138153
fname1 = Symbol(:get_, prop)
139154
fname2 = Symbol(:has_, prop)
140155
@eval begin

0 commit comments

Comments
 (0)