aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/ISolutionFoundHandler.java
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <marussy@mit.bme.hu>2020-06-30 18:03:48 +0200
committerLibravatar Kristóf Marussy <marussy@mit.bme.hu>2020-06-30 18:03:48 +0200
commite11bce7ad3e803e80883499fec0ad6e4540ffe43 (patch)
treeca3ad9d5b9137e9455485e43350a4a353f487f22 /Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/ISolutionFoundHandler.java
parentDisable unrepairable match scoping for now (diff)
downloadVIATRA-Generator-e11bce7ad3e803e80883499fec0ad6e4540ffe43.tar.gz
VIATRA-Generator-e11bce7ad3e803e80883499fec0ad6e4540ffe43.tar.zst
VIATRA-Generator-e11bce7ad3e803e80883499fec0ad6e4540ffe43.zip
Add modified VIATRA-DSE version
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.java40
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 *******************************************************************************/
9package org.eclipse.viatra.dse.solutionstore;
10
11import org.eclipse.viatra.dse.api.SolutionTrajectory;
12import org.eclipse.viatra.dse.api.strategy.interfaces.IStrategy;
13import org.eclipse.viatra.dse.base.ThreadContext;
14import 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 */
22public 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