1
1
using BenchmarkTools
2
- using Random
2
+
3
+ using ModelPredictiveControl, ControlSystemsBase
4
+ Ts = 400.0
5
+ sys = [ tf (1.90 ,[1800.0 ,1 ]) tf (1.90 ,[1800.0 ,1 ]) tf (1.90 ,[1800.0 ,1 ]);
6
+ tf (- 0.74 ,[800.0 ,1 ]) tf (0.74 ,[800.0 ,1 ]) tf (- 0.74 ,[800.0 ,1 ]) ]
7
+ linmodel = setop! (LinModel (sys, Ts, i_d= [3 ]), uop= [10 ,50 ], yop= [50 ,30 ], dop= [5 ])
8
+ u, d = [10 , 50 ], [5 ]
3
9
4
10
const SUITE = BenchmarkGroup ()
5
11
12
+ # # ================== SimModel benchmarks =========================================
13
+ SUITE[" SimModel" ][" allocation" ] = BenchmarkGroup ([" allocation" ])
14
+ SUITE[" SimModel" ][" allocation" ][" updatestate!" ] = @benchmarkable (
15
+ updatestate! ($ linmodel, $ u, $ d),
16
+ samples= 1
17
+ )
18
+ SUITE[" SimModel" ][" allocation" ][" evaloutput" ] = @benchmarkable (
19
+ evaloutput ($ linmodel, $ d),
20
+ samples= 1
21
+ )
22
+
23
+ # # ================== StateEstimator benchmarks ================================
24
+
25
+
26
+
27
+ #=
6
28
SUITE["utf8"] = BenchmarkGroup(["string", "unicode"])
7
29
teststr = String(join(rand(MersenneTwister(1), 'a':'d', 10^4)))
8
30
SUITE["utf8"]["replace"] = @benchmarkable replace($teststr, "a" => "b")
@@ -16,10 +38,4 @@ for f in (sin, cos, tan)
16
38
SUITE["trigonometry"]["circular"][string(f), x] = @benchmarkable ($f)($x)
17
39
end
18
40
end
19
-
20
- SUITE[" trigonometry" ][" hyperbolic" ] = BenchmarkGroup ()
21
- for f in (sin, cos, tan)
22
- for x in (0.0 , pi )
23
- SUITE[" trigonometry" ][" hyperbolic" ][string (f), x] = @benchmarkable ($ f)($ x)
24
- end
25
- end
41
+ =#
0 commit comments