Skip to content

Commit 1772b94

Browse files
committed
wip: idem
1 parent 3b9843c commit 1772b94

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/controller/transcription.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,8 +1050,9 @@ end
10501050
Do the same for [`SimModel`](@ref), but using simpler equations (stochastic defects only).
10511051
"""
10521052
function linconstrainteq!(
1053-
mpc::PredictiveController, ::SimModel, ::StateEstimator, ::TranscriptionMethod
1053+
mpc::PredictiveController, ::SimModel, estim::StateEstimator, ::TranscriptionMethod
10541054
)
1055+
(estim.nxs < 1) && return nothing # no stochastic state ⟹ no linear eq. constraint
10551056
FS = mpc.con.FS
10561057
# the only non-zeros matrices are ES and KS:
10571058
mul!(FS, mpc.con.KS, mpc.estim.x̂0)
@@ -1061,7 +1062,7 @@ function linconstrainteq!(
10611062
return nothing
10621063
end
10631064
linconstrainteq!(::PredictiveController, ::SimModel, ::InternalModel, ::TranscriptionMethod) = nothing
1064-
linconstrainteq!(::PredictiveController, ::SimModel, ::StateEstimator, ::TranscriptionMethod) = nothing
1065+
linconstrainteq!(::PredictiveController, ::SimModel, ::StateEstimator, ::SingleShooting) = nothing
10651066

10661067
@doc raw"""
10671068
set_warmstart!(mpc::PredictiveController, ::SingleShooting, Z̃var) -> Z̃s

0 commit comments

Comments
 (0)