File tree Expand file tree Collapse file tree 1 file changed +0
-34
lines changed
Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Original file line number Diff line number Diff line change @@ -129,40 +129,6 @@ function sampling(law::Vector{NoiseLaw}, t::Int64)
129129end
130130
131131
132- """
133- DEPRECATED
134- Simulate n scenarios according to a given NoiseLaw
135-
136- Parameters:
137- - law::Vector{NoiseLaw}
138- Vector of discrete independent random variables
139- - n::Int
140- number of simulations to compute
141-
142- Returns :
143- - scenarios Array(Float64,n,T)
144- an Array of scenarios, scenarios[i,:] being the ith noise scenario
145- """
146- function generate_scenarios (laws:: Vector{NoiseLaw} , n:: Int64 )
147- warn (" deprecated generate_scenarios use simulate_scenarios" )
148- if n <= 0
149- error (" negative number of simulations" )
150- end
151- Tf = length (laws)
152- scenarios = Array {Vector{Float64}} (n,Tf)
153- for i = 1 : n# TODO can be parallelized
154- scenario = []
155- for t= 1 : Tf
156- new_val = laws[t]. support[:, rand (Categorical (laws[t]. proba))]
157- push! (scenario, new_val)
158- end
159- scenarios[i,:]= scenario
160- end
161-
162- return scenarios
163- end
164-
165-
166132"""
167133Simulate n scenarios and return a 3D array
168134
You can’t perform that action at this time.
0 commit comments