diff options
author | 2017-08-27 18:20:21 +0200 | |
---|---|---|
committer | 2017-08-27 18:20:21 +0200 | |
commit | c51059a17bfb9c36d5473a30e66de4e50e1e79b0 (patch) | |
tree | f964b633224e071f2e908cceb593ff8a33cc4c4f /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage | |
parent | outgoing dangling edges from a selected part of a partial model are (diff) | |
download | VIATRA-Generator-c51059a17bfb9c36d5473a30e66de4e50e1e79b0.tar.gz VIATRA-Generator-c51059a17bfb9c36d5473a30e66de4e50e1e79b0.tar.zst VIATRA-Generator-c51059a17bfb9c36d5473a30e66de4e50e1e79b0.zip |
Simple visualiser that prints the size of the intermediate solution.
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage')
1 files changed, 34 insertions, 0 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretationSizePrinter.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretationSizePrinter.xtend new file mode 100644 index 00000000..b9ea3df3 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretationSizePrinter.xtend | |||
@@ -0,0 +1,34 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
4 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | ||
5 | |||
6 | class PartialInterpretationSizePrinter implements PartialInterpretationVisualiser { | ||
7 | long startTime | ||
8 | |||
9 | public new() { | ||
10 | startTime = System.currentTimeMillis | ||
11 | } | ||
12 | |||
13 | override visualiseConcretization(PartialInterpretation partialInterpretation) { | ||
14 | return new PartialInterpretationSizePrinterAction(partialInterpretation.newElements.size,System.currentTimeMillis-startTime) | ||
15 | } | ||
16 | |||
17 | override visualisePartialSolution(PartialInterpretation partialInterpretation) { | ||
18 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
19 | } | ||
20 | |||
21 | } | ||
22 | class PartialInterpretationSizePrinterAction implements PartialInterpretationVisualisation { | ||
23 | val int size | ||
24 | long millis | ||
25 | |||
26 | public new(int size, long millis) { | ||
27 | this.size = size | ||
28 | this.millis = millis | ||
29 | } | ||
30 | |||
31 | override writeToFile(ReasonerWorkspace workspace, String name) { | ||
32 | println("Size="+size+", Time="+millis/1000+"s") | ||
33 | } | ||
34 | } \ No newline at end of file | ||