Skip to content

Commit

Permalink
Removed ambiguity in IdModels
Browse files Browse the repository at this point in the history
  • Loading branch information
neveritt committed May 18, 2017
1 parent 85ff347 commit b53eeda
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/types/idmodels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,11 @@ end
Define the PolyModel(`na`,`nb`,`nf`,`nc`,`nd`) model structure:
A(z)y(t) = F(z)\B(z) z^-`nk`u(t) + D(z)\C(z)e(t)
"""
# TODO: reconsider
function PolyModel(; na::Int=0, nb::Int=0, nf::Int=0, nc::Int=0, nd::Int=0,
nk::Int=1, ny::Int=1, nu::Int=1)
_PolyModel(Val{S}; na=na, nb=nb, nf=nf, nc=nc, nd=nd, nk=[nk], ny=ny, nu=nu)
end

function PolyModel(; na::Int=0, nb::Int=0, nf::Int=0, nc::Int=0, nd::Int=0,
nk::Vector{Int}=[1], ny::Int=1, nu::Int=1)
_PolyModel(Val{S}; na=na, nb=nb, nf=nf, nc=nc, nd=nd, nk=nk, ny=ny, nu=nu)
nk::Union{Int,Vector{Int}}=1, ny::Int=1, nu::Int=1)
isa(nk, Int) ? _PolyModel(Val{:siso}; na=na, nb=nb, nf=nf, nc=nc, nd=nd, nk=[nk], ny=ny, nu=nu) :
_PolyModel(Val{:mimo}; na=na, nb=nb, nf=nf, nc=nc, nd=nd, nk=nk, ny=ny, nu=nu)
end

function _PolyModel{S}(::Type{Val{S}}; na::Int=0,nb::Int=0,nf::Int=0,nc::Int=0,nd::Int=0,
Expand Down

0 comments on commit b53eeda

Please sign in to comment.