Skip to content

Commit 8922d3b

Browse files
committed
test: remove useless test with new DI.jl interface
1 parent b28b702 commit 8922d3b

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

test/2_test_state_estim.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -968,13 +968,6 @@ end
968968
= updatestate!(mhe3, [0], [0])
969969
@test [0, 0] atol=1e-3
970970
@test isa(x̂, Vector{Float32})
971-
972-
mhe4 = setconstraint!(MovingHorizonEstimator(nonlinmodel, He=1, nint_ym=0), v̂max=[50,50])
973-
g_V̂max_end = mhe4.optim[:g_V̂max_2].func
974-
# test gfunc_i(i,::NTuple{N, Float64})
975-
@test g_V̂max_end(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) 0.0
976-
# test gfunc_i(i,::NTuple{N, ForwardDiff.Dual}) :
977-
@test ForwardDiff.gradient(vec->g_V̂max_end(vec...), zeros(8)) zeros(8)
978971

979972
= diagm([1/4, 1/4, 1/4, 1/4].^2)
980973
= diagm([1, 1].^2)

test/3_test_predictive_control.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -683,12 +683,6 @@ end
683683
preparestate!(nmpc4, [0], [0])
684684
u = moveinput!(nmpc4, [0], d, R̂u=fill(12, nmpc4.Hp))
685685
@test u [12] atol=5e-2
686-
nmpc5 = setconstraint!(NonLinMPC(nonlinmodel, Hp=15, Cwt=Inf), ymin=[1])
687-
g_Y0min_end = nmpc5.optim[:g_Y0min_15].func
688-
# test gfunc_i(i,::NTuple{N, Float64}):
689-
@test g_Y0min_end(20.0, 10.0) 0.0
690-
# test gfunc_i(i,::NTuple{N, ForwardDiff.Dual}) :
691-
@test ForwardDiff.gradient(vec->g_Y0min_end(vec...), [20.0, 10.0]) [-5, -5] atol=1e-3
692686
linmodel3 = LinModel{Float32}(0.5*ones(1,1), ones(1,1), ones(1,1), 0, 0, 3000.0)
693687
nmpc6 = NonLinMPC(linmodel3, Hp=10)
694688
preparestate!(nmpc6, [0])

0 commit comments

Comments
 (0)