Skip to content

Commit 292ff83

Browse files
docs: add docs for jumps, brownians, cost, constraints, symbolic_tstops, preface
1 parent 5b64a6b commit 292ff83

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

src/systems/abstractsystem.jl

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,6 +1679,12 @@ function equations_toplevel(sys::AbstractSystem)
16791679
return get_eqs(sys)
16801680
end
16811681

1682+
"""
1683+
$(TYPEDSIGNATURES)
1684+
1685+
Get the flattened jumps of the system. In other words, obtain all of the jumps in `sys` and
1686+
all the subsystems of `sys` (appropriately namespaced).
1687+
"""
16821688
function jumps(sys::AbstractSystem)
16831689
js = get_jumps(sys)
16841690
systems = get_systems(sys)
@@ -1688,6 +1694,12 @@ function jumps(sys::AbstractSystem)
16881694
return [js; reduce(vcat, namespace_jumps.(systems); init = [])]
16891695
end
16901696

1697+
"""
1698+
$(TYPEDSIGNATURES)
1699+
1700+
Get all of the brownian variables involved in the system `sys` and all subsystems,
1701+
appropriately namespaced.
1702+
"""
16911703
function brownians(sys::AbstractSystem)
16921704
bs = get_brownians(sys)
16931705
systems = get_systems(sys)
@@ -1697,6 +1709,12 @@ function brownians(sys::AbstractSystem)
16971709
return [bs; reduce(vcat, namespace_brownians.(systems); init = [])]
16981710
end
16991711

1712+
"""
1713+
$(TYPEDSIGNATURES)
1714+
1715+
Recursively consolidate the cost vector of `sys` and all subsystems of `sys`, returning the
1716+
final scalar cost function.
1717+
"""
17001718
function cost(sys::AbstractSystem)
17011719
cs = get_costs(sys)
17021720
consolidate = get_consolidate(sys)
@@ -1726,7 +1744,12 @@ function namespace_constraints(sys)
17261744
map(cstr -> namespace_constraint(cstr, sys), cstrs)
17271745
end
17281746

1729-
function constraints(sys)
1747+
"""
1748+
$(TYPEDSIGNATURES)
1749+
1750+
Get all constraints in the system `sys` and all of its subsystems, appropriately namespaced.
1751+
"""
1752+
function constraints(sys::AbstractSystem)
17301753
cs = get_constraints(sys)
17311754
systems = get_systems(sys)
17321755
isempty(systems) ? cs : [cs; reduce(vcat, namespace_constraints.(systems))]
@@ -1753,6 +1776,11 @@ function initialization_equations(sys::AbstractSystem)
17531776
end
17541777
end
17551778

1779+
"""
1780+
$(TYPEDSIGNATURES)
1781+
1782+
Get the tstops present in `sys` and its subsystems, appropriately namespaced.
1783+
"""
17561784
function symbolic_tstops(sys::AbstractSystem)
17571785
tstops = get_tstops(sys)
17581786
systems = get_systems(sys)
@@ -1761,6 +1789,12 @@ function symbolic_tstops(sys::AbstractSystem)
17611789
return tstops
17621790
end
17631791

1792+
"""
1793+
$(TYPEDSIGNATURES)
1794+
1795+
Obtain the preface associated with `sys` and all of its subsystems, appropriately
1796+
namespaced.
1797+
"""
17641798
function preface(sys::AbstractSystem)
17651799
has_preface(sys) || return nothing
17661800
pre = get_preface(sys)

0 commit comments

Comments
 (0)