Skip to content
Snippets Groups Projects
Commit 7b483225 authored by Nikolaus Huber's avatar Nikolaus Huber
Browse files

git-svn-id: https://se1.informatik.uni-wuerzburg.de/usvn/svn/code/code/DMM/trunk@12008 9e42b895-fcda-4063-8a3b-11be15eb1bbd
parent 845e80b4
No related branches found
No related tags found
No related merge requests found
...@@ -178,8 +178,8 @@ public class AdaptationControl { ...@@ -178,8 +178,8 @@ public class AdaptationControl {
*/ */
public void processResults(WeightedTactic tactic) { public void processResults(WeightedTactic tactic) {
// Impact latestImpact = perfdatarepo.getImpactAt(iteration); // Impact latestImpact = perfdatarepo.getImpactAt(iteration);
String expName = ObservationRepositoryHelper.deriveExperimentName(tactic); String expName = ObservationRepositoryHelper.deriveExperimentName(tactic, iteration + 1);
Impact latestImpact = PerfDataRepoConverter.convertObservableImpact(ObservationRepositoryHelper Impact latestImpact = PerfDataRepoConverter.convertObservableImpact(ObservationRepositoryHelper
.searchImpactOfTactic(expName, performanceDataRepoXmiFilePath)); .searchImpactOfTactic(expName, performanceDataRepoXmiFilePath));
// Connect parsed results to the executed tactic // Connect parsed results to the executed tactic
...@@ -207,7 +207,7 @@ public class AdaptationControl { ...@@ -207,7 +207,7 @@ public class AdaptationControl {
} }
/** /**
* Graceful stop the adaptation process. * Gracefully stop the adaptation process.
*/ */
public void stop() { public void stop() {
logger.info("Stopping adaptation process"); logger.info("Stopping adaptation process");
......
...@@ -43,6 +43,9 @@ public class ObservationRepositoryHelper { ...@@ -43,6 +43,9 @@ public class ObservationRepositoryHelper {
} }
private static ObservableImpact deriveImpact(Observation o, ObservationRepository repo) { private static ObservableImpact deriveImpact(Observation o, ObservationRepository repo) {
if (o == null || repo == null)
return null;
List<ObservableImpact> impacts = repo.getImpacts(); List<ObservableImpact> impacts = repo.getImpacts();
for (ObservableImpact oi : impacts) { for (ObservableImpact oi : impacts) {
if (EcoreUtil.equals(oi.getAfter(), o)) if (EcoreUtil.equals(oi.getAfter(), o))
...@@ -59,6 +62,9 @@ public class ObservationRepositoryHelper { ...@@ -59,6 +62,9 @@ public class ObservationRepositoryHelper {
* @return first result that ends the given suffix, null otherwise. * @return first result that ends the given suffix, null otherwise.
*/ */
public static Observation getResultEndingWith(String suffix, ObservationRepository repo) { public static Observation getResultEndingWith(String suffix, ObservationRepository repo) {
if (suffix == null || repo == null)
return null;
List<Observation> results = repo.getObservations(); List<Observation> results = repo.getObservations();
for (Observation o : results) { for (Observation o : results) {
if (o.getIdentifier().endsWith(suffix)) if (o.getIdentifier().endsWith(suffix))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment