File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
name = " StateSpaceLearning"
2
2
uuid = " 971c4b7c-2c4e-4bac-8525-e842df3cde7b"
3
3
authors = [
" andreramosfc <[email protected] >" ]
4
- version = " 2.0.10 "
4
+ version = " 2.0.11 "
5
5
6
6
[deps ]
7
7
Distributions = " 31c24e10-a181-5473-b8eb-7969acd0382f"
Original file line number Diff line number Diff line change @@ -153,9 +153,13 @@ function get_stochastic_values(
153
153
valid_indices = filter (idx -> start_idx <= idx <= final_idx, seasonal_indices)
154
154
155
155
# Sample with randomness and sign flip
156
- stochastic_term[t, :] =
157
- rand (estimated_stochastic[valid_indices], N_scenarios) .*
158
- rand ([1 , - 1 ], N_scenarios)
156
+ if ! isempty (estimated_stochastic[valid_indices])
157
+ stochastic_term[t, :] =
158
+ rand (estimated_stochastic[valid_indices], N_scenarios) .*
159
+ rand ([1 , - 1 ], N_scenarios)
160
+ else
161
+ stochastic_term[t, :] .= 0.0
162
+ end
159
163
end
160
164
else
161
165
stochastic_term =
You can’t perform that action at this time.
0 commit comments