diff options
author | 2019-04-07 13:46:36 +0200 | |
---|---|---|
committer | 2019-04-07 13:46:36 +0200 | |
commit | 3f9b1c92cc35fa4ed9672a2b8601f4c22af24921 (patch) | |
tree | 927c41492ff3b50b3d998a4fbe87861187d85912 /Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf | |
parent | Add reliability probability and mtff objectives (diff) | |
download | VIATRA-Generator-3f9b1c92cc35fa4ed9672a2b8601f4c22af24921.tar.gz VIATRA-Generator-3f9b1c92cc35fa4ed9672a2b8601f4c22af24921.tar.zst VIATRA-Generator-3f9b1c92cc35fa4ed9672a2b8601f4c22af24921.zip |
Infrastructure for objective functions
Diffstat (limited to 'Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf')
2 files changed, 4 insertions, 4 deletions
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend index 432651af..ceb78e99 100644 --- a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend | |||
@@ -57,7 +57,7 @@ class AlloySolver extends LogicReasoner{ | |||
57 | val result2 = handler.callSolver(alloyProblem,workspace,alloyConfig,alloyCode) | 57 | val result2 = handler.callSolver(alloyProblem,workspace,alloyConfig,alloyCode) |
58 | alloyConfig.progressMonitor.workedSearchFinished | 58 | alloyConfig.progressMonitor.workedSearchFinished |
59 | 59 | ||
60 | val logicResult = backwardMapper.transformOutput(problem,configuration.solutionScope.numberOfRequiredSolution,result2,forwardTrace,transformationTime) | 60 | val logicResult = backwardMapper.transformOutput(problem,configuration.solutionScope.numberOfRequiredSolutions,result2,forwardTrace,transformationTime) |
61 | alloyConfig.progressMonitor.workedBackwardTransformationFinished | 61 | alloyConfig.progressMonitor.workedBackwardTransformationFinished |
62 | //val solverFinish = System.currentTimeMillis-solverStart | 62 | //val solverFinish = System.currentTimeMillis-solverStart |
63 | // Finish: Solving Alloy problem | 63 | // Finish: Solving Alloy problem |
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend index ebbca624..033ced04 100644 --- a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend | |||
@@ -184,7 +184,7 @@ class AlloyCallerWithTimeout implements Callable<List<Pair<A4Solution,Long>>>{ | |||
184 | } else { | 184 | } else { |
185 | lastAnswer = lastAnswer.next | 185 | lastAnswer = lastAnswer.next |
186 | } | 186 | } |
187 | configuration.progressMonitor.workedBackwardTransformation(configuration.solutionScope.numberOfRequiredSolution) | 187 | configuration.progressMonitor.workedBackwardTransformation(configuration.solutionScope.numberOfRequiredSolutions) |
188 | 188 | ||
189 | val runtime = System.currentTimeMillis -startTime | 189 | val runtime = System.currentTimeMillis -startTime |
190 | synchronized(this) { | 190 | synchronized(this) { |
@@ -201,8 +201,8 @@ class AlloyCallerWithTimeout implements Callable<List<Pair<A4Solution,Long>>>{ | |||
201 | } | 201 | } |
202 | 202 | ||
203 | def hasEnoughSolution(List<?> answers) { | 203 | def hasEnoughSolution(List<?> answers) { |
204 | if(configuration.solutionScope.numberOfRequiredSolution < 0) return false | 204 | if(configuration.solutionScope.numberOfRequiredSolutions < 0) return false |
205 | else return answers.size() == configuration.solutionScope.numberOfRequiredSolution | 205 | else return answers.size() == configuration.solutionScope.numberOfRequiredSolutions |
206 | } | 206 | } |
207 | 207 | ||
208 | public def getPartialAnswers() { | 208 | public def getPartialAnswers() { |