@@ -19,7 +19,7 @@ using DynamicQuantities
19
19
using ModelingToolkit: D as Dt, t as t
20
20
using Test
21
21
using StaticArrays
22
- using LinearInterpolations
22
+ using DataInterpolations
23
23
using OrdinaryDiffEqTsit5
24
24
using CairoMakie
25
25
CairoMakie. activate! (type= " svg" ) # hide
@@ -220,10 +220,8 @@ Julia code from the symbolic reepresentation all units will be stripped.
220
220
However since we know the times exactly, we can handle this by simply giving a list of explicit
221
221
tstops to the solve command, to make sure those are hit exactly.
222
222
=#
223
- load2 (t) = - Interpolate (SA[0 , 4 , 12 , 20 , 24 ]* 3600 , SA[20 , 30 , 10 , 30 , 20 ], extrapolate= LinearInterpolations. Constant (20 ))(t)
224
- load3 (t) = - Interpolate (SA[0 , 4 , 12 , 20 , 24 ]* 3600 , SA[40 , 50 , 30 , 50 , 40 ], extrapolate= LinearInterpolations. Constant (40 ))(t)
225
- @register_symbolic load2 (t)
226
- @register_symbolic load3 (t)
223
+ load2 = (t) -> LinearInterpolation (- 1 * Float64[20 , 30 , 10 , 30 , 20 ], [0 , 4 , 12 , 20 , 24 ]* 3600.0 ; extrapolation= ExtrapolationType. Constant)(t)
224
+ load3 = (t) -> LinearInterpolation (- 1 * Float64[40 , 50 , 30 , 50 , 40 ], [0 , 4 , 12 , 20 , 24 ]* 3600.0 ; extrapolation= ExtrapolationType. Constant)(t)
227
225
ModelingToolkit. get_unit (op:: typeof (load2), _) = u " m^3/s"
228
226
ModelingToolkit. get_unit (op:: typeof (load3), _) = u " m^3/s"
229
227
nothing # hide
0 commit comments