From e11bce7ad3e803e80883499fec0ad6e4540ffe43 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 30 Jun 2020 18:03:48 +0200 Subject: Add modified VIATRA-DSE version --- .../dse/solutionstore/ISolutionFoundHandler.java | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/ISolutionFoundHandler.java (limited to 'Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/ISolutionFoundHandler.java') 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 @@ +/******************************************************************************* + * Copyright (c) 2010-2017, Andras Szabolcs Nagy and Daniel Varro + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-v20.html. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.viatra.dse.solutionstore; + +import org.eclipse.viatra.dse.api.SolutionTrajectory; +import org.eclipse.viatra.dse.api.strategy.interfaces.IStrategy; +import org.eclipse.viatra.dse.base.ThreadContext; +import org.eclipse.viatra.dse.solutionstore.SolutionStore.ISolutionSaver; + +/** + * Contains callback methods which are called when a solution is found by the exploration {@link IStrategy}. + * + * @author Andras Szabolcs Nagy + * + */ +public interface ISolutionFoundHandler { + + /** + * Called when a solution is saved by the {@link ISolutionSaver}. Later, this solution can be omitted from the final + * set of solutions. + * + * @param context + * @param trajectory + */ + void solutionFound(ThreadContext context, SolutionTrajectory trajectory); + + /** + * Called when the exploration found a solution but it was not saved because of certain conditions. + * + * @param context + * @param trajectory + */ + void solutionTriedToSave(ThreadContext context, SolutionTrajectory trajectory); +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf