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
affect isa AbstractVector &&isnothing(iv) &&@warn"No independent variable specified. If t appears in an affect equation explicitly, like x ~ t + 1, then this must be specified. Otherwise this can be disregarded."
214
214
conditions = (conditions isa AbstractVector) ? conditions : [conditions]
isempty(algeeqs) &&@warn"No algebraic equations were found. If the system has no algebraic equations, this can be disregarded. Otherwise consider passing in `algeeqs` to the SymbolicContinuousCallbacks constructor."
230
+
isempty(algeeqs) &&@warn"No algebraic equations were found. If the system has no algebraic equations, this can be disregarded. Otherwise pass in `algeeqs` to the SymbolicContinuousCallback constructor."
232
231
233
232
affect =scalarize(affect)
234
233
dvs =OrderedSet()
@@ -243,6 +242,7 @@ function make_affect(affect::Vector{Equation}, iv; algeeqs = Equation[])
243
242
end
244
243
ifisnothing(iv)
245
244
iv =isempty(dvs) ? iv :only(arguments(dvs[1]))
245
+
isnothing(iv) &&@warn"No independent variable specified and could not be inferred. If the iv appears in an affect equation explicitly, like x ~ t + 1, then it must be specified as an argument to the SymbolicContinuousCallback or SymbolicDiscreteCallback constructor. Otherwise this warning can be disregarded."
246
246
end
247
247
248
248
# System parameters should become unknowns in the ImplicitDiscreteSystem.
@@ -271,21 +271,21 @@ function make_affect(affect::Vector{Equation}, iv; algeeqs = Equation[])
271
271
# get accessed parameters p from Pre(p) in the callback parameters
A callback that triggers at the first timestep that the conditions are satisfied.
386
386
387
387
The condition can be one of:
388
388
- Δt::Real - periodic events with period Δt
389
389
- ts::Vector{Real} - events trigger at these preset times given by `ts`
390
390
- eqs::Vector{Equation} - events trigger when the condition evaluates to true
391
+
392
+
Arguments:
393
+
- iv: The independent variable of the system. This must be specified if the independent variable appaers in one of the equations explicitly, as in x ~ t + 1.
394
+
- algeeqs: Algebraic equations of the system that must be satisfied after the callback occurs.
initialize =nothing, finalize =nothing, iv =nothing, algeeqs = Equation[])
401
405
c =is_timed_condition(condition) ? condition :value(scalarize(condition))
402
406
403
-
isnothing(iv) &&@warn"No independent variable specified. If t appears in an affect equation explicitly, like x ~ t + 1, then this must be specified. Otherwise this can be disregarded."
0 commit comments