Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
EMAM2Middleware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Middleware
Commits
22170bd4
Commit
22170bd4
authored
Mar 13, 2019
by
Philipp Görick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add montecarloVisualisation script
parent
1c483936
Pipeline
#111224
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
4 deletions
+85
-4
src/test/resources/evaluationVisualisation.py
src/test/resources/evaluationVisualisation.py
+4
-4
src/test/resources/montecarlovisualisation.py
src/test/resources/montecarlovisualisation.py
+81
-0
No files found.
src/test/resources/evaluationVisualisation.py
View file @
22170bd4
...
...
@@ -16,16 +16,16 @@ parser.add_argument('daimler', metavar='daimler',
args
=
parser
.
parse_args
()
#'D:\\Software\\Praktikum\\EMAM2Middleware\\target\\evaluation\\autopilot\\emam\\clusteringResults.json'
with
open
(
args
.
autopilot
)
as
data_file
:
autopilot_data
=
json
.
load
(
data_file
)
#'D:\\Software\\Praktikum\\EMAM2Middleware\\target\\evaluation\\pacman\\emam\\clusteringResults.json'
with
open
(
args
.
pacman
)
as
data_file
:
pacman_data
=
json
.
load
(
data_file
)
#'D:\\Software\\Praktikum\\EMAM2Middleware\\target\\evaluation\\supermario\\emam\\clusteringResults.json'
with
open
(
args
.
supermario
)
as
data_file
:
supermario_data
=
json
.
load
(
data_file
)
#'D:\\Software\\Praktikum\\clusteringResults.json'
with
open
(
args
.
daimler
)
as
data_file
:
daimler_data
=
json
.
load
(
data_file
)
...
...
src/test/resources/montecarlovisualisation.py
0 → 100644
View file @
22170bd4
import
json
import
numpy
as
np
import
matplotlib.pyplot
as
plt
import
argparse
import
math
parser
=
argparse
.
ArgumentParser
(
description
=
'Get json files'
)
parser
.
add_argument
(
'autopilot'
,
metavar
=
'autopilot'
,
help
=
'montecarloresult json location of autopilot'
)
parser
.
add_argument
(
'pacman'
,
metavar
=
'pacman'
,
help
=
'montecarloresult json location of pacman'
)
parser
.
add_argument
(
'supermario'
,
metavar
=
'supermario'
,
help
=
'montecarloresult json location of supermario'
)
parser
.
add_argument
(
'daimler'
,
metavar
=
'daimler'
,
help
=
'montecarloresult json location of daimlermodel'
)
args
=
parser
.
parse_args
()
with
open
(
args
.
autopilot
)
as
data_file
:
autopilot_data
=
json
.
load
(
data_file
)
with
open
(
args
.
pacman
)
as
data_file
:
pacman_data
=
json
.
load
(
data_file
)
with
open
(
args
.
supermario
)
as
data_file
:
supermario_data
=
json
.
load
(
data_file
)
with
open
(
args
.
daimler
)
as
data_file
:
daimler_data
=
json
.
load
(
data_file
)
autopilot_montecarlodata
=
[]
pacman_montecarlodata
=
[]
supermario_montecarlodata
=
[]
i
=
1
while
i
<
1001
:
autopilot_montecarlodata
.
append
(
autopilot_data
[
0
][
"MCResult("
+
str
(
i
)
+
")"
])
pacman_montecarlodata
.
append
(
pacman_data
[
0
][
"MCResult("
+
str
(
i
)
+
")"
])
supermario_montecarlodata
.
append
(
supermario_data
[
0
][
"MCResult("
+
str
(
i
)
+
")"
])
i
=
i
+
1
daimler_montecarlodata
=
[]
i
=
1
while
i
<
101
:
daimler_montecarlodata
.
append
(
daimler_data
[
0
][
"MCResult("
+
str
(
i
)
+
")"
])
i
=
i
+
1
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
()
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
()
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
()
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
()
plt
.
show
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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