Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StateSpaceLearning"
uuid = "971c4b7c-2c4e-4bac-8525-e842df3cde7b"
authors = ["andreramosfc <[email protected]>"]
version = "2.0.8"
version = "2.0.9"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
5 changes: 4 additions & 1 deletion src/models/structural_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ mutable struct StructuralModel <: StateSpaceLearningModel

if typeof(cycle_period) <: Vector
(@assert all(cycle_period .>= 0) "Cycle period must be greater than or equal to 0")
if isempty(cycle_period)
cycle_period = 0
end
else
(@assert cycle_period >= 0 "Cycle period must be greater than or equal to 0")
end
Expand Down Expand Up @@ -1618,7 +1621,7 @@ function simulate_states(
seasonals_t = [zeros(N_scenarios) for _ in eachindex(model.freq_seasonal)]
end

if model.cycle_period != 0 && model.cycle_period != []
if model.cycle_period != 0
cycles_t = []
for i in eachindex(model.cycle_period)
λ = 2 * pi * (1:(T + steps_ahead)) / model.cycle_period[i]
Expand Down
Loading