Skip to content

Commit 54bee8e

Browse files
author
trigaut
committed
[UPD] Update of the doc
1 parent fdd1185 commit 54bee8e

File tree

1 file changed

+58
-5
lines changed

1 file changed

+58
-5
lines changed

src/SDPoptimize.jl

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,59 @@ function solve_DP(model::SPModel,
140140
return V
141141
end
142142

143+
"""
144+
Compute the value function at time t
145+
146+
Parameters:
147+
- sampling size (Int)
148+
number of randomness samples
149+
150+
- samples (Array{Float64})
151+
list of random samples
152+
153+
- probas (Array{Float64})
154+
array of probabilities of samples
155+
156+
- u_bounds (Array{Tuple{Float64}})
157+
array of lower and upper bounds of controls
158+
159+
- x_bounds (Array{Tuple{Float64}})
160+
array of lower and upper bounds of states
161+
162+
- x_steps (Array{Float64})
163+
array discretization steps for states space
164+
165+
- x_dim (Int)
166+
number of state variables
167+
168+
- product_states (Array{Float64})
169+
discretized state space
170+
171+
- product_controls (Array{Float64})
172+
discretized control space
173+
174+
- dynamics (Function)
175+
dynamics function of the time step, state, control and randomness returning next state
176+
177+
- contraints (Function)
178+
constraints function of the time step, state, control and randomness returning boolean
179+
180+
- cost (Function)
181+
cost function of the time step, state, control and randomness returning the instantaneous cost
182+
183+
- V (Array of SharedArray)
184+
the array containing the discretized value functions at each time step
185+
186+
- Vitp (Interpolations)
187+
the interpolated value functions
188+
189+
- t (Float64)
190+
the time step
191+
192+
- info_struc (String)
193+
the information structure "HD" or "DH"
194+
195+
"""
143196
function compute_V_given_t(sampling_size, samples, probas, u_bounds, x_bounds,
144197
x_steps, x_dim, product_states, product_controls,
145198
dynamics, constraints, cost, V, Vitp, t, info_struc)
@@ -267,7 +320,7 @@ Parameters:
267320
- param (SDPparameters)
268321
the parameters for the SDP algorithm
269322
270-
- V (Array{Float64})
323+
- V (Array{Float64} or SharedArray{Float64})
271324
the Bellman Functions
272325
273326
Returns :
@@ -295,7 +348,7 @@ Parameters:
295348
the scenarios of uncertainties realizations we want to simulate on
296349
scenarios[t,k,:] is the alea at time t for scenario k
297350
298-
- V (Array)
351+
- V (Array{Float64} or SharedArray{Float64})
299352
the vector representing the value functions as functions of the state
300353
of the system at each time step
301354
@@ -348,7 +401,7 @@ Parameters:
348401
- param (SDPparameters)
349402
the parameters for the SDP algorithm
350403
351-
- V (Array{Float64})
404+
- V (Array{Float64} or SharedArray{Float64})
352405
the Bellman Functions
353406
354407
- t (int)
@@ -433,7 +486,7 @@ Parameters:
433486
- param (SDPparameters)
434487
the parameters for the SDP algorithm
435488
436-
- V (Array{Float64})
489+
- V (Array{Float64} or SharedArray{Float64})
437490
the Bellman Functions
438491
439492
- t (int)
@@ -507,7 +560,7 @@ Parameters:
507560
- X0 (SDPparameters)
508561
the initial state of the system
509562
510-
- V (Array)
563+
- Array{Float64} or SharedArray{Float64}
511564
the vector representing the value functions as functions of the state
512565
of the system at each time step
513566

0 commit comments

Comments
 (0)