From de0211c1f2b4b97c3c99481eba85a6813a92bfce Mon Sep 17 00:00:00 2001 From: Datseris Date: Fri, 23 Feb 2024 11:55:46 +0000 Subject: [PATCH] fix typo in docs --- docs/src/index.md | 2 +- src/API.jl | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 8aadd0e..75ce767 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -187,7 +187,7 @@ ExpRelaxation ## `Process` API -This API describes how you can implement your own `Process` subtype, if the [existing predefined subtypes](@ref predefineProcessBasedModelling.timescaled_processes) don't fit your bill! +This API describes how you can implement your own `Process` subtype, if the [existing predefined subtypes](@ref predefined_processes) don't fit your bill! ```@docs Process diff --git a/src/API.jl b/src/API.jl index f56c2c1..2e93e01 100644 --- a/src/API.jl +++ b/src/API.jl @@ -1,5 +1,8 @@ """ -A process subtype `p::Process` extends the following unexported functions: + Process + +A new process must subtype `Process` and can be used in [`processes_to_mtkmodel`](@ref). +The type must extend the following functions from the module `ProcessBasedModelling`: - `lhs_variable(p)` which returns the variable the process describes (left-hand-side variable). There is a default implementation @@ -57,7 +60,7 @@ function lhs(p::Process) τ = timescale(p) v = lhs_variable(p) if isnothing(τ) # time variability exists but timescale is nonexistent (unity) - return D(v) + return D(v) # `D` is the MTK canonical variable for time derivative elseif τ isa NoTimeDerivative || iszero(τ) # no time variability return v else # τ is either Num or Real