From 9b011e155bb675c4aeeafd9aefd7177c25fe9f18 Mon Sep 17 00:00:00 2001
From: Alexander Diewald <diewald@fortiss.org>
Date: Fri, 24 Nov 2017 16:20:52 +0000
Subject: [PATCH] Exploration.alg: Remove outdated Exploration model node. refs
 3190

---
 .../trunk/model/moea.ecore                    |  11 -
 .../trunk/model/moea.genmodel                 |   3 -
 .../alg/prototypes/PrototypeProvider.java     |  64 ----
 ...gnSpaceExplorationModelElementFactory.java |  20 --
 .../migration/ExpTargetMigrator.java          | 309 ------------------
 5 files changed, 407 deletions(-)
 delete mode 100644 org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/prototypes/PrototypeProvider.java
 delete mode 100644 org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/migration/ExpTargetMigrator.java

diff --git a/org.fortiss.af3.exploration.alg/trunk/model/moea.ecore b/org.fortiss.af3.exploration.alg/trunk/model/moea.ecore
index fdbf9644..5dc4aa57 100644
--- a/org.fortiss.af3.exploration.alg/trunk/model/moea.ecore
+++ b/org.fortiss.af3.exploration.alg/trunk/model/moea.ecore
@@ -1,17 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http://www.fortiss.org/af3/exploration/moea" nsPrefix="org-fortiss-af3-exploration-moea">
-  <eClassifiers xsi:type="ecore:EClass" name="ExplorationManager" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//IProjectRootElement">
-    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
-      <details key="documentation" value="Model equivalent for the GUI editor to allow the definition of {@link DseSpecification}s."/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="dseSpecifications" upperBound="-1"
-        eType="#//DseSpecification" containment="true">
-      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
-        <details key="documentation" value="List of {@link DseSpecification}s defined via {@code this} {@link ExplorationManager}. There exists only one {@link ExplorationManager} per AF3 project."/>
-      </eAnnotations>
-    </eStructuralFeatures>
-  </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="DseSpecification" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//INamedCommentedElement">
     <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
       <details key="documentation" value="Contains the selected {@link IOptimizer}, the {@link SystemParameter}s, and the {@link ExplorationSpecification} that define a particular DSE problemn."/>
diff --git a/org.fortiss.af3.exploration.alg/trunk/model/moea.genmodel b/org.fortiss.af3.exploration.alg/trunk/model/moea.genmodel
index 7b69193a..4a3fc5d1 100644
--- a/org.fortiss.af3.exploration.alg/trunk/model/moea.genmodel
+++ b/org.fortiss.af3.exploration.alg/trunk/model/moea.genmodel
@@ -13,9 +13,6 @@
     <genEnums typeSafeEnumCompatible="false" ecoreEnum="moea.ecore#//VoterType_t">
       <genEnumLiterals ecoreEnumLiteral="moea.ecore#//VoterType_t/MajorityVoter"/>
     </genEnums>
-    <genClasses ecoreClass="moea.ecore#//ExplorationManager">
-      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference moea.ecore#//ExplorationManager/dseSpecifications"/>
-    </genClasses>
     <genClasses ecoreClass="moea.ecore#//DseSpecification">
       <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference moea.ecore#//DseSpecification/features"/>
       <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference moea.ecore#//DseSpecification/optimizer"/>
