Skip to content

Commit 3b340c2

Browse files
Merge pull request #2773 from SciML/typos
Fix typos
2 parents 924bd6c + fa02ee7 commit 3b340c2

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

docs/src/examples/remake.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ over the various methods, listing their use cases.
133133

134134
This method is the most generic. It can handle symbolic maps, initializations of
135135
parameters/states dependent on each other and partial updates. However, this comes at the
136-
cost of performance. `remake` is also not always inferrable.
136+
cost of performance. `remake` is also not always inferable.
137137

138138
## `remake` and `setp`/`setu`
139139

docs/src/tutorials/discrete_system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ the Fibonacci series:
4343
```
4444

4545
The "default value" here should be interpreted as the value of `x` at all past timesteps.
46-
For example, here `x(k-1)` and `x(k-2)` will be `1.0`, and the inital value of `x(k)` will
46+
For example, here `x(k-1)` and `x(k-2)` will be `1.0`, and the initial value of `x(k)` will
4747
thus be `2.0`. During problem construction, the _past_ value of a variable should be
4848
provided. For example, providing `[x => 1.0]` while constructing this problem will error.
4949
Provide `[x(k-1) => 1.0]` instead. Note that values provided during problem construction

src/clock.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ is_concrete_time_domain(x) = x isa Union{AbstractClock, Continuous}
130130
SolverStepClock()
131131
SolverStepClock(t)
132132
133-
A clock that ticks at each solver step (sometimes referred to as "continuous sample time"). This clock **does generally not have equidistant tick intervals**, instead, the tick interval depends on the adaptive step-size slection of the continuous solver, as well as any continuous event handling. If adaptivity of the solver is turned off and there are no continuous events, the tick interval will be given by the fixed solver time step `dt`.
133+
A clock that ticks at each solver step (sometimes referred to as "continuous sample time"). This clock **does generally not have equidistant tick intervals**, instead, the tick interval depends on the adaptive step-size selection of the continuous solver, as well as any continuous event handling. If adaptivity of the solver is turned off and there are no continuous events, the tick interval will be given by the fixed solver time step `dt`.
134134
135135
Due to possibly non-equidistant tick intervals, this clock should typically not be used with discrete-time systems that assume a fixed sample time, such as PID controllers and digital filters.
136136
"""

src/systems/abstractsystem.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,11 +2341,11 @@ function Base.showerror(io::IO, e::ExtraEquationsSystemException)
23412341
print(io, "ExtraEquationsSystemException: ", e.msg)
23422342
end
23432343

2344-
struct HybridSystemNotSupportedExcpetion <: Exception
2344+
struct HybridSystemNotSupportedException <: Exception
23452345
msg::String
23462346
end
2347-
function Base.showerror(io::IO, e::HybridSystemNotSupportedExcpetion)
2348-
print(io, "HybridSystemNotSupportedExcpetion: ", e.msg)
2347+
function Base.showerror(io::IO, e::HybridSystemNotSupportedException)
2348+
print(io, "HybridSystemNotSupportedException: ", e.msg)
23492349
end
23502350

23512351
function AbstractTrees.children(sys::ModelingToolkit.AbstractSystem)

src/systems/clock_inference.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ function ClockInference(ts::TransformationState)
2121
ClockInference(ts, eq_domain, var_domain, inferred)
2222
end
2323

24-
struct NotInferedTimeDomain end
24+
struct NotInferredTimeDomain end
2525
function error_sample_time(eq)
26-
error("$eq\ncontains `SampleTime` but it is not an infered discrete equation.")
26+
error("$eq\ncontains `SampleTime` but it is not an Inferred discrete equation.")
2727
end
2828
function substitute_sample_time(ci::ClockInference, ts::TearingState)
2929
@unpack eq_domain = ci
@@ -34,7 +34,7 @@ function substitute_sample_time(ci::ClockInference, ts::TearingState)
3434
domain = eq_domain[i]
3535
dt = sampletime(domain)
3636
neweq = substitute_sample_time(eq, dt)
37-
if neweq isa NotInferedTimeDomain
37+
if neweq isa NotInferredTimeDomain
3838
error_sample_time(eq)
3939
end
4040
eqs[i] = neweq
@@ -52,13 +52,13 @@ function substitute_sample_time(ex, dt)
5252
op = operation(ex)
5353
args = arguments(ex)
5454
if op == SampleTime
55-
dt === nothing && return NotInferedTimeDomain()
55+
dt === nothing && return NotInferredTimeDomain()
5656
return dt
5757
else
5858
new_args = similar(args)
5959
for (i, arg) in enumerate(args)
6060
ex_arg = substitute_sample_time(arg, dt)
61-
if ex_arg isa NotInferedTimeDomain
61+
if ex_arg isa NotInferredTimeDomain
6262
return ex_arg
6363
end
6464
new_args[i] = ex_arg

src/systems/systemstructure.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ function structural_simplify!(state::TearingState, io = nothing; simplify = fals
636636
kwargs...)
637637
if length(tss) > 1
638638
if continuous_id > 0
639-
throw(HybridSystemNotSupportedExcpetion("Hybrid continuous-discrete systems are currently not supported with the standard MTK compiler. This system requires JuliaSimCompiler.jl, see https://help.juliahub.com/juliasimcompiler/stable/"))
639+
throw(HybridSystemNotSupportedException("Hybrid continuous-discrete systems are currently not supported with the standard MTK compiler. This system requires JuliaSimCompiler.jl, see https://help.juliahub.com/juliasimcompiler/stable/"))
640640
end
641641
# TODO: rename it to something else
642642
discrete_subsystems = Vector{ODESystem}(undef, length(tss))

test/clock.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ eqs = [yd ~ Sample(t, dt)(y)
105105
D(x) ~ -x + u
106106
y ~ x]
107107
@named sys = ODESystem(eqs, t)
108-
@test_throws ModelingToolkit.HybridSystemNotSupportedExcpetion ss=structural_simplify(sys);
108+
@test_throws ModelingToolkit.HybridSystemNotSupportedException ss=structural_simplify(sys);
109109

110110
@test_skip begin
111111
Tf = 1.0
@@ -500,18 +500,18 @@ eqs = [yd ~ Sample(t, dt)(y)
500500
@mtkmodel FirstOrderWithStepCounter begin
501501
@components begin
502502
counter = CounterSys()
503-
fo = FirstOrderSys()
503+
firstorder = FirstOrderSys()
504504
end
505505
@equations begin
506-
counter.u ~ fo.x
506+
counter.u ~ firstorder.x
507507
end
508508
end
509509

510510
@mtkbuild model = FirstOrderWithStepCounter()
511511
prob = ODEProblem(model, [], (0.0, 10.0))
512512
sol = solve(prob, Tsit5(), kwargshandle = KeywordArgSilent)
513513

514-
@test sol.prob.kwargs[:disc_saved_values][1].t == sol.t[1:2:end] # Test that the discrete-tiem system executed at every step of the continuous solver. The solver saves each time step twice, one state value before discrete affect and one after.
514+
@test sol.prob.kwargs[:disc_saved_values][1].t == sol.t[1:2:end] # Test that the discrete-time system executed at every step of the continuous solver. The solver saves each time step twice, one state value before discrete affect and one after.
515515
@test_nowarn ModelingToolkit.build_explicit_observed_function(
516516
model, model.counter.ud)(sol.u[1], prob.p..., sol.t[1])
517517

test/parameter_dependencies.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ end
167167
D(x) ~ -x + u
168168
y ~ x
169169
z(k) ~ z(k - 2) + yd(k - 2)]
170-
@test_throws ModelingToolkit.HybridSystemNotSupportedExcpetion @mtkbuild sys = ODESystem(
170+
@test_throws ModelingToolkit.HybridSystemNotSupportedException @mtkbuild sys = ODESystem(
171171
eqs, t; parameter_dependencies = [kq => 2kp])
172172

173173
@test_skip begin

0 commit comments

Comments
 (0)