Skip to content

Commit 2309a36

Browse files
committed
debug: avoid abiguous methods
1 parent 86038c0 commit 2309a36

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

src/controller/transcription.jl

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -786,17 +786,9 @@ end
786786
Return empty matrices for [`InternalModel`](@ref) (the state vector is not augmented).
787787
"""
788788
function init_defectmat(
789-
model::SimModel, estim::InternalModel{NT}, transcription::TranscriptionMethod, Hp, Hc, _
790-
) where {NT<:Real}
791-
nx̂, nu, nd = estim.nx̂, model.nu, model.nd
792-
nZ = get_nZ(estim, transcription, Hp, Hc)
793-
ES = zeros(NT, 0, nZ)
794-
GS = zeros(NT, 0, nd)
795-
JS = zeros(NT, 0, nd*Hp)
796-
KS = zeros(NT, 0, nx̂)
797-
VS = zeros(NT, 0, nu)
798-
BS = zeros(NT, 0)
799-
return ES, GS, JS, KS, VS, BS
789+
::SimModel, estim::InternalModel, transcription::TranscriptionMethod, Hp, Hc, _
790+
)
791+
return init_defectmat_empty(estim, transcription, Hp, Hc)
800792
end
801793

802794
"""
@@ -807,8 +799,21 @@ end
807799
Return empty matrices for [`SingleShooting`](@ref) transcription (N/A).
808800
"""
809801
function init_defectmat(
810-
model::SimModel, estim::StateEstimator{NT}, transcription::SingleShooting, Hp, Hc, _
802+
::SimModel, estim::StateEstimator, transcription::SingleShooting, Hp, Hc, _
803+
)
804+
return init_defectmat_empty(estim, transcription, Hp, Hc)
805+
end
806+
807+
function init_defectmat(
808+
::SimModel, estim::InternalModel, transcription::SingleShooting, Hp, Hc, _
809+
)
810+
return init_defectmat_empty(estim, transcription, Hp, Hc)
811+
end
812+
813+
function init_defectmat_empty(
814+
estim::StateEstimator{NT}, transcription::TranscriptionMethod, Hp, Hc
811815
) where {NT<:Real}
816+
model = estim.model
812817
nx̂, nu, nd = estim.nx̂, model.nu, model.nd
813818
nZ = get_nZ(estim, transcription, Hp, Hc)
814819
ES = zeros(NT, 0, nZ)

0 commit comments

Comments
 (0)