@@ -302,7 +302,7 @@ function init_predmat(
302302 G = Matrix {NT} (undef, Hp* ny, nd)
303303 jx̂ = Matrix {NT} (undef, nx̂, Hp* nd)
304304 J = repeatdiag (D̂d, Hp)
305- if nd ≠ 0
305+ if nd > 0
306306 for j= 1 : Hp
307307 iRow = (1 : ny) .+ ny* (j- 1 )
308308 G[iRow,:] = Ĉ* getpower (Âpow, j- 1 )* B̂d
@@ -853,7 +853,7 @@ function linconstraint!(mpc::PredictiveController, model::LinModel, ::Transcript
853853 fx̂ .= mpc. con. bx̂
854854 mul! (fx̂, mpc. con. kx̂, mpc. estim. x̂0, 1 , 1 )
855855 mul! (fx̂, mpc. con. vx̂, mpc. estim. lastu0, 1 , 1 )
856- if model. nd ≠ 0
856+ if model. nd > 0
857857 mul! (fx̂, mpc. con. gx̂, mpc. d0, 1 , 1 )
858858 mul! (fx̂, mpc. con. jx̂, mpc. D̂0, 1 , 1 )
859859 end
@@ -939,7 +939,7 @@ function linconstrainteq!(mpc::PredictiveController, model::LinModel, ::Multiple
939939 Fŝ .= mpc. con. Bŝ
940940 mul! (Fŝ, mpc. con. Kŝ, mpc. estim. x̂0, 1 , 1 )
941941 mul! (Fŝ, mpc. con. Vŝ, mpc. estim. lastu0, 1 , 1 )
942- if model. nd ≠ 0
942+ if model. nd > 0
943943 mul! (Fŝ, mpc. con. Gŝ, mpc. d0, 1 , 1 )
944944 mul! (Fŝ, mpc. con. Jŝ, mpc. D̂0, 1 , 1 )
945945 end
0 commit comments