Skip to content

Commit ac737c0

Browse files
committed
init
1 parent 0a5c1ce commit ac737c0

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

docs/src/systems/DiscreteSystem.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# DiscreteSystem
2+
3+
## System Constructors
4+
5+
```@docs
6+
DiscreteSystem
7+
```
8+
9+
## Composition and Accessor Functions
10+
11+
- `get_eqs(sys)` or `equations(sys)`: The equations that define the discrete system.
12+
- `get_unknowns(sys)` or `unknowns(sys)`: The set of unknowns in the discrete system.
13+
- `get_ps(sys)` or `parameters(sys)`: The parameters of the discrete system.
14+
- `get_iv(sys)`: The independent variable of the discrete system
15+
- `discrete_events(sys)`: The set of discrete events in the discrete system.
16+
17+
## Transformations
18+
19+
```@docs; canonical=false
20+
structural_simplify
21+
```
22+
23+
## Problem Constructors
24+
25+
```@docs; canonical=false
26+
DiscreteProblem(sys::DiscreteSystem, u0map, tspan)
27+
DiscreteFunction(sys::DiscreteSystem, args...)
28+
```

src/systems/discrete_system/discrete_system.jl

+13
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,19 @@ end
323323
function SciMLBase.DiscreteFunction{false}(sys::DiscreteSystem, args...; kwargs...)
324324
DiscreteFunction{false, SciMLBase.FullSpecialize}(sys, args...; kwargs...)
325325
end
326+
327+
"""
328+
```julia
329+
SciMLBase.DiscreteFunction{iip}(sys::DiscreteSystem,
330+
dvs = unknowns(sys),
331+
ps = parameters(sys);
332+
kwargs...) where {iip}
333+
```
334+
335+
Create an `DiscreteFunction` from the [`DiscreteSystem`](@ref). The arguments `dvs` and `ps`
336+
are used to set the order of the dependent variable and parameter vectors,
337+
respectively.
338+
"""
326339
function SciMLBase.DiscreteFunction{iip, specialize}(
327340
sys::DiscreteSystem,
328341
dvs = unknowns(sys),

0 commit comments

Comments
 (0)