diff options
Diffstat (limited to 'Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/ISolutionFoundHandler.java')
-rw-r--r-- | Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/ISolutionFoundHandler.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/ISolutionFoundHandler.java b/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/ISolutionFoundHandler.java new file mode 100644 index 00000000..8d74e856 --- /dev/null +++ b/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/ISolutionFoundHandler.java | |||
@@ -0,0 +1,40 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2017, Andras Szabolcs Nagy and Daniel Varro | ||
3 | * This program and the accompanying materials are made available under the | ||
4 | * terms of the Eclipse Public License v. 2.0 which is available at | ||
5 | * http://www.eclipse.org/legal/epl-v20.html. | ||
6 | * | ||
7 | * SPDX-License-Identifier: EPL-2.0 | ||
8 | *******************************************************************************/ | ||
9 | package org.eclipse.viatra.dse.solutionstore; | ||
10 | |||
11 | import org.eclipse.viatra.dse.api.SolutionTrajectory; | ||
12 | import org.eclipse.viatra.dse.api.strategy.interfaces.IStrategy; | ||
13 | import org.eclipse.viatra.dse.base.ThreadContext; | ||
14 | import org.eclipse.viatra.dse.solutionstore.SolutionStore.ISolutionSaver; | ||
15 | |||
16 | /** | ||
17 | * Contains callback methods which are called when a solution is found by the exploration {@link IStrategy}. | ||
18 | * | ||
19 | * @author Andras Szabolcs Nagy | ||
20 | * | ||
21 | */ | ||
22 | public interface ISolutionFoundHandler { | ||
23 | |||
24 | /** | ||
25 | * Called when a solution is saved by the {@link ISolutionSaver}. Later, this solution can be omitted from the final | ||
26 | * set of solutions. | ||
27 | * | ||
28 | * @param context | ||
29 | * @param trajectory | ||
30 | */ | ||
31 | void solutionFound(ThreadContext context, SolutionTrajectory trajectory); | ||
32 | |||
33 | /** | ||
34 | * Called when the exploration found a solution but it was not saved because of certain conditions. | ||
35 | * | ||
36 | * @param context | ||
37 | * @param trajectory | ||
38 | */ | ||
39 | void solutionTriedToSave(ThreadContext context, SolutionTrajectory trajectory); | ||
40 | } \ No newline at end of file | ||