Skip to content

Commit f7b7c79

Browse files
committed
fix: usage of Executor in ConsistencyChecker
1 parent 502a61d commit f7b7c79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

com.siemens.jminizinc.diag/src/main/java/at/siemens/ct/jmz/diag/ConsistencyChecker.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright Siemens AG, 2016-2017
2+
* Copyright Siemens AG, 2016-2019
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
55
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -22,7 +22,7 @@
2222
import at.siemens.ct.jmz.writer.ModelWriter;
2323

2424
/**
25-
* @author Copyright Siemens AG, 2016-2017
25+
* @author Copyright Siemens AG, 2016-2019
2626
*/
2727
public class ConsistencyChecker {
2828

@@ -36,7 +36,7 @@ private void initialization() {
3636
modelBuilder = new ModelBuilder();
3737
modelWriter = new ModelWriter(modelBuilder);
3838
modelWriter.setSolvingStrategy(SolvingStrategy.SOLVE_SATISFY);
39-
executor = new PipedMiniZincExecutor("consistencyChecker", modelWriter);
39+
executor = new PipedMiniZincExecutor("consistencyChecker");
4040
}
4141

4242
public boolean isConsistent(Collection<? extends Element> fixedElements) throws DiagnosisException {
@@ -86,7 +86,7 @@ private boolean isSolverResultConsistent(String result) {
8686

8787
private String callExecutor() throws DiagnosisException {
8888
try {
89-
executor.startProcess();
89+
executor.startProcess(modelWriter);
9090
executor.waitForSolution();
9191
} catch (IOException e) {
9292
throw new DiagnosisException("Solver could not be started", e);

0 commit comments

Comments
 (0)