diff --git a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/prototypes/PrototypeProvider.java b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/prototypes/PrototypeProvider.java
deleted file mode 100644
index 536c48d8..00000000
--- a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/prototypes/PrototypeProvider.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*--------------------------------------------------------------------------+
-$Id$
-|                                                                          |
-| Copyright 2014 ForTISS GmbH                     |
-|                                                                          |
-| Licensed under the Apache License, Version 2.0 (the "License");          |
-| you may not use this file except in compliance with the License.         |
-| You may obtain a copy of the License at                                  |
-|                                                                          |
-|    http://www.apache.org/licenses/LICENSE-2.0                            |
-|                                                                          |
-| Unless required by applicable law or agreed to in writing, software      |
-| distributed under the License is distributed on an "AS IS" BASIS,        |
-| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
-| See the License for the specific language governing permissions and      |
-| limitations under the License.                                           |
-+--------------------------------------------------------------------------*/
-package org.fortiss.af3.exploration.alg.prototypes;
-
-import static org.fortiss.af3.exploration.alg.util.DesignSpaceExplorationModelElementFactory.createDseSpecification;
-import static org.fortiss.af3.exploration.alg.util.DesignSpaceExplorationModelElementFactory.createExplorationManager;
-
-import org.fortiss.af3.exploration.moea.model.DseSpecification;
-import org.fortiss.af3.exploration.moea.model.ExplorationManager;
-import org.fortiss.tooling.kernel.extension.base.PrototypeProviderBase;
-
-/**
- * Prototype provider for design space exploration object.
- * 
- * @author diewald
- * @author $Author$
- * @version $Rev$
- * @ConQAT.Rating RED Hash: 8055A580C651768C5276701935502CED
- */
-public class PrototypeProvider extends PrototypeProviderBase {
-
-	/** Stores the category to display for these prototypes. */
-	protected final static String CATEGORY_NAME = "Design Space Exploration";
-
-	/** {@inheritDoc} */
-	@Override
-	protected void registerPrototypes() {
-		setupExplorationManagerPrototypes();
-		setupDseSpecificationPrototypes();
-	}
-
-	/**
-	 * Defines prototypes for {@link ExplorationManager}s which are used to manage DSE
-	 * models.
-	 */
-	private void setupExplorationManagerPrototypes() {
-		registerPrimaryPrototype("Design Space Exploration",
-				createExplorationManager("Design Space Exploration"), CATEGORY_NAME);
-	}
-
-	/**
-	 * Defines prototypes for {@link DseSpecification}s which are used to create and configure
-	 * DSE models.
-	 */
-	private void setupDseSpecificationPrototypes() {
-		registerPrimaryPrototype("DSE Specification", createDseSpecification("DSE Specification"),
-				CATEGORY_NAME);
-	}
-}
diff --git a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/util/DesignSpaceExplorationModelElementFactory.java b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/util/DesignSpaceExplorationModelElementFactory.java
index a8659338..944c216f 100644
--- a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/util/DesignSpaceExplorationModelElementFactory.java
+++ b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/util/DesignSpaceExplorationModelElementFactory.java
@@ -37,7 +37,6 @@ import org.fortiss.af3.exploration.model.ExplorationSpecification;
 import org.fortiss.af3.exploration.model.solutions.SingleExplorationSolutionMap;
 import org.fortiss.af3.exploration.model.solutions.SolutionsFactory;
 import org.fortiss.af3.exploration.moea.model.DseSpecification;
-import org.fortiss.af3.exploration.moea.model.ExplorationManager;
 import org.fortiss.af3.exploration.moea.model.MoeaFactory;
 import org.fortiss.af3.exploration.moea.model.parameters.EAOptimizer;
 import org.fortiss.af3.exploration.moea.model.parameters.ExecutionModel;
