diff options
author | 2017-06-10 19:01:08 +0200 | |
---|---|---|
committer | 2017-06-10 19:01:08 +0200 | |
commit | d4f03121e36bce42ce611e97ffee6e697162228e (patch) | |
tree | bcda6a5e8d0a9d9fdc1dc8620a816e7f429f5d9a /Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/VisualisePartialInterpretation.xtend | |
parent | Initial commit (diff) | |
download | VIATRA-Generator-d4f03121e36bce42ce611e97ffee6e697162228e.tar.gz VIATRA-Generator-d4f03121e36bce42ce611e97ffee6e697162228e.tar.zst VIATRA-Generator-d4f03121e36bce42ce611e97ffee6e697162228e.zip |
Initial commit, migrating from SVN
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/VisualisePartialInterpretation.xtend')
-rw-r--r-- | Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/VisualisePartialInterpretation.xtend | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/VisualisePartialInterpretation.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/VisualisePartialInterpretation.xtend new file mode 100644 index 00000000..472f79b6 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/VisualisePartialInterpretation.xtend | |||
@@ -0,0 +1,39 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml | ||
6 | import java.io.FileNotFoundException | ||
7 | |||
8 | class VisualisePartialInterpretation { | ||
9 | def static void main(String[] args) { | ||
10 | |||
11 | val runs = 1..10 | ||
12 | |||
13 | |||
14 | for(actualRun : runs) { | ||
15 | for(actualSize : RunMeasurements::sizes) { | ||
16 | val workspace = new FileSystemWorkspace('''output_r«actualRun»_«actualSize»/''',"") | ||
17 | //val ecore2GML = new Ecore2GML | ||
18 | val partialInterpretation2GML = new PartialInterpretation2Gml | ||
19 | RunMeasurements.init | ||
20 | var int i = 1 | ||
21 | var boolean fileExist = true | ||
22 | while(fileExist) { | ||
23 | try{ | ||
24 | val root = workspace.readModel(PartialInterpretation,'''solution«i».partialinterpretation''') | ||
25 | val gml = partialInterpretation2GML.transform(root) | ||
26 | //ecore2GML.transform(root) | ||
27 | workspace.writeText('''solutionVisualisation«i».gml''',gml) | ||
28 | println('''Solution «i» visualised''') | ||
29 | i++ | ||
30 | } catch(FileNotFoundException e) { | ||
31 | fileExist = false | ||
32 | } | ||
33 | } | ||
34 | |||
35 | println('''Visualisation of «i-1» models are finished''') | ||
36 | } | ||
37 | } | ||
38 | } | ||
39 | } \ No newline at end of file | ||