@@ -169,16 +169,13 @@ the current estimation of Vt.
169169 for scenario k and time t.
170170* `law::Array{NoiseLaw}`:
171171 Conditionnal distributions of perturbation, for each timestep
172- * `init::Bool`:
173- If specified, then init PolyhedralFunction
174172"""
175173function backward_pass! (model:: SPModel ,
176174 param:: SDDPparameters ,
177175 V:: Vector{PolyhedralFunction} ,
178176 solverProblems:: Vector{JuMP.Model} ,
179177 stockTrajectories:: Array{Float64, 3} ,
180- law,
181- init= false :: Bool )
178+ law)
182179
183180 callsolver:: Int = 0
184181
@@ -222,11 +219,7 @@ function backward_pass!(model::SPModel,
222219 beta = costs_npass - dot (subgradient, state_t)
223220
224221 # Add cut to polyhedral function and JuMP model:
225- if init
226- V[t] = PolyhedralFunction ([beta], reshape (subgradient, 1 , model. dimStates), 1 )
227- else
228- add_cut! (model, t, V[t], beta, subgradient)
229- end
222+ add_cut! (model, t, V[t], beta, subgradient)
230223 if t > 1
231224 add_cut_to_model! (model, solverProblems[t- 1 ], t, beta, subgradient)
232225 end
0 commit comments