@@ -65,14 +64,6 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
  */
 public class DesignSpaceExplorationModelElementFactory {
 
-	/** Creates a ExplorationManager specification. */
-	public static ExplorationManager createExplorationManager(String name) {
-		ExplorationManager manager = MoeaFactory.eINSTANCE.createExplorationManager();
-		manager.setName(name);
-
-		return manager;
-	}
-
 	/** Creates an instance of a {@link DseSpecification} with default parameters. */
 	public static DseSpecification createDseSpecification(String name) {
 		DseSpecification dse = MoeaFactory.eINSTANCE.createDseSpecification();
@@ -80,17 +71,6 @@ public class DesignSpaceExplorationModelElementFactory {
 		return dse;
 	}
 
-	/** Creates an instance of a {@link DseSpecification} with default parameters. */
-	public static DseSpecification
-			addDefaultDesignSpaceExploration(ExplorationManager explManager) {
-		ITopLevelElement modelContext =
-				IPersistencyService.getInstance().getTopLevelElementFor(explManager);
-		DseSpecification dse = createDefaultDesignSpaceExploration();
-		prepareUniqueID(dse, explManager);
-		modelContext.runAsCommand(() -> explManager.getDseSpecifications().add(dse));
-		return dse;
-	}
-
 	/** Creates a DseSpecification referencing the given {@link ExplorationSpecification}. */
 	public static DseSpecification
 			createDefaultDesignSpaceExploration(ExplorationSpecification expSpec) {
diff --git a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/migration/ExpTargetMigrator.java b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/migration/ExpTargetMigrator.java
deleted file mode 100644
index b6d815e5..00000000
--- a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/migration/ExpTargetMigrator.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*--------------------------------------------------------------------------+
-$Id$
-|                                                                          |
-| Copyright 2016 ForTISS GmbH                     |
-|                                                                          |
-| Licensed under the Apache License, Version 2.0 (the "License");          |
-| you may not use this file except in compliance with the License.         |
-| You may obtain a copy of the License at                                  |
-|                                                                          |
-|    http://www.apache.org/licenses/LICENSE-2.0                            |
-|                                                                          |
-| Unless required by applicable law or agreed to in writing, software      |
-| distributed under the License is distributed on an "AS IS" BASIS,        |
-| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
-| See the License for the specific language governing permissions and      |
-| limitations under the License.                                           |
-+--------------------------------------------------------------------------*/
-package org.fortiss.af3.exploration.migration;
-
-import static org.fortiss.af3.exploration.alg.util.DesignSpaceExplorationModelElementFactory.createComponentMultiAllocationConstraint;
-import static org.fortiss.af3.exploration.alg.util.DesignSpaceExplorationModelElementFactory.createComponentMultiDislocationConstraint;
-import static org.fortiss.af3.exploration.alg.util.DesignSpaceExplorationModelElementFactory.createEnergyMinObjective;
-import static org.fortiss.af3.exploration.alg.util.DesignSpaceExplorationModelElementFactory.createFailureMinObjective;
-import static org.fortiss.af3.exploration.util.CommonExplorationTagetModelElementFactory.createComponentAllocationConstraint;
-import static org.fortiss.af3.exploration.util.CommonExplorationTagetModelElementFactory.createComponentDislocationConstraint;
-import static org.fortiss.af3.project.utils.ProjectUtils.getFileProject;
-import static org.fortiss.tooling.base.utils.MigrationUtils.migrateINamedCommentedElement;
-import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
-import static org.fortiss.tooling.kernel.utils.EcoreUtils.getFirstChildWithType;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.xml.type.AnyType;
-import org.fortiss.af3.component.model.Component;
-import org.fortiss.af3.exploration.model.DesignSpaceExploration;
-import org.fortiss.af3.exploration.model.ExcludeDeploymentConstraint;
-import org.fortiss.af3.exploration.model.ExplorationSpecification;
-import org.fortiss.af3.exploration.model.ExplorationTarget;
-import org.fortiss.af3.exploration.model.FixedDeploymentConstraint;
-import org.fortiss.af3.exploration.model.location.ComponentAllocationConstraint;
-import org.fortiss.af3.exploration.model.location.ComponentDislocationConstraint;
-import org.fortiss.af3.exploration.model.time.DeadlineConstraint;
-import org.fortiss.af3.exploration.model.time.TimeFactory;
-import org.fortiss.af3.exploration.moea.model.DseSpecification;
-import org.fortiss.af3.exploration.moea.model.ExplorationManager;
-import org.fortiss.af3.exploration.moea.model.MoeaFactory;
-import org.fortiss.af3.exploration.moea.model.parameters.EAOptimizer;
-import org.fortiss.af3.exploration.moea.model.parameters.ExecutionModel;
-import org.fortiss.af3.exploration.moea.model.parameters.ParametersFactory;
-import org.fortiss.af3.exploration.moea.model.parameters.SystemParameters;
-import org.fortiss.af3.exploration.moea.model.predefined.ComponentMultiAllocationConstraint;
-import org.fortiss.af3.exploration.moea.model.predefined.ComponentMultiDislocationConstraint;
-import org.fortiss.af3.exploration.moea.model.predefined.EnergyMinObjective;
-import org.fortiss.af3.exploration.moea.model.predefined.FailureMinObjective;
-import org.fortiss.af3.exploration.moea.model.predefined.PredefinedFactory;
-import org.fortiss.af3.exploration.moea.model.predefined.SafetyIntegrityLevelConstraint;
-import org.fortiss.af3.platform.model.ExecutionUnit;
-import org.fortiss.af3.project.model.FileProject;
-import org.fortiss.tooling.kernel.extension.IMigrationProvider;
-import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
-import org.fortiss.tooling.kernel.model.IProjectRootElement;
-
-/**
- * {@link IMigrationProvider} to separate the existing concrete {@link ExplorationTarget}s from the
- * exploration.ecore that shall only contain the meta-model framework in future.
- * 
- * @author diewald
- * @author $Author$
- * @version $Rev$
- * @ConQAT.Rating RED Hash: 76556D04D68B79E5DCFDE86E2F2B100B
- */
-@SuppressWarnings("deprecation")
-public class ExpTargetMigrator implements IMigrationProvider {
-
-	/** {@inheritDoc} */
-	@Override
-	public boolean needMigration(ITopLevelElement modelElement,
-			Map<EObject, AnyType> unknownFeatures) {
-		EObject rootModelElement = modelElement.getRootModelElement();
-		if(rootModelElement instanceof FileProject) {
-			EList<IProjectRootElement> topLvlElements =
-					((FileProject)rootModelElement).getRootElements();
-			for(IProjectRootElement currPrjRootElement : topLvlElements) {
-				if(currPrjRootElement instanceof org.fortiss.af3.exploration.model.ExplorationManager) {
-					return true;
-				}
-			}
-		}
-		return false;
-	}
-
-	/** {@inheritDoc} */
-	@Override
-	public void migrate(ITopLevelElement modelElement, Map<EObject, AnyType> unknownFeatures) {
-		org.fortiss.af3.exploration.model.ExplorationManager oldManager =
-				getFirstChildWithType(modelElement.getRootModelElement(),
-						org.fortiss.af3.exploration.model.ExplorationManager.class);
-
-		// Migrate the contained DesignSpaceExploration models.
-		EList<DesignSpaceExploration> oldDesignSpaceExploration = oldManager.getDseModel();
-		EList<DseSpecification> newDseSpecificationList = new BasicEList<>();
-		for(DesignSpaceExploration currentDSE : oldDesignSpaceExploration) {
-			DseSpecification newDseSpecification = migrateDesignSpaceExploration(currentDSE);
-			// EList<ExplorationTarget<?>> newTargetList =
-			// newDseSpecification.getTargetSpecification().getTargets();
-			// Migrate the ExplorationSpecification.
-			EList<ExplorationTarget<?>> targetList =
-					currentDSE.getTargetSpecification().getTargets();
-			Collection<ExplorationTarget<?>> additionList = new ArrayList<>();
-			Collection<ExplorationTarget<?>> removalList = new ArrayList<>();
-			for(ExplorationTarget<?> currTarget : targetList) {
-				ExplorationTarget<?> newTarget = null;
-				// Constraint-specific migration methods.
-				// NOTE: Period constraints are not migrated, no information is contained in them
-				// that is worth preserving, they are deduced from a timing model.
-				if(currTarget instanceof org.fortiss.af3.exploration.model.EnergyMinObjective) {
-					newTarget = migrateEnergyMin(
-							(org.fortiss.af3.exploration.model.EnergyMinObjective)currTarget);
-				} else if(currTarget instanceof org.fortiss.af3.exploration.model.FailureMinObjective) {
-					newTarget = migrateFailureMin(
-							(org.fortiss.af3.exploration.model.FailureMinObjective)currTarget);
-				} else if(currTarget instanceof org.fortiss.af3.exploration.model.FixedDeploymentConstraint) {
-					newTarget = migrateFixedDeploymentConstraint(
-							(org.fortiss.af3.exploration.model.FixedDeploymentConstraint)currTarget);
-				} else if(currTarget instanceof org.fortiss.af3.exploration.model.ExcludeDeploymentConstraint) {
-					newTarget = migrateExcludeDeploymentConstraint(
-							(org.fortiss.af3.exploration.model.ExcludeDeploymentConstraint)currTarget);
-				} else if(currTarget instanceof org.fortiss.af3.exploration.model.time.DeadlineConstraint) {
-					newTarget = migrateDeadlineConstraint(
-							(org.fortiss.af3.exploration.model.DeadlineConstraint)currTarget);
-				} else if(currTarget instanceof org.fortiss.af3.exploration.model.SafetyIntegrityLevelConstraint) {
-					newTarget = migrateSILConstraint(
-							(org.fortiss.af3.exploration.model.SafetyIntegrityLevelConstraint)currTarget);
-				}
-
-				if(newTarget != null) {
-					additionList.add(newTarget);
-				} else {
-					// Copy due to containment, otherwise the ExplorationTaget is removed from the
-					// collection over which we are iterating leading to a
-					// ConcurrentModificationException.
-					additionList.add(EcoreUtil.copy(currTarget));
-				}
-				removalList.add(currTarget);
-			}
-			newDseSpecification.getTargetSpecification().getTargets().clear();
-			newDseSpecification.getTargetSpecification().getTargets().addAll(additionList);
-			newDseSpecificationList.add(newDseSpecification);
-		}
-		// Migrate the Exploration Manager.
-		ExplorationManager newManager =
-				migrateExplorationManager(oldManager, newDseSpecificationList);
-		// Delete the old Exploration Manger (and its contatnts) and add the new one to the
-		// FileProject.
-		FileProject parentProject = getFileProject(oldManager);
-		EcoreUtil.delete(oldManager);
-		parentProject.getRootElements().add(newManager);
-	}
-
-	/**
-	 * Migrates an {@link org.fortiss.af3.exploration.model.ExplorationManager} and sets the given
-	 * set of already migrated {@link DseSpecification}s.
-	 */
-	private ExplorationManager migrateExplorationManager(
-			org.fortiss.af3.exploration.model.ExplorationManager oldManager,
-			EList<DseSpecification> newDseSpecifications) {
-		ExplorationManager newManager = MoeaFactory.eINSTANCE.createExplorationManager();
-		migrateINamedCommentedElement(oldManager, newManager);
-		newManager.getDseSpecifications().addAll(newDseSpecifications);
-		return newManager;
-	}
-
-	/**
-	 * Migrates a {@link DesignSpaceExploration} element to a {@link DseSpecification} (new naming
-	 * and location).
-	 */
-	private DseSpecification migrateDesignSpaceExploration(DesignSpaceExploration oldParameters) {
-		DseSpecification newDseSpec = MoeaFactory.eINSTANCE.createDseSpecification();
-		newDseSpec.setName(oldParameters.getName());
-		newDseSpec.setId(oldParameters.getId());
-		// Optimizer attribute.
-		if(oldParameters.getOptimizer() instanceof org.fortiss.af3.exploration.model.EAOptimizer) {
-			org.fortiss.af3.exploration.model.EAOptimizer oldEAOptimizer =
-					(org.fortiss.af3.exploration.model.EAOptimizer)oldParameters.getOptimizer();
-			newDseSpec.setOptimizer(migrateEAOptimizer(oldEAOptimizer));
-		}
-		// Parameter attribute.
-		if(oldParameters.getParameters() != null) {
-			org.fortiss.af3.exploration.model.DSEParameters oldDseParameters =
-					oldParameters.getParameters();
-			newDseSpec.setParameters(migrateDseParameters(oldDseParameters));
-		}
-		// Target specification refrence (remains the same).
-		if(oldParameters.getTargetSpecification() != null) {
-			// We need to copy the target specification due to the containment. The contained
-			// ExplorationTargets are migrated in the parent migrate method.
-			ExplorationSpecification copiedTargetSpec =
-					copy(oldParameters.getTargetSpecification());
-			newDseSpec.setTargetSpecification(copiedTargetSpec);
-		}
-		return newDseSpec;
-	}
-
-	/** Migrates an {@link EAOptimizer} due to its new location. */
-	private EAOptimizer
-			migrateEAOptimizer(org.fortiss.af3.exploration.model.EAOptimizer oldEAOptimizer) {
-		EAOptimizer newEAOptimizer = ParametersFactory.eINSTANCE.createEAOptimizer();
-		newEAOptimizer.setAlpha(oldEAOptimizer.getAlpha());
-		newEAOptimizer.setIterations(oldEAOptimizer.getIterations());
-		newEAOptimizer.setParallelExecution(oldEAOptimizer.isParallelExecution());
-		newEAOptimizer.setSpea2Tournament(oldEAOptimizer.getSpea2Tournament());
-		return newEAOptimizer;
-	}
-
-	/**
-	 * Migrates a {@link org.fortiss.af3.exploration.model.DSEParameters} element to a
-	 * {@link SystemParameters} (new naming and location).
-	 */
-	private SystemParameters
-			migrateDseParameters(org.fortiss.af3.exploration.model.DSEParameters oldParameters) {
-		SystemParameters newParameters = ParametersFactory.eINSTANCE.createSystemParameters();
-		String oldParameterLiteral = oldParameters.getExecutionModel().getLiteral();
-		newParameters.setExecutionModel(ExecutionModel.get(oldParameterLiteral));
-		return newParameters;
-	}
-
-	/** Migrates the {@link EnergyMinObjective} to its new ecore representation. */
-	private EnergyMinObjective
-			migrateEnergyMin(org.fortiss.af3.exploration.model.EnergyMinObjective oldObjective) {
-		EnergyMinObjective newObjective = createEnergyMinObjective();
-		migrateINamedCommentedElement(oldObjective, newObjective);
-		newObjective.setPriority(0);
-		return newObjective;
-	}
-
-	/** Migrates the {@link FailureMinObjective} to its new ecore representation. */
-	private FailureMinObjective
-			migrateFailureMin(org.fortiss.af3.exploration.model.FailureMinObjective oldObjective) {
-		FailureMinObjective newObjective = createFailureMinObjective();
-		migrateINamedCommentedElement(oldObjective, newObjective);
-		newObjective.setPriority(1);
-		newObjective.setTargetComponent(oldObjective.getComponent());
-		return newObjective;
-	}
-
-	/** Creates an {@link ReliabilityAnalysis} for {@link FailureMinObjective}s. */
-
-	/**
-	 * Migrates the old {@link FixedDeploymentConstraint} to the
-	 * {@link ComponentAllocationConstraint}.
-	 */
-	private ComponentMultiAllocationConstraint migrateFixedDeploymentConstraint(
-			org.fortiss.af3.exploration.model.FixedDeploymentConstraint oldConstraint) {
-		ComponentMultiAllocationConstraint newConstraint =
-				createComponentMultiAllocationConstraint();
-		migrateINamedCommentedElement(oldConstraint, newConstraint);
-		Component comp = oldConstraint.getDeployableComponent();
-		for(ExecutionUnit execUnit : oldConstraint.getDeploymentTargets()) {
-			ComponentAllocationConstraint cAllocConst =
-					createComponentAllocationConstraint(comp, execUnit);
-			newConstraint.getSingleLocationConstraints().add(cAllocConst);
-		}
-		return newConstraint;
-	}
-
-	/**
-	 * Migrates the old {@link ExcludeDeploymentConstraint} to the
-	 * {@link ComponentDislocationConstraint}.
-	 */
-	private ComponentMultiDislocationConstraint migrateExcludeDeploymentConstraint(
-			org.fortiss.af3.exploration.model.ExcludeDeploymentConstraint oldConstraint) {
-		ComponentMultiDislocationConstraint newConstraint =
-				createComponentMultiDislocationConstraint();
-		migrateINamedCommentedElement(oldConstraint, newConstraint);
-		Component comp = oldConstraint.getDeployableComponent();
-		for(ExecutionUnit execUnit : oldConstraint.getDeploymentTargets()) {
-			ComponentDislocationConstraint cDislocConst =
-					createComponentDislocationConstraint(comp, execUnit);
-			newConstraint.getSingleLocationConstraints().add(cDislocConst);
-		}
-		return newConstraint;
-	}
-
-	/** Migrates the {@link DeadlineConstraint} to its new ecore representation. */
-	private DeadlineConstraint migrateDeadlineConstraint(
-			org.fortiss.af3.exploration.model.DeadlineConstraint oldConstraint) {
-		DeadlineConstraint newConstraint = TimeFactory.eINSTANCE.createDeadlineConstraint();
-		migrateINamedCommentedElement(oldConstraint, newConstraint);
-		newConstraint.setStartComponent(oldConstraint.getStartComponent());
-		newConstraint.setEndComponent(oldConstraint.getEndComponent());
-		newConstraint.setDeadline(oldConstraint.getDeadline());
-		return newConstraint;
-	}
-
-	/** Migrates the {@link SafetyIntegrityLevelConstraint} to its new ecore representation. */
-	private SafetyIntegrityLevelConstraint migrateSILConstraint(
-			org.fortiss.af3.exploration.model.SafetyIntegrityLevelConstraint oldConstraint) {
-		SafetyIntegrityLevelConstraint newConstraint =
-				PredefinedFactory.eINSTANCE.createSafetyIntegrityLevelConstraint();
-		migrateINamedCommentedElement(oldConstraint, newConstraint);
-		return newConstraint;
-	}
-}
-- 
GitLab