Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Middleware
Commits
9c12e3a1
Commit
9c12e3a1
authored
Mar 13, 2019
by
Philipp Görick
Browse files
Added min and max values of montecarlo to visualisation
parent
5f034183
Pipeline
#111326
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/test/resources/montecarlovisualisation.py
View file @
9c12e3a1
...
...
@@ -45,37 +45,63 @@ while i < 101:
daimler_montecarlodata
.
append
(
daimler_data
[
0
][
"MCResult("
+
str
(
i
)
+
")"
])
i
=
i
+
1
autopilot_minmax
=
(
autopilot_data
[
0
][
"MaxValueMC"
],
autopilot_data
[
0
][
"MinValueMC"
])
pacman_minmax
=
(
pacman_data
[
0
][
"MaxValueMC"
],
pacman_data
[
0
][
"MinValueMC"
])
supermario_minmax
=
(
supermario_data
[
0
][
"MaxValueMC"
],
supermario_data
[
0
][
"MinValueMC"
])
daimler_minmax
=
(
daimler_data
[
0
][
"MaxValueMC"
],
daimler_data
[
0
][
"MinValueMC"
])
t
=
np
.
arange
(
1
,
1001
,
1
)
fig
,
ax
=
plt
.
subplots
()
ax
.
plot
(
t
,
autopilot_montecarlodata
)
ax
.
set
(
xlabel
=
'Iterations'
,
ylabel
=
'Score'
,
title
=
'Montecarlo Clustering of Autopilotmodel with 3 Clusters'
)
ax
.
grid
()
textstr
=
'
\n
'
.
join
((
"MaxValueMC = "
+
str
(
autopilot_minmax
[
1
]),
"MinValueMC = "
+
str
(
autopilot_minmax
[
0
])))
props
=
dict
(
boxstyle
=
'round'
,
facecolor
=
'wheat'
,
alpha
=
0.5
)
ax
.
text
(
0.95
,
0.05
,
textstr
,
transform
=
ax
.
transAxes
,
fontsize
=
14
,
verticalalignment
=
'bottom'
,
ha
=
'right'
,
bbox
=
props
)
plt
.
show
()
fig
,
ax
=
plt
.
subplots
()
ax
.
plot
(
t
,
pacman_montecarlodata
)
ax
.
set
(
xlabel
=
'Iterations'
,
ylabel
=
'Score'
,
title
=
'Montecarlo Clustering of Pacmanmodel with 3 Clusters'
)
ax
.
grid
()
textstr
=
'
\n
'
.
join
((
"MaxValueMC = "
+
str
(
pacman_minmax
[
1
]),
"MinValueMC = "
+
str
(
pacman_minmax
[
0
])))
props
=
dict
(
boxstyle
=
'round'
,
facecolor
=
'wheat'
,
alpha
=
0.5
)
ax
.
text
(
0.95
,
0.05
,
textstr
,
transform
=
ax
.
transAxes
,
fontsize
=
14
,
verticalalignment
=
'bottom'
,
ha
=
'right'
,
bbox
=
props
)
plt
.
show
()
fig
,
ax
=
plt
.
subplots
()
ax
.
plot
(
t
,
supermario_montecarlodata
)
ax
.
set
(
xlabel
=
'Iterations'
,
ylabel
=
'Score'
,
title
=
'Montecarlo Clustering of Supermariomodel with 3 Clusters'
)
ax
.
grid
()
textstr
=
'
\n
'
.
join
((
"MaxValueMC = "
+
str
(
supermario_minmax
[
1
]),
"MinValueMC = "
+
str
(
supermario_minmax
[
0
])))
props
=
dict
(
boxstyle
=
'round'
,
facecolor
=
'wheat'
,
alpha
=
0.5
)
ax
.
text
(
0.95
,
0.05
,
textstr
,
transform
=
ax
.
transAxes
,
fontsize
=
14
,
verticalalignment
=
'bottom'
,
ha
=
'right'
,
bbox
=
props
)
plt
.
show
()
t
=
np
.
arange
(
0
,
100
,
1
)
fig
,
ax
=
plt
.
subplots
()
ax
.
plot
(
t
,
daimler_montecarlodata
)
ax
.
set
(
xlabel
=
'Iterations'
,
ylabel
=
'Score'
,
title
=
'Montecarlo Clustering of Daimlermodel'
)
ax
.
grid
()
textstr
=
'
\n
'
.
join
((
"MaxValueMC = "
+
str
(
daimler_minmax
[
1
]),
"MinValueMC = "
+
str
(
daimler_minmax
[
0
])))
props
=
dict
(
boxstyle
=
'round'
,
facecolor
=
'wheat'
,
alpha
=
0.5
)
ax
.
text
(
0.95
,
0.05
,
textstr
,
transform
=
ax
.
transAxes
,
fontsize
=
14
,
verticalalignment
=
'bottom'
,
ha
=
'right'
,
bbox
=
props
)
plt
.
show
()
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment