Skip to content

Commit 23c85e5

Browse files
committed
[DOC] Comment display.jl
1 parent fd47800 commit 23c85e5

File tree

1 file changed

+50
-3
lines changed

1 file changed

+50
-3
lines changed

examples/display.jl

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
# WARNING: Matplotlib and PyCall must be installed!
1010
using PyPlot
1111

12+
"""
13+
Display evolution of stocks.
14+
15+
Parameters:
16+
- model (SPModel)
17+
18+
- stocks (Array{Float64, 3})
19+
20+
"""
1221
function display_stocks(model, stocks)
1322

1423
ndims = size(stocks)[3]
@@ -26,6 +35,15 @@ function display_stocks(model, stocks)
2635
end
2736

2837

38+
"""
39+
Display evolution of controls.
40+
41+
Parameters:
42+
- model (SPModel)
43+
44+
- controls (Array{Float64, 3})
45+
46+
"""
2947
function display_controls(model, controls)
3048

3149
ndims = size(controls)[3]
@@ -43,6 +61,13 @@ function display_controls(model, controls)
4361
end
4462

4563

64+
"""
65+
Display costs distribution along scenarios.
66+
67+
Parameters:
68+
- costs (Vector{Float64})
69+
70+
"""
4671
function display_costs_distribution(costs)
4772
figure()
4873
boxplot(costs, boxprops=Dict(:linewidth=>3, :color=>"k"))
@@ -51,6 +76,13 @@ function display_costs_distribution(costs)
5176
end
5277

5378

79+
"""
80+
Display distributions of aleas along time.
81+
82+
Parameters:
83+
- aleas (Array{Float64, 3})
84+
85+
"""
5486
function display_aleas(aleas)
5587
ndims = size(aleas)[3]
5688
nsteps = size(aleas)[1]
@@ -69,6 +101,13 @@ function display_aleas(aleas)
69101
end
70102

71103

104+
"""
105+
Display evolution of execution time along SDDP iterations.
106+
107+
Parameters:
108+
- exectime (Vector{Float64})
109+
110+
"""
72111
function display_execution_time(exectime)
73112
nit = size(exectime)[1]
74113

@@ -81,6 +120,13 @@ function display_execution_time(exectime)
81120
end
82121

83122

123+
"""
124+
Display evolution of upper and lower bounds along SDDP iterations.
125+
126+
Parameters:
127+
- model (SPModel)
128+
129+
"""
84130
function display_bounds(model)
85131
nit = size(model.upperbounds)[1]
86132

@@ -94,10 +140,11 @@ function display_bounds(model)
94140
end
95141

96142

97-
function display_all(model, costs, stocks, controls, aleas)
143+
"""
144+
Display results of SDDP simulation.
98145
99-
#= display_bounds(model) =#
100-
#= display_execution_time(model.texec) =#
146+
"""
147+
function display_all(model, costs, stocks, controls, aleas)
101148
display_aleas(aleas)
102149
display_controls(model, controls)
103150
display_stocks(model, stocks)

0 commit comments

Comments
 (0)