|
786 | 786 | Return empty matrices for [`InternalModel`](@ref) (the state vector is not augmented). |
787 | 787 | """ |
788 | 788 | 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) |
800 | 792 | end |
801 | 793 |
|
802 | 794 | """ |
|
807 | 799 | Return empty matrices for [`SingleShooting`](@ref) transcription (N/A). |
808 | 800 | """ |
809 | 801 | 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 |
811 | 815 | ) where {NT<:Real} |
| 816 | + model = estim.model |
812 | 817 | nx̂, nu, nd = estim.nx̂, model.nu, model.nd |
813 | 818 | nZ = get_nZ(estim, transcription, Hp, Hc) |
814 | 819 | ES = zeros(NT, 0, nZ) |
|
0 commit comments