Bladeren bron

major refactoring for hierarchical cosim support (needed for multirate)

Claudio Gomes 6 jaren geleden
bovenliggende
commit
cba2da2982
100 gewijzigde bestanden met toevoegingen van 4503 en 4038 verwijderingen
  1. BIN
      HintCO.edit/icons/full/ctool16/CreateCandidateScenario_cosimunits_CandidateScenario.gif
  2. BIN
      HintCO.edit/icons/full/ctool16/CreateCandidateScenario_cosimunits_HierarchicalUnitInstance.gif
  3. BIN
      HintCO.edit/icons/full/ctool16/CreateCandidateScenario_cosimunits_RootCandidateScenario.gif
  4. BIN
      HintCO.edit/icons/full/ctool16/CreateCandidateScenario_cosimunits_UnitInstance.gif
  5. BIN
      HintCO.edit/icons/full/ctool16/CreateCandidates_candidates_RootCandidateScenario.gif
  6. BIN
      HintCO.edit/icons/full/ctool16/CreateHierarchicalUnitInstance_cosimunits_CosimUnitInstance.gif
  7. BIN
      HintCO.edit/icons/full/ctool16/CreateHierarchicalUnitInstance_cosimunits_HierarchicalUnitInstance.gif
  8. BIN
      HintCO.edit/icons/full/ctool16/CreateUnitInstance_adaptation_CombineAdaptation.gif
  9. BIN
      HintCO.edit/icons/full/ctool16/CreateUnitInstance_adaptation_MultiRateAdaptation.gif
  10. BIN
      HintCO.edit/icons/full/ctool16/CreateUnitInstance_adaptation_PowerBondAdaptation.gif
  11. BIN
      HintCO.edit/icons/full/ctool16/CreateUnitInstance_adaptation_XorUnitAdaptation.gif
  12. BIN
      HintCO.edit/icons/full/ctool16/CreateUnitInstance_ports_HierarchicalUnitPort.gif
  13. BIN
      HintCO.edit/icons/full/ctool16/CreateUnitInstance_ports_InputPortInstance.gif
  14. BIN
      HintCO.edit/icons/full/ctool16/CreateUnitInstance_ports_OutputPortInstance.gif
  15. BIN
      HintCO.edit/icons/full/obj16/HierarchicalUnitInstance.gif
  16. BIN
      HintCO.edit/icons/full/obj16/HierarchicalUnitPort.gif
  17. BIN
      HintCO.edit/icons/full/obj16/RootCandidateScenario.gif
  18. BIN
      HintCO.edit/icons/full/obj16/UnitInstance.gif
  19. 13 0
      HintCO.edit/plugin.properties
  20. 88 38
      HintCO.edit/src/ua/ansymo/hintco/provider/CandidateScenarioItemProvider.java
  21. 1 6
      HintCO.edit/src/ua/ansymo/hintco/provider/CandidatesItemProvider.java
  22. 0 46
      HintCO.edit/src/ua/ansymo/hintco/provider/CosimUnitDeclarationItemProvider.java
  23. 1 165
      HintCO.edit/src/ua/ansymo/hintco/provider/CosimUnitInstanceItemProvider.java
  24. 0 145
      HintCO.edit/src/ua/ansymo/hintco/provider/HierarchicalCosimUnitDeclarationItemProvider.java
  25. 34 9
      HintCO.edit/src/ua/ansymo/hintco/provider/InputPortDeclarationItemProvider.java
  26. 40 40
      HintCO.edit/src/ua/ansymo/hintco/provider/HintcoItemProviderAdapterFactory.java
  27. 0 23
      HintCO.edit/src/ua/ansymo/hintco/provider/InputPortInstanceItemProvider.java
  28. 0 99
      HintCO.edit/src/ua/ansymo/hintco/provider/OutputPortDeclarationItemProvider.java
  29. 0 23
      HintCO.edit/src/ua/ansymo/hintco/provider/OutputPortInstanceItemProvider.java
  30. 0 88
      HintCO.edit/src/ua/ansymo/hintco/provider/PortDeclarationItemProvider.java
  31. 23 0
      HintCO.edit/src/ua/ansymo/hintco/provider/PowerBondAdaptationItemProvider.java
  32. 462 0
      HintCO.edit/src/ua/ansymo/hintco/provider/RootCandidateScenarioItemProvider.java
  33. 270 0
      HintCO.edit/src/ua/ansymo/hintco/provider/UnitInstanceItemProvider.java
  34. 28 52
      HintCO/examples/case_study_double_loop.xmi
  35. 28 52
      HintCO/examples/case_study_double_loop_better.xmi
  36. 31 52
      HintCO/examples/case_study_double_loop_better_proactive.xmi
  37. 28 52
      HintCO/examples/case_study_double_loop_proactive.xmi
  38. 18 30
      HintCO/examples/watertanks.xmi
  39. 28 52
      HintCO/instances/case_study_double_loop.xmi
  40. 24 48
      HintCO/instances/case_study_double_loop_better.xmi
  41. 28 36
      HintCO/instances/case_study_double_loop_pbond.hintco
  42. 68 0
      HintCO/instances/case_study_double_loop_pbond_hier.hintco
  43. 60 73
      HintCO/instances/complex_order_test.xmi
  44. 28 52
      HintCO/instances/create_default_candidate_space_test.xmi
  45. 0 51
      HintCO/instances/default_scenario_test.xmi
  46. 9 10
      HintCO/instances/duplicate_unit_test.xmi
  47. 28 52
      HintCO/instances/execute_cosim_test.xmi
  48. 18 30
      HintCO/instances/execute_cosim_test_watertanks.xmi
  49. 8 8
      HintCO/instances/extrapolation_test.xmi
  50. 53 77
      HintCO/instances/generate_variant_diagram_test.xmi
  51. 48 72
      HintCO/instances/generate_variants_extrapolation_test.xmi
  52. 28 52
      HintCO/instances/generate_variants_infeasible_implication_test.xmi
  53. 51 75
      HintCO/instances/generate_variants_infeasible_interpolation_test.xmi
  54. 48 72
      HintCO/instances/generate_variants_interpolation_test.xmi
  55. 53 77
      HintCO/instances/generate_variants_test.xmi
  56. 8 8
      HintCO/instances/interpolation_test.xmi
  57. 28 52
      HintCO/instances/model_test.xmi
  58. 44 57
      HintCO/instances/simple_order_test.xmi
  59. 3 3
      HintCO/instances/storage_test.xmi
  60. 18 30
      HintCO/instances/watertanks.xmi
  61. 8 8
      HintCO/instances/zero_interpolation_test.xmi
  62. 18 21
      HintCO/model/Candidates.genmodel
  63. 19 28
      HintCO/model/Candidates.xcore
  64. 23 28
      HintCO/model/hintco.ecore
  65. 5 103
      HintCO/src-gen/ua/ansymo/hintco/CandidateScenario.java
  66. 2 2
      HintCO/src-gen/ua/ansymo/hintco/Candidates.java
  67. 0 18
      HintCO/src-gen/ua/ansymo/hintco/CosimUnitDeclaration.java
  68. 1 88
      HintCO/src-gen/ua/ansymo/hintco/CosimUnitInstance.java
  69. 0 40
      HintCO/src-gen/ua/ansymo/hintco/HierarchicalCosimUnitDeclaration.java
  70. 17 0
      HintCO/src-gen/ua/ansymo/hintco/HierarchicalUnitPort.java
  71. 15 15
      HintCO/src-gen/ua/ansymo/hintco/HintcoFactory.java
  72. 490 353
      HintCO/src-gen/ua/ansymo/hintco/HintcoPackage.java
  73. 0 17
      HintCO/src-gen/ua/ansymo/hintco/InputPortDeclaration.java
  74. 0 27
      HintCO/src-gen/ua/ansymo/hintco/InputPortInstance.java
  75. 0 17
      HintCO/src-gen/ua/ansymo/hintco/OutputPortDeclaration.java
  76. 0 27
      HintCO/src-gen/ua/ansymo/hintco/OutputPortInstance.java
  77. 0 17
      HintCO/src-gen/ua/ansymo/hintco/PortDeclaration.java
  78. 5 5
      HintCO/src-gen/ua/ansymo/hintco/PortInstance.java
  79. 1 1
      HintCO/src-gen/ua/ansymo/hintco/PowerBondAdaptation.java
  80. 120 0
      HintCO/src-gen/ua/ansymo/hintco/RootCandidateScenario.java
  81. 7 7
      HintCO/src-gen/ua/ansymo/hintco/UnitAdaptation.java
  82. 109 0
      HintCO/src-gen/ua/ansymo/hintco/UnitInstance.java
  83. 1 1
      HintCO/src-gen/ua/ansymo/hintco/VariantDiagram.java
  84. 466 106
      HintCO/src-gen/ua/ansymo/hintco/impl/CandidateScenarioImpl.java
  85. 5 5
      HintCO/src-gen/ua/ansymo/hintco/impl/CandidatesImpl.java
  86. 0 59
      HintCO/src-gen/ua/ansymo/hintco/impl/CosimUnitDeclarationImpl.java
  87. 1 564
      HintCO/src-gen/ua/ansymo/hintco/impl/CosimUnitInstanceImpl.java
  88. 0 150
      HintCO/src-gen/ua/ansymo/hintco/impl/HierarchicalCosimUnitDeclarationImpl.java
  89. 198 0
      HintCO/src-gen/ua/ansymo/hintco/impl/HierarchicalUnitPortImpl.java
  90. 19 19
      HintCO/src-gen/ua/ansymo/hintco/impl/HintcoFactoryImpl.java
  91. 88 150
      HintCO/src-gen/ua/ansymo/hintco/impl/HintcoPackageImpl.java
  92. 0 37
      HintCO/src-gen/ua/ansymo/hintco/impl/InputPortDeclarationImpl.java
  93. 0 61
      HintCO/src-gen/ua/ansymo/hintco/impl/InputPortInstanceImpl.java
  94. 0 37
      HintCO/src-gen/ua/ansymo/hintco/impl/OutputPortDeclarationImpl.java
  95. 0 64
      HintCO/src-gen/ua/ansymo/hintco/impl/OutputPortInstanceImpl.java
  96. 0 37
      HintCO/src-gen/ua/ansymo/hintco/impl/PortDeclarationImpl.java
  97. 12 12
      HintCO/src-gen/ua/ansymo/hintco/impl/PortInstanceImpl.java
  98. 7 7
      HintCO/src-gen/ua/ansymo/hintco/impl/PowerBondAdaptationImpl.java
  99. 1120 0
      HintCO/src-gen/ua/ansymo/hintco/impl/RootCandidateScenarioImpl.java
  100. 0 0
      HintCO/src-gen/ua/ansymo/hintco/impl/UnitAdaptationImpl.java

BIN
HintCO.edit/icons/full/ctool16/CreateCandidateScenario_cosimunits_CandidateScenario.gif


BIN
HintCO.edit/icons/full/ctool16/CreateCandidateScenario_cosimunits_HierarchicalUnitInstance.gif


BIN
HintCO.edit/icons/full/ctool16/CreateCandidateScenario_cosimunits_RootCandidateScenario.gif


BIN
HintCO.edit/icons/full/ctool16/CreateCandidateScenario_cosimunits_UnitInstance.gif


BIN
HintCO.edit/icons/full/ctool16/CreateCandidates_candidates_RootCandidateScenario.gif


BIN
HintCO.edit/icons/full/ctool16/CreateHierarchicalUnitInstance_cosimunits_CosimUnitInstance.gif


BIN
HintCO.edit/icons/full/ctool16/CreateHierarchicalUnitInstance_cosimunits_HierarchicalUnitInstance.gif


BIN
HintCO.edit/icons/full/ctool16/CreateUnitInstance_adaptation_CombineAdaptation.gif


BIN
HintCO.edit/icons/full/ctool16/CreateUnitInstance_adaptation_MultiRateAdaptation.gif


BIN
HintCO.edit/icons/full/ctool16/CreateUnitInstance_adaptation_PowerBondAdaptation.gif


BIN
HintCO.edit/icons/full/ctool16/CreateUnitInstance_adaptation_XorUnitAdaptation.gif


BIN
HintCO.edit/icons/full/ctool16/CreateUnitInstance_ports_HierarchicalUnitPort.gif


BIN
HintCO.edit/icons/full/ctool16/CreateUnitInstance_ports_InputPortInstance.gif


BIN
HintCO.edit/icons/full/ctool16/CreateUnitInstance_ports_OutputPortInstance.gif


BIN
HintCO.edit/icons/full/obj16/HierarchicalUnitInstance.gif


BIN
HintCO.edit/icons/full/obj16/HierarchicalUnitPort.gif


BIN
HintCO.edit/icons/full/obj16/RootCandidateScenario.gif


BIN
HintCO.edit/icons/full/obj16/UnitInstance.gif


+ 13 - 0
HintCO.edit/plugin.properties

@@ -96,3 +96,16 @@ _UI_CosimUnitInstance_scenario_feature = Scenario
 _UI_PowerBondAdaptation_effort_feature = Effort
 _UI_PowerBondAdaptation_flow_feature = Flow
 _UI_PowerBondAdaptation_name_feature = Name
+_UI_HierarchicalUnitInstance_type = Hierarchical Unit Instance
+_UI_HierarchicalUnitInstance_cosimunits_feature = Cosimunits
+_UI_PowerBondAdaptation_pOut_feature = POut
+_UI_RootCandidateScenario_type = Root Candidate Scenario
+_UI_UnitInstance_type = Unit Instance
+_UI_HierarchicalUnitPort_type = Hierarchical Unit Port
+_UI_RootCandidateScenario_name_feature = Name
+_UI_RootCandidateScenario_stopTime_feature = Stop Time
+_UI_RootCandidateScenario_stepSize_feature = Step Size
+_UI_RootCandidateScenario_outputStepSize_feature = Output Step Size
+_UI_UnitInstance_scenario_feature = Scenario
+_UI_UnitInstance_adaptation_feature = Adaptation
+_UI_UnitInstance_ports_feature = Ports

+ 88 - 38
HintCO.edit/src/ua/ansymo/hintco/provider/CandidateScenarioItemProvider.java

@@ -51,10 +51,10 @@ public class CandidateScenarioItemProvider extends IDedItemProvider {
 			addWeightPropertyDescriptor(object);
 			addSelectedPropertyDescriptor(object);
 			addImpliesPropertyDescriptor(object);
-			addNamePropertyDescriptor(object);
-			addStopTimePropertyDescriptor(object);
-			addStepSizePropertyDescriptor(object);
-			addOutputStepSizePropertyDescriptor(object);
+			addPrecedesPropertyDescriptor(object);
+			addSucceedsPropertyDescriptor(object);
+			addBeforePropertyDescriptor(object);
+			addAfterPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
@@ -126,89 +126,89 @@ public class CandidateScenarioItemProvider extends IDedItemProvider {
 	}
 
 	/**
-	 * This adds a property descriptor for the Name feature.
+	 * This adds a property descriptor for the Precedes feature.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	protected void addNamePropertyDescriptor(Object object) {
+	protected void addPrecedesPropertyDescriptor(Object object) {
 		itemPropertyDescriptors.add
 			(createItemPropertyDescriptor
 				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
 				 getResourceLocator(),
-				 getString("_UI_CandidateScenario_name_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_CandidateScenario_name_feature", "_UI_CandidateScenario_type"),
-				 HintcoPackage.Literals.CANDIDATE_SCENARIO__NAME,
-				 false,
-				 false,
+				 getString("_UI_PrecendenceNode_precedes_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_precedes_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__PRECEDES,
+				 true,
 				 false,
-				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+				 true,
+				 null,
 				 null,
 				 null));
 	}
 
 	/**
-	 * This adds a property descriptor for the Stop Time feature.
+	 * This adds a property descriptor for the Succeeds feature.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	protected void addStopTimePropertyDescriptor(Object object) {
+	protected void addSucceedsPropertyDescriptor(Object object) {
 		itemPropertyDescriptors.add
 			(createItemPropertyDescriptor
 				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
 				 getResourceLocator(),
-				 getString("_UI_CandidateScenario_stopTime_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_CandidateScenario_stopTime_feature", "_UI_CandidateScenario_type"),
-				 HintcoPackage.Literals.CANDIDATE_SCENARIO__STOP_TIME,
+				 getString("_UI_PrecendenceNode_succeeds_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_succeeds_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__SUCCEEDS,
 				 true,
 				 false,
-				 false,
-				 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
+				 true,
+				 null,
 				 null,
 				 null));
 	}
 
 	/**
-	 * This adds a property descriptor for the Step Size feature.
+	 * This adds a property descriptor for the Before feature.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	protected void addStepSizePropertyDescriptor(Object object) {
+	protected void addBeforePropertyDescriptor(Object object) {
 		itemPropertyDescriptors.add
 			(createItemPropertyDescriptor
 				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
 				 getResourceLocator(),
-				 getString("_UI_CandidateScenario_stepSize_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_CandidateScenario_stepSize_feature", "_UI_CandidateScenario_type"),
-				 HintcoPackage.Literals.CANDIDATE_SCENARIO__STEP_SIZE,
+				 getString("_UI_PrecendenceNode_before_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_before_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__BEFORE,
 				 true,
 				 false,
-				 false,
-				 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
+				 true,
+				 null,
 				 null,
 				 null));
 	}
 
 	/**
-	 * This adds a property descriptor for the Output Step Size feature.
+	 * This adds a property descriptor for the After feature.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	protected void addOutputStepSizePropertyDescriptor(Object object) {
+	protected void addAfterPropertyDescriptor(Object object) {
 		itemPropertyDescriptors.add
 			(createItemPropertyDescriptor
 				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
 				 getResourceLocator(),
-				 getString("_UI_CandidateScenario_outputStepSize_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_CandidateScenario_outputStepSize_feature", "_UI_CandidateScenario_type"),
-				 HintcoPackage.Literals.CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE,
+				 getString("_UI_PrecendenceNode_after_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_after_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__AFTER,
 				 true,
 				 false,
-				 false,
-				 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
+				 true,
+				 null,
 				 null,
 				 null));
 	}
@@ -225,6 +225,8 @@ public class CandidateScenarioItemProvider extends IDedItemProvider {
 	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
 		if (childrenFeatures == null) {
 			super.getChildrenFeatures(object);
+			childrenFeatures.add(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION);
+			childrenFeatures.add(HintcoPackage.Literals.UNIT_INSTANCE__PORTS);
 			childrenFeatures.add(HintcoPackage.Literals.CANDIDATE_SCENARIO__COSIMUNITS);
 		}
 		return childrenFeatures;
@@ -262,7 +264,7 @@ public class CandidateScenarioItemProvider extends IDedItemProvider {
 	 */
 	@Override
 	public String getText(Object object) {
-		String label = ((CandidateScenario)object).getName();
+		String label = ((CandidateScenario)object).getIdentifier();
 		return label == null || label.length() == 0 ?
 			getString("_UI_CandidateScenario_type") :
 			getString("_UI_CandidateScenario_type") + " " + label;
@@ -283,12 +285,10 @@ public class CandidateScenarioItemProvider extends IDedItemProvider {
 		switch (notification.getFeatureID(CandidateScenario.class)) {
 			case HintcoPackage.CANDIDATE_SCENARIO__WEIGHT:
 			case HintcoPackage.CANDIDATE_SCENARIO__SELECTED:
-			case HintcoPackage.CANDIDATE_SCENARIO__NAME:
-			case HintcoPackage.CANDIDATE_SCENARIO__STOP_TIME:
-			case HintcoPackage.CANDIDATE_SCENARIO__STEP_SIZE:
-			case HintcoPackage.CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
 				return;
+			case HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION:
+			case HintcoPackage.CANDIDATE_SCENARIO__PORTS:
 			case HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
 				return;
@@ -307,6 +307,56 @@ public class CandidateScenarioItemProvider extends IDedItemProvider {
 	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
 		super.collectNewChildDescriptors(newChildDescriptors, object);
 
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createXorUnitAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createCombineAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createMultiRateAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createPowerBondAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__PORTS,
+				 HintcoFactory.eINSTANCE.createInputPortInstance()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__PORTS,
+				 HintcoFactory.eINSTANCE.createHierarchicalUnitPort()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__PORTS,
+				 HintcoFactory.eINSTANCE.createOutputPortInstance()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.CANDIDATE_SCENARIO__COSIMUNITS,
+				 HintcoFactory.eINSTANCE.createRootCandidateScenario()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.CANDIDATE_SCENARIO__COSIMUNITS,
+				 HintcoFactory.eINSTANCE.createCandidateScenario()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.CANDIDATE_SCENARIO__COSIMUNITS,
+				 HintcoFactory.eINSTANCE.createUnitInstance()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(HintcoPackage.Literals.CANDIDATE_SCENARIO__COSIMUNITS,

+ 1 - 6
HintCO.edit/src/ua/ansymo/hintco/provider/CandidatesItemProvider.java

@@ -179,18 +179,13 @@ public class CandidatesItemProvider
 		newChildDescriptors.add
 			(createChildParameter
 				(HintcoPackage.Literals.CANDIDATES__CANDIDATES,
-				 HintcoFactory.eINSTANCE.createCandidateScenario()));
+				 HintcoFactory.eINSTANCE.createRootCandidateScenario()));
 
 		newChildDescriptors.add
 			(createChildParameter
 				(HintcoPackage.Literals.CANDIDATES__CSU_DECLARATIONS,
 				 HintcoFactory.eINSTANCE.createCosimUnitDeclaration()));
 
-		newChildDescriptors.add
-			(createChildParameter
-				(HintcoPackage.Literals.CANDIDATES__CSU_DECLARATIONS,
-				 HintcoFactory.eINSTANCE.createHierarchicalCosimUnitDeclaration()));
-
 		newChildDescriptors.add
 			(createChildParameter
 				(HintcoPackage.Literals.CANDIDATES__NODES,

+ 0 - 46
HintCO.edit/src/ua/ansymo/hintco/provider/CosimUnitDeclarationItemProvider.java

@@ -9,15 +9,12 @@ import java.util.List;
 import org.eclipse.emf.common.notify.AdapterFactory;
 import org.eclipse.emf.common.notify.Notification;
 
-import org.eclipse.emf.ecore.EStructuralFeature;
-
 import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
 import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
 import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
 import org.eclipse.emf.edit.provider.ViewerNotification;
 
 import ua.ansymo.hintco.CosimUnitDeclaration;
-import ua.ansymo.hintco.HintcoFactory;
 import ua.ansymo.hintco.HintcoPackage;
 
 /**
@@ -98,36 +95,6 @@ public class CosimUnitDeclarationItemProvider extends IDedItemProvider {
 				 null));
 	}
 
-	/**
-	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
-	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
-	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
-		if (childrenFeatures == null) {
-			super.getChildrenFeatures(object);
-			childrenFeatures.add(HintcoPackage.Literals.COSIM_UNIT_DECLARATION__PORTS);
-		}
-		return childrenFeatures;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	protected EStructuralFeature getChildFeature(Object object, Object child) {
-		// Check the type of the specified child object and return the proper feature to use for
-		// adding (see {@link AddCommand}) it as a child.
-
-		return super.getChildFeature(object, child);
-	}
-
 	/**
 	 * This returns CosimUnitDeclaration.gif.
 	 * <!-- begin-user-doc -->
@@ -170,9 +137,6 @@ public class CosimUnitDeclarationItemProvider extends IDedItemProvider {
 			case HintcoPackage.COSIM_UNIT_DECLARATION__GUID:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
 				return;
-			case HintcoPackage.COSIM_UNIT_DECLARATION__PORTS:
-				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
-				return;
 		}
 		super.notifyChanged(notification);
 	}
@@ -187,16 +151,6 @@ public class CosimUnitDeclarationItemProvider extends IDedItemProvider {
 	@Override
 	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
 		super.collectNewChildDescriptors(newChildDescriptors, object);
-
-		newChildDescriptors.add
-			(createChildParameter
-				(HintcoPackage.Literals.COSIM_UNIT_DECLARATION__PORTS,
-				 HintcoFactory.eINSTANCE.createInputPortDeclaration()));
-
-		newChildDescriptors.add
-			(createChildParameter
-				(HintcoPackage.Literals.COSIM_UNIT_DECLARATION__PORTS,
-				 HintcoFactory.eINSTANCE.createOutputPortDeclaration()));
 	}
 
 }

+ 1 - 165
HintCO.edit/src/ua/ansymo/hintco/provider/CosimUnitInstanceItemProvider.java

@@ -9,14 +9,10 @@ import java.util.List;
 import org.eclipse.emf.common.notify.AdapterFactory;
 import org.eclipse.emf.common.notify.Notification;
 
-import org.eclipse.emf.ecore.EStructuralFeature;
-
 import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
 import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
 
 import ua.ansymo.hintco.CosimUnitInstance;
-import ua.ansymo.hintco.HintcoFactory;
 import ua.ansymo.hintco.HintcoPackage;
 
 /**
@@ -25,7 +21,7 @@ import ua.ansymo.hintco.HintcoPackage;
  * <!-- end-user-doc -->
  * @generated
  */
-public class CosimUnitInstanceItemProvider extends IDedItemProvider {
+public class CosimUnitInstanceItemProvider extends UnitInstanceItemProvider {
 	/**
 	 * This constructs an instance from a factory and a notifier.
 	 * <!-- begin-user-doc -->
@@ -47,103 +43,11 @@ public class CosimUnitInstanceItemProvider extends IDedItemProvider {
 		if (itemPropertyDescriptors == null) {
 			super.getPropertyDescriptors(object);
 
-			addPrecedesPropertyDescriptor(object);
-			addSucceedsPropertyDescriptor(object);
-			addBeforePropertyDescriptor(object);
-			addAfterPropertyDescriptor(object);
 			addDeclarationPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
 
-	/**
-	 * This adds a property descriptor for the Precedes feature.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected void addPrecedesPropertyDescriptor(Object object) {
-		itemPropertyDescriptors.add
-			(createItemPropertyDescriptor
-				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
-				 getResourceLocator(),
-				 getString("_UI_PrecendenceNode_precedes_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_precedes_feature", "_UI_PrecendenceNode_type"),
-				 HintcoPackage.Literals.PRECENDENCE_NODE__PRECEDES,
-				 true,
-				 false,
-				 true,
-				 null,
-				 null,
-				 null));
-	}
-
-	/**
-	 * This adds a property descriptor for the Succeeds feature.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected void addSucceedsPropertyDescriptor(Object object) {
-		itemPropertyDescriptors.add
-			(createItemPropertyDescriptor
-				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
-				 getResourceLocator(),
-				 getString("_UI_PrecendenceNode_succeeds_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_succeeds_feature", "_UI_PrecendenceNode_type"),
-				 HintcoPackage.Literals.PRECENDENCE_NODE__SUCCEEDS,
-				 true,
-				 false,
-				 true,
-				 null,
-				 null,
-				 null));
-	}
-
-	/**
-	 * This adds a property descriptor for the Before feature.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected void addBeforePropertyDescriptor(Object object) {
-		itemPropertyDescriptors.add
-			(createItemPropertyDescriptor
-				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
-				 getResourceLocator(),
-				 getString("_UI_PrecendenceNode_before_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_before_feature", "_UI_PrecendenceNode_type"),
-				 HintcoPackage.Literals.PRECENDENCE_NODE__BEFORE,
-				 true,
-				 false,
-				 true,
-				 null,
-				 null,
-				 null));
-	}
-
-	/**
-	 * This adds a property descriptor for the After feature.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected void addAfterPropertyDescriptor(Object object) {
-		itemPropertyDescriptors.add
-			(createItemPropertyDescriptor
-				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
-				 getResourceLocator(),
-				 getString("_UI_PrecendenceNode_after_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_after_feature", "_UI_PrecendenceNode_type"),
-				 HintcoPackage.Literals.PRECENDENCE_NODE__AFTER,
-				 true,
-				 false,
-				 true,
-				 null,
-				 null,
-				 null));
-	}
-
 	/**
 	 * This adds a property descriptor for the Declaration feature.
 	 * <!-- begin-user-doc -->
@@ -166,37 +70,6 @@ public class CosimUnitInstanceItemProvider extends IDedItemProvider {
 				 null));
 	}
 
-	/**
-	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
-	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
-	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
-		if (childrenFeatures == null) {
-			super.getChildrenFeatures(object);
-			childrenFeatures.add(HintcoPackage.Literals.COSIM_UNIT_INSTANCE__ADAPTATION);
-			childrenFeatures.add(HintcoPackage.Literals.COSIM_UNIT_INSTANCE__PORTS);
-		}
-		return childrenFeatures;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	protected EStructuralFeature getChildFeature(Object object, Object child) {
-		// Check the type of the specified child object and return the proper feature to use for
-		// adding (see {@link AddCommand}) it as a child.
-
-		return super.getChildFeature(object, child);
-	}
-
 	/**
 	 * This returns CosimUnitInstance.gif.
 	 * <!-- begin-user-doc -->
@@ -233,13 +106,6 @@ public class CosimUnitInstanceItemProvider extends IDedItemProvider {
 	@Override
 	public void notifyChanged(Notification notification) {
 		updateChildren(notification);
-
-		switch (notification.getFeatureID(CosimUnitInstance.class)) {
-			case HintcoPackage.COSIM_UNIT_INSTANCE__ADAPTATION:
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PORTS:
-				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
-				return;
-		}
 		super.notifyChanged(notification);
 	}
 
@@ -253,36 +119,6 @@ public class CosimUnitInstanceItemProvider extends IDedItemProvider {
 	@Override
 	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
 		super.collectNewChildDescriptors(newChildDescriptors, object);
-
-		newChildDescriptors.add
-			(createChildParameter
-				(HintcoPackage.Literals.COSIM_UNIT_INSTANCE__ADAPTATION,
-				 HintcoFactory.eINSTANCE.createXorUnitAdaptation()));
-
-		newChildDescriptors.add
-			(createChildParameter
-				(HintcoPackage.Literals.COSIM_UNIT_INSTANCE__ADAPTATION,
-				 HintcoFactory.eINSTANCE.createCombineAdaptation()));
-
-		newChildDescriptors.add
-			(createChildParameter
-				(HintcoPackage.Literals.COSIM_UNIT_INSTANCE__ADAPTATION,
-				 HintcoFactory.eINSTANCE.createMultiRateAdaptation()));
-
-		newChildDescriptors.add
-			(createChildParameter
-				(HintcoPackage.Literals.COSIM_UNIT_INSTANCE__ADAPTATION,
-				 HintcoFactory.eINSTANCE.createPowerBondAdaptation()));
-
-		newChildDescriptors.add
-			(createChildParameter
-				(HintcoPackage.Literals.COSIM_UNIT_INSTANCE__PORTS,
-				 HintcoFactory.eINSTANCE.createInputPortInstance()));
-
-		newChildDescriptors.add
-			(createChildParameter
-				(HintcoPackage.Literals.COSIM_UNIT_INSTANCE__PORTS,
-				 HintcoFactory.eINSTANCE.createOutputPortInstance()));
 	}
 
 }

+ 0 - 145
HintCO.edit/src/ua/ansymo/hintco/provider/HierarchicalCosimUnitDeclarationItemProvider.java

@@ -1,145 +0,0 @@
-/**
- */
-package ua.ansymo.hintco.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import ua.ansymo.hintco.HierarchicalCosimUnitDeclaration;
-import ua.ansymo.hintco.HintcoFactory;
-import ua.ansymo.hintco.HintcoPackage;
-
-/**
- * This is the item provider adapter for a {@link ua.ansymo.hintco.HierarchicalCosimUnitDeclaration} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class HierarchicalCosimUnitDeclarationItemProvider extends CosimUnitDeclarationItemProvider {
-	/**
-	 * This constructs an instance from a factory and a notifier.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public HierarchicalCosimUnitDeclarationItemProvider(AdapterFactory adapterFactory) {
-		super(adapterFactory);
-	}
-
-	/**
-	 * This returns the property descriptors for the adapted class.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
-		if (itemPropertyDescriptors == null) {
-			super.getPropertyDescriptors(object);
-
-		}
-		return itemPropertyDescriptors;
-	}
-
-	/**
-	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
-	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
-	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
-		if (childrenFeatures == null) {
-			super.getChildrenFeatures(object);
-			childrenFeatures.add(HintcoPackage.Literals.HIERARCHICAL_COSIM_UNIT_DECLARATION__CHILDREN);
-		}
-		return childrenFeatures;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	protected EStructuralFeature getChildFeature(Object object, Object child) {
-		// Check the type of the specified child object and return the proper feature to use for
-		// adding (see {@link AddCommand}) it as a child.
-
-		return super.getChildFeature(object, child);
-	}
-
-	/**
-	 * This returns HierarchicalCosimUnitDeclaration.gif.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public Object getImage(Object object) {
-		return overlayImage(object, getResourceLocator().getImage("full/obj16/HierarchicalCosimUnitDeclaration"));
-	}
-
-	/**
-	 * This returns the label text for the adapted class.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public String getText(Object object) {
-		String label = ((HierarchicalCosimUnitDeclaration)object).getIdentifier();
-		return label == null || label.length() == 0 ?
-			getString("_UI_HierarchicalCosimUnitDeclaration_type") :
-			getString("_UI_HierarchicalCosimUnitDeclaration_type") + " " + label;
-	}
-
-
-	/**
-	 * This handles model notifications by calling {@link #updateChildren} to update any cached
-	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public void notifyChanged(Notification notification) {
-		updateChildren(notification);
-
-		switch (notification.getFeatureID(HierarchicalCosimUnitDeclaration.class)) {
-			case HintcoPackage.HIERARCHICAL_COSIM_UNIT_DECLARATION__CHILDREN:
-				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
-				return;
-		}
-		super.notifyChanged(notification);
-	}
-
-	/**
-	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
-	 * that can be created under this object.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
-		super.collectNewChildDescriptors(newChildDescriptors, object);
-
-		newChildDescriptors.add
-			(createChildParameter
-				(HintcoPackage.Literals.HIERARCHICAL_COSIM_UNIT_DECLARATION__CHILDREN,
-				 HintcoFactory.eINSTANCE.createCosimUnitInstance()));
-	}
-
-}

+ 34 - 9
HintCO.edit/src/ua/ansymo/hintco/provider/InputPortDeclarationItemProvider.java

@@ -9,24 +9,26 @@ import java.util.List;
 import org.eclipse.emf.common.notify.AdapterFactory;
 import org.eclipse.emf.common.notify.Notification;
 
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
 import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
 
-import ua.ansymo.hintco.InputPortDeclaration;
+import ua.ansymo.hintco.HierarchicalUnitPort;
+import ua.ansymo.hintco.HintcoPackage;
 
 /**
- * This is the item provider adapter for a {@link ua.ansymo.hintco.InputPortDeclaration} object.
+ * This is the item provider adapter for a {@link ua.ansymo.hintco.HierarchicalUnitPort} object.
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  * @generated
  */
-public class InputPortDeclarationItemProvider extends PortDeclarationItemProvider {
+public class HierarchicalUnitPortItemProvider extends InputPortInstanceItemProvider {
 	/**
 	 * This constructs an instance from a factory and a notifier.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public InputPortDeclarationItemProvider(AdapterFactory adapterFactory) {
+	public HierarchicalUnitPortItemProvider(AdapterFactory adapterFactory) {
 		super(adapterFactory);
 	}
 
@@ -41,19 +43,42 @@ public class InputPortDeclarationItemProvider extends PortDeclarationItemProvide
 		if (itemPropertyDescriptors == null) {
 			super.getPropertyDescriptors(object);
 
+			addValueToPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
 
 	/**
-	 * This returns InputPortDeclaration.gif.
+	 * This adds a property descriptor for the Value To feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addValueToPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_OutputPortInstance_valueTo_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_OutputPortInstance_valueTo_feature", "_UI_OutputPortInstance_type"),
+				 HintcoPackage.Literals.OUTPUT_PORT_INSTANCE__VALUE_TO,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This returns HierarchicalUnitPort.gif.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
 	@Override
 	public Object getImage(Object object) {
-		return overlayImage(object, getResourceLocator().getImage("full/obj16/InputPortDeclaration"));
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/HierarchicalUnitPort"));
 	}
 
 	/**
@@ -64,10 +89,10 @@ public class InputPortDeclarationItemProvider extends PortDeclarationItemProvide
 	 */
 	@Override
 	public String getText(Object object) {
-		String label = ((InputPortDeclaration)object).getIdentifier();
+		String label = ((HierarchicalUnitPort)object).getIdentifier();
 		return label == null || label.length() == 0 ?
-			getString("_UI_InputPortDeclaration_type") :
-			getString("_UI_InputPortDeclaration_type") + " " + label;
+			getString("_UI_HierarchicalUnitPort_type") :
+			getString("_UI_HierarchicalUnitPort_type") + " " + label;
 	}
 
 

+ 40 - 40
HintCO.edit/src/ua/ansymo/hintco/provider/HintcoItemProviderAdapterFactory.java

@@ -117,6 +117,29 @@ public class HintcoItemProviderAdapterFactory extends HintcoAdapterFactory imple
 		return variantDiagramItemProvider;
 	}
 
+	/**
+	 * This keeps track of the one adapter used for all {@link ua.ansymo.hintco.RootCandidateScenario} instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected RootCandidateScenarioItemProvider rootCandidateScenarioItemProvider;
+
+	/**
+	 * This creates an adapter for a {@link ua.ansymo.hintco.RootCandidateScenario}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Adapter createRootCandidateScenarioAdapter() {
+		if (rootCandidateScenarioItemProvider == null) {
+			rootCandidateScenarioItemProvider = new RootCandidateScenarioItemProvider(this);
+		}
+
+		return rootCandidateScenarioItemProvider;
+	}
+
 	/**
 	 * This keeps track of the one adapter used for all {@link ua.ansymo.hintco.CandidateScenario} instances.
 	 * <!-- begin-user-doc -->
@@ -164,26 +187,26 @@ public class HintcoItemProviderAdapterFactory extends HintcoAdapterFactory imple
 	}
 
 	/**
-	 * This keeps track of the one adapter used for all {@link ua.ansymo.hintco.HierarchicalCosimUnitDeclaration} instances.
+	 * This keeps track of the one adapter used for all {@link ua.ansymo.hintco.UnitInstance} instances.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	protected HierarchicalCosimUnitDeclarationItemProvider hierarchicalCosimUnitDeclarationItemProvider;
+	protected UnitInstanceItemProvider unitInstanceItemProvider;
 
 	/**
-	 * This creates an adapter for a {@link ua.ansymo.hintco.HierarchicalCosimUnitDeclaration}.
+	 * This creates an adapter for a {@link ua.ansymo.hintco.UnitInstance}.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
 	@Override
-	public Adapter createHierarchicalCosimUnitDeclarationAdapter() {
-		if (hierarchicalCosimUnitDeclarationItemProvider == null) {
-			hierarchicalCosimUnitDeclarationItemProvider = new HierarchicalCosimUnitDeclarationItemProvider(this);
+	public Adapter createUnitInstanceAdapter() {
+		if (unitInstanceItemProvider == null) {
+			unitInstanceItemProvider = new UnitInstanceItemProvider(this);
 		}
 
-		return hierarchicalCosimUnitDeclarationItemProvider;
+		return unitInstanceItemProvider;
 	}
 
 	/**
@@ -210,49 +233,26 @@ public class HintcoItemProviderAdapterFactory extends HintcoAdapterFactory imple
 	}
 
 	/**
-	 * This keeps track of the one adapter used for all {@link ua.ansymo.hintco.InputPortDeclaration} instances.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected InputPortDeclarationItemProvider inputPortDeclarationItemProvider;
-
-	/**
-	 * This creates an adapter for a {@link ua.ansymo.hintco.InputPortDeclaration}.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public Adapter createInputPortDeclarationAdapter() {
-		if (inputPortDeclarationItemProvider == null) {
-			inputPortDeclarationItemProvider = new InputPortDeclarationItemProvider(this);
-		}
-
-		return inputPortDeclarationItemProvider;
-	}
-
-	/**
-	 * This keeps track of the one adapter used for all {@link ua.ansymo.hintco.OutputPortDeclaration} instances.
+	 * This keeps track of the one adapter used for all {@link ua.ansymo.hintco.HierarchicalUnitPort} instances.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	protected OutputPortDeclarationItemProvider outputPortDeclarationItemProvider;
+	protected HierarchicalUnitPortItemProvider hierarchicalUnitPortItemProvider;
 
 	/**
-	 * This creates an adapter for a {@link ua.ansymo.hintco.OutputPortDeclaration}.
+	 * This creates an adapter for a {@link ua.ansymo.hintco.HierarchicalUnitPort}.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
 	@Override
-	public Adapter createOutputPortDeclarationAdapter() {
-		if (outputPortDeclarationItemProvider == null) {
-			outputPortDeclarationItemProvider = new OutputPortDeclarationItemProvider(this);
+	public Adapter createHierarchicalUnitPortAdapter() {
+		if (hierarchicalUnitPortItemProvider == null) {
+			hierarchicalUnitPortItemProvider = new HierarchicalUnitPortItemProvider(this);
 		}
 
-		return outputPortDeclarationItemProvider;
+		return hierarchicalUnitPortItemProvider;
 	}
 
 	/**
@@ -563,12 +563,12 @@ public class HintcoItemProviderAdapterFactory extends HintcoAdapterFactory imple
 	public void dispose() {
 		if (candidatesItemProvider != null) candidatesItemProvider.dispose();
 		if (variantDiagramItemProvider != null) variantDiagramItemProvider.dispose();
+		if (rootCandidateScenarioItemProvider != null) rootCandidateScenarioItemProvider.dispose();
 		if (candidateScenarioItemProvider != null) candidateScenarioItemProvider.dispose();
 		if (cosimUnitDeclarationItemProvider != null) cosimUnitDeclarationItemProvider.dispose();
-		if (hierarchicalCosimUnitDeclarationItemProvider != null) hierarchicalCosimUnitDeclarationItemProvider.dispose();
+		if (unitInstanceItemProvider != null) unitInstanceItemProvider.dispose();
 		if (cosimUnitInstanceItemProvider != null) cosimUnitInstanceItemProvider.dispose();
-		if (inputPortDeclarationItemProvider != null) inputPortDeclarationItemProvider.dispose();
-		if (outputPortDeclarationItemProvider != null) outputPortDeclarationItemProvider.dispose();
+		if (hierarchicalUnitPortItemProvider != null) hierarchicalUnitPortItemProvider.dispose();
 		if (inputPortInstanceItemProvider != null) inputPortInstanceItemProvider.dispose();
 		if (outputPortInstanceItemProvider != null) outputPortInstanceItemProvider.dispose();
 		if (xorUnitAdaptationItemProvider != null) xorUnitAdaptationItemProvider.dispose();

+ 0 - 23
HintCO.edit/src/ua/ansymo/hintco/provider/InputPortInstanceItemProvider.java

@@ -43,34 +43,11 @@ public class InputPortInstanceItemProvider extends PortInstanceItemProvider {
 		if (itemPropertyDescriptors == null) {
 			super.getPropertyDescriptors(object);
 
-			addDeclarationPropertyDescriptor(object);
 			addValueFromPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
 
-	/**
-	 * This adds a property descriptor for the Declaration feature.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected void addDeclarationPropertyDescriptor(Object object) {
-		itemPropertyDescriptors.add
-			(createItemPropertyDescriptor
-				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
-				 getResourceLocator(),
-				 getString("_UI_InputPortInstance_declaration_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_InputPortInstance_declaration_feature", "_UI_InputPortInstance_type"),
-				 HintcoPackage.Literals.INPUT_PORT_INSTANCE__DECLARATION,
-				 true,
-				 false,
-				 true,
-				 null,
-				 null,
-				 null));
-	}
-
 	/**
 	 * This adds a property descriptor for the Value From feature.
 	 * <!-- begin-user-doc -->

+ 0 - 99
HintCO.edit/src/ua/ansymo/hintco/provider/OutputPortDeclarationItemProvider.java

@@ -1,99 +0,0 @@
-/**
- */
-package ua.ansymo.hintco.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-
-import ua.ansymo.hintco.OutputPortDeclaration;
-
-/**
- * This is the item provider adapter for a {@link ua.ansymo.hintco.OutputPortDeclaration} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class OutputPortDeclarationItemProvider extends PortDeclarationItemProvider {
-	/**
-	 * This constructs an instance from a factory and a notifier.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public OutputPortDeclarationItemProvider(AdapterFactory adapterFactory) {
-		super(adapterFactory);
-	}
-
-	/**
-	 * This returns the property descriptors for the adapted class.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
-		if (itemPropertyDescriptors == null) {
-			super.getPropertyDescriptors(object);
-
-		}
-		return itemPropertyDescriptors;
-	}
-
-	/**
-	 * This returns OutputPortDeclaration.gif.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public Object getImage(Object object) {
-		return overlayImage(object, getResourceLocator().getImage("full/obj16/OutputPortDeclaration"));
-	}
-
-	/**
-	 * This returns the label text for the adapted class.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public String getText(Object object) {
-		String label = ((OutputPortDeclaration)object).getIdentifier();
-		return label == null || label.length() == 0 ?
-			getString("_UI_OutputPortDeclaration_type") :
-			getString("_UI_OutputPortDeclaration_type") + " " + label;
-	}
-
-
-	/**
-	 * This handles model notifications by calling {@link #updateChildren} to update any cached
-	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public void notifyChanged(Notification notification) {
-		updateChildren(notification);
-		super.notifyChanged(notification);
-	}
-
-	/**
-	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
-	 * that can be created under this object.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
-		super.collectNewChildDescriptors(newChildDescriptors, object);
-	}
-
-}

+ 0 - 23
HintCO.edit/src/ua/ansymo/hintco/provider/OutputPortInstanceItemProvider.java

@@ -44,7 +44,6 @@ public class OutputPortInstanceItemProvider extends PortInstanceItemProvider {
 			super.getPropertyDescriptors(object);
 
 			addValueToPropertyDescriptor(object);
-			addDeclarationPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
@@ -71,28 +70,6 @@ public class OutputPortInstanceItemProvider extends PortInstanceItemProvider {
 				 null));
 	}
 
-	/**
-	 * This adds a property descriptor for the Declaration feature.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected void addDeclarationPropertyDescriptor(Object object) {
-		itemPropertyDescriptors.add
-			(createItemPropertyDescriptor
-				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
-				 getResourceLocator(),
-				 getString("_UI_OutputPortInstance_declaration_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_OutputPortInstance_declaration_feature", "_UI_OutputPortInstance_type"),
-				 HintcoPackage.Literals.OUTPUT_PORT_INSTANCE__DECLARATION,
-				 true,
-				 false,
-				 true,
-				 null,
-				 null,
-				 null));
-	}
-
 	/**
 	 * This returns OutputPortInstance.gif.
 	 * <!-- begin-user-doc -->

+ 0 - 88
HintCO.edit/src/ua/ansymo/hintco/provider/PortDeclarationItemProvider.java

@@ -1,88 +0,0 @@
-/**
- */
-package ua.ansymo.hintco.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-
-import ua.ansymo.hintco.PortDeclaration;
-
-/**
- * This is the item provider adapter for a {@link ua.ansymo.hintco.PortDeclaration} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class PortDeclarationItemProvider extends IDedItemProvider {
-	/**
-	 * This constructs an instance from a factory and a notifier.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public PortDeclarationItemProvider(AdapterFactory adapterFactory) {
-		super(adapterFactory);
-	}
-
-	/**
-	 * This returns the property descriptors for the adapted class.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
-		if (itemPropertyDescriptors == null) {
-			super.getPropertyDescriptors(object);
-
-		}
-		return itemPropertyDescriptors;
-	}
-
-	/**
-	 * This returns the label text for the adapted class.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public String getText(Object object) {
-		String label = ((PortDeclaration)object).getIdentifier();
-		return label == null || label.length() == 0 ?
-			getString("_UI_PortDeclaration_type") :
-			getString("_UI_PortDeclaration_type") + " " + label;
-	}
-
-
-	/**
-	 * This handles model notifications by calling {@link #updateChildren} to update any cached
-	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public void notifyChanged(Notification notification) {
-		updateChildren(notification);
-		super.notifyChanged(notification);
-	}
-
-	/**
-	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
-	 * that can be created under this object.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
-		super.collectNewChildDescriptors(newChildDescriptors, object);
-	}
-
-}

+ 23 - 0
HintCO.edit/src/ua/ansymo/hintco/provider/PowerBondAdaptationItemProvider.java

@@ -47,6 +47,7 @@ public class PowerBondAdaptationItemProvider extends UnitAdaptationItemProvider
 
 			addEffortPropertyDescriptor(object);
 			addFlowPropertyDescriptor(object);
+			addPOutPropertyDescriptor(object);
 			addNamePropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
@@ -96,6 +97,28 @@ public class PowerBondAdaptationItemProvider extends UnitAdaptationItemProvider
 				 null));
 	}
 
+	/**
+	 * This adds a property descriptor for the POut feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addPOutPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_PowerBondAdaptation_pOut_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PowerBondAdaptation_pOut_feature", "_UI_PowerBondAdaptation_type"),
+				 HintcoPackage.Literals.POWER_BOND_ADAPTATION__POUT,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
 	/**
 	 * This adds a property descriptor for the Name feature.
 	 * <!-- begin-user-doc -->

+ 462 - 0
HintCO.edit/src/ua/ansymo/hintco/provider/RootCandidateScenarioItemProvider.java

@@ -0,0 +1,462 @@
+/**
+ */
+package ua.ansymo.hintco.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import ua.ansymo.hintco.HintcoFactory;
+import ua.ansymo.hintco.HintcoPackage;
+import ua.ansymo.hintco.RootCandidateScenario;
+
+/**
+ * This is the item provider adapter for a {@link ua.ansymo.hintco.RootCandidateScenario} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RootCandidateScenarioItemProvider extends IDedItemProvider {
+	/**
+	 * This constructs an instance from a factory and a notifier.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public RootCandidateScenarioItemProvider(AdapterFactory adapterFactory) {
+		super(adapterFactory);
+	}
+
+	/**
+	 * This returns the property descriptors for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+		if (itemPropertyDescriptors == null) {
+			super.getPropertyDescriptors(object);
+
+			addWeightPropertyDescriptor(object);
+			addSelectedPropertyDescriptor(object);
+			addImpliesPropertyDescriptor(object);
+			addPrecedesPropertyDescriptor(object);
+			addSucceedsPropertyDescriptor(object);
+			addBeforePropertyDescriptor(object);
+			addAfterPropertyDescriptor(object);
+			addNamePropertyDescriptor(object);
+			addStopTimePropertyDescriptor(object);
+			addStepSizePropertyDescriptor(object);
+			addOutputStepSizePropertyDescriptor(object);
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This adds a property descriptor for the Weight feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addWeightPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_Alternative_weight_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_Alternative_weight_feature", "_UI_Alternative_type"),
+				 HintcoPackage.Literals.ALTERNATIVE__WEIGHT,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Selected feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addSelectedPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_Alternative_selected_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_Alternative_selected_feature", "_UI_Alternative_type"),
+				 HintcoPackage.Literals.ALTERNATIVE__SELECTED,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Implies feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addImpliesPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_Alternative_implies_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_Alternative_implies_feature", "_UI_Alternative_type"),
+				 HintcoPackage.Literals.ALTERNATIVE__IMPLIES,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Precedes feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addPrecedesPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_PrecendenceNode_precedes_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_precedes_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__PRECEDES,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Succeeds feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addSucceedsPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_PrecendenceNode_succeeds_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_succeeds_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__SUCCEEDS,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Before feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addBeforePropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_PrecendenceNode_before_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_before_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__BEFORE,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the After feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addAfterPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_PrecendenceNode_after_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_after_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__AFTER,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Name feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addNamePropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_RootCandidateScenario_name_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_RootCandidateScenario_name_feature", "_UI_RootCandidateScenario_type"),
+				 HintcoPackage.Literals.ROOT_CANDIDATE_SCENARIO__NAME,
+				 false,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Stop Time feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addStopTimePropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_RootCandidateScenario_stopTime_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_RootCandidateScenario_stopTime_feature", "_UI_RootCandidateScenario_type"),
+				 HintcoPackage.Literals.ROOT_CANDIDATE_SCENARIO__STOP_TIME,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Step Size feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addStepSizePropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_RootCandidateScenario_stepSize_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_RootCandidateScenario_stepSize_feature", "_UI_RootCandidateScenario_type"),
+				 HintcoPackage.Literals.ROOT_CANDIDATE_SCENARIO__STEP_SIZE,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Output Step Size feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addOutputStepSizePropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_RootCandidateScenario_outputStepSize_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_RootCandidateScenario_outputStepSize_feature", "_UI_RootCandidateScenario_type"),
+				 HintcoPackage.Literals.ROOT_CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+		if (childrenFeatures == null) {
+			super.getChildrenFeatures(object);
+			childrenFeatures.add(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION);
+			childrenFeatures.add(HintcoPackage.Literals.UNIT_INSTANCE__PORTS);
+			childrenFeatures.add(HintcoPackage.Literals.CANDIDATE_SCENARIO__COSIMUNITS);
+		}
+		return childrenFeatures;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EStructuralFeature getChildFeature(Object object, Object child) {
+		// Check the type of the specified child object and return the proper feature to use for
+		// adding (see {@link AddCommand}) it as a child.
+
+		return super.getChildFeature(object, child);
+	}
+
+	/**
+	 * This returns RootCandidateScenario.gif.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/RootCandidateScenario"));
+	}
+
+	/**
+	 * This returns the label text for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String getText(Object object) {
+		String label = ((RootCandidateScenario)object).getName();
+		return label == null || label.length() == 0 ?
+			getString("_UI_RootCandidateScenario_type") :
+			getString("_UI_RootCandidateScenario_type") + " " + label;
+	}
+
+
+	/**
+	 * This handles model notifications by calling {@link #updateChildren} to update any cached
+	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void notifyChanged(Notification notification) {
+		updateChildren(notification);
+
+		switch (notification.getFeatureID(RootCandidateScenario.class)) {
+			case HintcoPackage.ROOT_CANDIDATE_SCENARIO__WEIGHT:
+			case HintcoPackage.ROOT_CANDIDATE_SCENARIO__SELECTED:
+			case HintcoPackage.ROOT_CANDIDATE_SCENARIO__NAME:
+			case HintcoPackage.ROOT_CANDIDATE_SCENARIO__STOP_TIME:
+			case HintcoPackage.ROOT_CANDIDATE_SCENARIO__STEP_SIZE:
+			case HintcoPackage.ROOT_CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+				return;
+			case HintcoPackage.ROOT_CANDIDATE_SCENARIO__ADAPTATION:
+			case HintcoPackage.ROOT_CANDIDATE_SCENARIO__PORTS:
+			case HintcoPackage.ROOT_CANDIDATE_SCENARIO__COSIMUNITS:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+				return;
+		}
+		super.notifyChanged(notification);
+	}
+
+	/**
+	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+	 * that can be created under this object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+		super.collectNewChildDescriptors(newChildDescriptors, object);
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createXorUnitAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createCombineAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createMultiRateAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createPowerBondAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__PORTS,
+				 HintcoFactory.eINSTANCE.createInputPortInstance()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__PORTS,
+				 HintcoFactory.eINSTANCE.createHierarchicalUnitPort()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__PORTS,
+				 HintcoFactory.eINSTANCE.createOutputPortInstance()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.CANDIDATE_SCENARIO__COSIMUNITS,
+				 HintcoFactory.eINSTANCE.createRootCandidateScenario()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.CANDIDATE_SCENARIO__COSIMUNITS,
+				 HintcoFactory.eINSTANCE.createCandidateScenario()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.CANDIDATE_SCENARIO__COSIMUNITS,
+				 HintcoFactory.eINSTANCE.createUnitInstance()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.CANDIDATE_SCENARIO__COSIMUNITS,
+				 HintcoFactory.eINSTANCE.createCosimUnitInstance()));
+	}
+
+}

+ 270 - 0
HintCO.edit/src/ua/ansymo/hintco/provider/UnitInstanceItemProvider.java

@@ -0,0 +1,270 @@
+/**
+ */
+package ua.ansymo.hintco.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import ua.ansymo.hintco.HintcoFactory;
+import ua.ansymo.hintco.HintcoPackage;
+import ua.ansymo.hintco.UnitInstance;
+
+/**
+ * This is the item provider adapter for a {@link ua.ansymo.hintco.UnitInstance} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class UnitInstanceItemProvider extends IDedItemProvider {
+	/**
+	 * This constructs an instance from a factory and a notifier.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public UnitInstanceItemProvider(AdapterFactory adapterFactory) {
+		super(adapterFactory);
+	}
+
+	/**
+	 * This returns the property descriptors for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+		if (itemPropertyDescriptors == null) {
+			super.getPropertyDescriptors(object);
+
+			addPrecedesPropertyDescriptor(object);
+			addSucceedsPropertyDescriptor(object);
+			addBeforePropertyDescriptor(object);
+			addAfterPropertyDescriptor(object);
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This adds a property descriptor for the Precedes feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addPrecedesPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_PrecendenceNode_precedes_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_precedes_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__PRECEDES,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Succeeds feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addSucceedsPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_PrecendenceNode_succeeds_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_succeeds_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__SUCCEEDS,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Before feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addBeforePropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_PrecendenceNode_before_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_before_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__BEFORE,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the After feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addAfterPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_PrecendenceNode_after_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_PrecendenceNode_after_feature", "_UI_PrecendenceNode_type"),
+				 HintcoPackage.Literals.PRECENDENCE_NODE__AFTER,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+		if (childrenFeatures == null) {
+			super.getChildrenFeatures(object);
+			childrenFeatures.add(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION);
+			childrenFeatures.add(HintcoPackage.Literals.UNIT_INSTANCE__PORTS);
+		}
+		return childrenFeatures;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EStructuralFeature getChildFeature(Object object, Object child) {
+		// Check the type of the specified child object and return the proper feature to use for
+		// adding (see {@link AddCommand}) it as a child.
+
+		return super.getChildFeature(object, child);
+	}
+
+	/**
+	 * This returns UnitInstance.gif.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/UnitInstance"));
+	}
+
+	/**
+	 * This returns the label text for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String getText(Object object) {
+		String label = ((UnitInstance)object).getIdentifier();
+		return label == null || label.length() == 0 ?
+			getString("_UI_UnitInstance_type") :
+			getString("_UI_UnitInstance_type") + " " + label;
+	}
+
+
+	/**
+	 * This handles model notifications by calling {@link #updateChildren} to update any cached
+	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void notifyChanged(Notification notification) {
+		updateChildren(notification);
+
+		switch (notification.getFeatureID(UnitInstance.class)) {
+			case HintcoPackage.UNIT_INSTANCE__ADAPTATION:
+			case HintcoPackage.UNIT_INSTANCE__PORTS:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+				return;
+		}
+		super.notifyChanged(notification);
+	}
+
+	/**
+	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+	 * that can be created under this object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+		super.collectNewChildDescriptors(newChildDescriptors, object);
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createXorUnitAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createCombineAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createMultiRateAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__ADAPTATION,
+				 HintcoFactory.eINSTANCE.createPowerBondAdaptation()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__PORTS,
+				 HintcoFactory.eINSTANCE.createInputPortInstance()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__PORTS,
+				 HintcoFactory.eINSTANCE.createHierarchicalUnitPort()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(HintcoPackage.Literals.UNIT_INSTANCE__PORTS,
+				 HintcoFactory.eINSTANCE.createOutputPortInstance()));
+	}
+
+}

+ 28 - 52
HintCO/examples/case_study_double_loop.xmi

@@ -9,153 +9,129 @@
       stopTime="10.0"
       stepSize="1.0E-5"
       outputStepSize="0.01">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario"
       path="resources/Scenario.fmu"
       guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6"
       path="resources/DLoopController_FixedEuler_1Em6.fmu"
       guid="2761528305">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6"
       path="resources/EMAPlantNoLoad_FixedEuler_1Em6.fmu"
       guid="698567049">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6"
       path="resources/LoadNSensor_FixedEuler_1Em6.fmu"
       guid="2810456241">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 28 - 52
HintCO/examples/case_study_double_loop_better.xmi

@@ -9,27 +9,29 @@
       stopTime="5.0"
       stepSize="1.0E-5"
       outputStepSize="0.001">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"/>
@@ -37,7 +39,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"/>
@@ -45,7 +47,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"/>
@@ -54,9 +56,10 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <adaptation
@@ -65,7 +68,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"/>
@@ -73,7 +76,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"/>
@@ -81,7 +84,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"
@@ -90,7 +93,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"
@@ -100,14 +103,15 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <adaptation
@@ -116,7 +120,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"
@@ -126,69 +130,41 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario"
       path="resources/Scenario.fmu"
       guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6"
       path="resources/DLoopController_FixedEuler_1Em6.fmu"
       guid="2761528305">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6"
       path="resources/EMAPlantNoLoad_FixedEuler_1Em6.fmu"
       guid="698567049">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6"
       path="resources/LoadNSensor_FixedEuler_1Em6.fmu"
       guid="2810456241">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 31 - 52
HintCO/examples/case_study_double_loop_better_proactive.xmi

@@ -9,27 +9,31 @@
       stopTime="10.0"
       stepSize="1.0E-5"
       outputStepSize="0.001">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
+ xsi:type="hintco:CosimUnitInstance"
         identifier="CtrlProactive"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="v"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"/>
@@ -37,7 +41,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="x"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"/>
@@ -45,7 +49,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="ref"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"/>
@@ -54,9 +58,11 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="o"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <adaptation
@@ -65,7 +71,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"/>
@@ -73,7 +79,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"/>
@@ -81,7 +87,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"
@@ -90,7 +96,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"
@@ -100,14 +106,16 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <adaptation
@@ -116,7 +124,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"
@@ -126,69 +134,40 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario"
       path="resources/Scenario.fmu"
       guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ref"/>
   </csuDeclarations>
   <csuDeclarations
       identifier="CtrlProactive"
       path="resources/CtrlProactive.fmu"
       guid="bb836d9b-cd39-4ccb-8899-9d1c47c7d561">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6"
       path="resources/EMAPlantNoLoad_FixedEuler_1Em6.fmu"
       guid="698567049">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6"
       path="resources/LoadNSensor_FixedEuler_1Em6.fmu"
       guid="2810456241">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+    
   </csuDeclarations>
 </hintco:Candidates>

+ 28 - 52
HintCO/examples/case_study_double_loop_proactive.xmi

@@ -9,153 +9,129 @@
       stopTime="10.0"
       stepSize="1.0E-5"
       outputStepSize="0.01">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="CtrlProactive"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="v"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="x"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="ref"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="o"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario"
       path="resources/Scenario.fmu"
       guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="CtrlProactive"
       path="resources/CtrlProactive.fmu"
       guid="2761528305">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="v"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="x"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="ref"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="o"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6"
       path="resources/EMAPlantNoLoad_FixedEuler_1Em6.fmu"
       guid="698567049">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6"
       path="resources/LoadNSensor_FixedEuler_1Em6.fmu"
       guid="2810456241">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 18 - 30
HintCO/examples/watertanks.xmi

@@ -9,58 +9,61 @@
       stopTime="100.0"
       stepSize="0.01"
       outputStepSize="0.01">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="ctrl"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="wt3_level"
-          declaration="//@csuDeclarations.0/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.2"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="wt3_valve"
           valueTo="//@candidates.0/@cosimunits.2/@ports.4"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="wt1"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank2WaterLevel"
-          declaration="//@csuDeclarations.1/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank2OutFlow"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.1/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="wt2"
         declaration="//@csuDeclarations.2">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="puddle"
-          declaration="//@csuDeclarations.2/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank3OutFlow"
-          declaration="//@csuDeclarations.2/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="level"
           valueTo="//@candidates.0/@cosimunits.0/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="inFlow"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.1"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="valveControl"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
     </cosimunits>
   </candidates>
@@ -68,33 +71,18 @@
       identifier="threewatertankcontroller2"
       path="resources/threewatertankcontroller2.fmu"
       guid="{8c4e810f-3df3-4a00-8276-176fa3c9f003}">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="wt3_level"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="wt3_valve"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="threewatertank1"
       path="resources/threewatertank1.fmu"
       guid="{dcd729ec-423a-4a0d-8030-4c42a840abba}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank2WaterLevel"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank2OutFlow"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="threewatertank2"
       path="resources/threewatertank2.fmu"
       guid="{25941611-1350-4ca2-8fe8-85d9193c14fd}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="puddle"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="inFlow"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank3OutFlow"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="valveControl"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="level"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 28 - 52
HintCO/instances/case_study_double_loop.xmi

@@ -9,153 +9,129 @@
       stopTime="10.0"
       stepSize="1.0E-5"
       outputStepSize="0.001">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario"
       path="resources/Scenario.fmu"
       guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6"
       path="resources/DLoopController_FixedEuler_1Em6.fmu"
       guid="2761528305">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6"
       path="resources/EMAPlantNoLoad_FixedEuler_1Em6.fmu"
       guid="698567049">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6"
       path="resources/LoadNSensor_FixedEuler_1Em6.fmu"
       guid="2810456241">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 24 - 48
HintCO/instances/case_study_double_loop_better.xmi

@@ -11,19 +11,21 @@
       outputStepSize="0.001">
     <cosimunits
         identifier="Scenario"
+        xsi:type="hintco:CosimUnitInstance"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
     <cosimunits
+    	xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <adaptation
@@ -32,7 +34,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"
@@ -41,7 +43,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"
@@ -50,7 +52,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"/>
@@ -59,9 +61,10 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
     <cosimunits
+    	xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <adaptation
@@ -70,7 +73,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"/>
@@ -78,7 +81,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"/>
@@ -86,7 +89,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"
@@ -95,7 +98,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"
@@ -105,14 +108,15 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
     <cosimunits
+    	xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <adaptation
@@ -121,7 +125,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"
@@ -131,69 +135,41 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario"
       path="resources/Scenario.fmu"
       guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6"
       path="resources/DLoopController_FixedEuler_1Em6.fmu"
       guid="2761528305">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6"
       path="resources/EMAPlantNoLoad_FixedEuler_1Em6.fmu"
       guid="698567049">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6"
       path="resources/LoadNSensor_FixedEuler_1Em6.fmu"
       guid="2810456241">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 28 - 36
HintCO/instances/case_study_double_loop_pbond.hintco

@@ -1,71 +1,63 @@
 <?xml version="1.0" encoding="ASCII"?>
 <hintco:Candidates xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hintco="ua.ansymo.hintco">
   <candidates identifier="Original" stopTime="2.0" stepSize="0.001" outputStepSize="0.001">
-    <cosimunits identifier="Scenario" declaration="//@csuDeclarations.0">
-      <ports xsi:type="hintco:OutputPortInstance" identifier="psuvolt" valueTo="//@candidates.0/@cosimunits.2/@ports.1" declaration="//@csuDeclarations.0/@ports.0"/>
-      <ports xsi:type="hintco:OutputPortInstance" identifier="ref" valueTo="//@candidates.0/@cosimunits.1/@ports.2" declaration="//@csuDeclarations.0/@ports.1"/>
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance" identifier="Scenario" declaration="//@csuDeclarations.0">
+      <ports xsi:type="hintco:OutputPortInstance" identifier="psuvolt" valueTo="//@candidates.0/@cosimunits.2/@ports.1"/>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="ref" valueTo="//@candidates.0/@cosimunits.1/@ports.2"/>
     </cosimunits>
-    <cosimunits identifier="DLoopController_FixedEuler_1Em6" declaration="//@csuDeclarations.1">
-      <ports xsi:type="hintco:InputPortInstance" identifier="VEL_FB@expseu_" declaration="//@csuDeclarations.1/@ports.0" valueFrom="//@candidates.0/@cosimunits.2/@ports.4">
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance" identifier="DLoopController_FixedEuler_1Em6" declaration="//@csuDeclarations.1">
+      <ports xsi:type="hintco:InputPortInstance" identifier="VEL_FB@expseu_" valueFrom="//@candidates.0/@cosimunits.2/@ports.4">
         <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
       </ports>
-      <ports xsi:type="hintco:InputPortInstance" identifier="POS_FB@expseu_" declaration="//@csuDeclarations.1/@ports.1" valueFrom="//@candidates.0/@cosimunits.3/@ports.1">
+      <ports xsi:type="hintco:InputPortInstance" identifier="POS_FB@expseu_"  valueFrom="//@candidates.0/@cosimunits.3/@ports.1">
         <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
       </ports>
-      <ports xsi:type="hintco:InputPortInstance" identifier="REFERENCE@expseu_" declaration="//@csuDeclarations.1/@ports.2" valueFrom="//@candidates.0/@cosimunits.0/@ports.1">
+      <ports xsi:type="hintco:InputPortInstance" identifier="REFERENCE@expseu_" valueFrom="//@candidates.0/@cosimunits.0/@ports.1">
         <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
       </ports>
-      <ports xsi:type="hintco:OutputPortInstance" identifier="OUTPUT@expseu_" valueTo="//@candidates.0/@cosimunits.2/@ports.0" declaration="//@csuDeclarations.1/@ports.3"/>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="OUTPUT@expseu_" valueTo="//@candidates.0/@cosimunits.2/@ports.0" />
     </cosimunits>
-    <cosimunits identifier="EMAPlantNoLoad_FixedEuler_1Em6" declaration="//@csuDeclarations.2">
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance" identifier="EMAPlantNoLoad_FixedEuler_1Em6" declaration="//@csuDeclarations.2">
       <adaptation xsi:type="hintco:PowerBondAdaptation" effort="//@candidates.0/@cosimunits.2/@ports.5" flow="//@candidates.0/@cosimunits.2/@ports.2"/>
-      <ports xsi:type="hintco:InputPortInstance" identifier="torque_input@expseu_" declaration="//@csuDeclarations.2/@ports.0" valueFrom="//@candidates.0/@cosimunits.1/@ports.3">
+      <ports xsi:type="hintco:InputPortInstance" identifier="torque_input@expseu_"  valueFrom="//@candidates.0/@cosimunits.1/@ports.3">
         <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
       </ports>
-      <ports xsi:type="hintco:InputPortInstance" identifier="psu_vol_input_v@expseu_" declaration="//@csuDeclarations.2/@ports.1" valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
+      <ports xsi:type="hintco:InputPortInstance" identifier="psu_vol_input_v@expseu_" valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
         <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
       </ports>
-      <ports xsi:type="hintco:InputPortInstance" identifier="V_IN@expseu_" declaration="//@csuDeclarations.2/@ports.2" valueFrom="//@candidates.0/@cosimunits.3/@ports.2">
+      <ports xsi:type="hintco:InputPortInstance" identifier="V_IN@expseu_" valueFrom="//@candidates.0/@cosimunits.3/@ports.2">
         <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
       </ports>
-      <ports xsi:type="hintco:InputPortInstance" identifier="X_IN@expseu_" declaration="//@csuDeclarations.2/@ports.3" valueFrom="//@candidates.0/@cosimunits.3/@ports.3">
+      <ports xsi:type="hintco:InputPortInstance" identifier="X_IN@expseu_" valueFrom="//@candidates.0/@cosimunits.3/@ports.3">
         <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
       </ports>
-      <ports xsi:type="hintco:OutputPortInstance" identifier="ang_vel_out_rpm@expseu_" valueTo="//@candidates.0/@cosimunits.1/@ports.0" declaration="//@csuDeclarations.2/@ports.4"/>
-      <ports xsi:type="hintco:OutputPortInstance" identifier="F_OUT@expseu_" valueTo="//@candidates.0/@cosimunits.3/@ports.0" declaration="//@csuDeclarations.2/@ports.5"/>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="ang_vel_out_rpm@expseu_" valueTo="//@candidates.0/@cosimunits.1/@ports.0" />
+      <ports xsi:type="hintco:OutputPortInstance" identifier="F_OUT@expseu_" valueTo="//@candidates.0/@cosimunits.3/@ports.0"/>
     </cosimunits>
-    <cosimunits identifier="LoadNSensor_FixedEuler_1Em6" declaration="//@csuDeclarations.3">
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance" identifier="LoadNSensor_FixedEuler_1Em6" declaration="//@csuDeclarations.3">
       <adaptation xsi:type="hintco:PowerBondAdaptation" effort="//@candidates.0/@cosimunits.3/@ports.0" flow="//@candidates.0/@cosimunits.3/@ports.2"/>
-      <ports xsi:type="hintco:InputPortInstance" identifier="F_INPUT@expseu_" declaration="//@csuDeclarations.3/@ports.0" valueFrom="//@candidates.0/@cosimunits.2/@ports.5">
+      <ports xsi:type="hintco:InputPortInstance" identifier="F_INPUT@expseu_" valueFrom="//@candidates.0/@cosimunits.2/@ports.5">
         <adaptation xsi:type="hintco:InterpolationAdaptation"/>
       </ports>
-      <ports xsi:type="hintco:OutputPortInstance" identifier="X_AFTER_LOAD@expseu_" valueTo="//@candidates.0/@cosimunits.1/@ports.1" declaration="//@csuDeclarations.3/@ports.1"/>
-      <ports xsi:type="hintco:OutputPortInstance" identifier="V_OUTPUT@expseu_" valueTo="//@candidates.0/@cosimunits.2/@ports.2" declaration="//@csuDeclarations.3/@ports.2"/>
-      <ports xsi:type="hintco:OutputPortInstance" identifier="X_OUTPUT@expseu_" valueTo="//@candidates.0/@cosimunits.2/@ports.3" declaration="//@csuDeclarations.3/@ports.3"/>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="X_AFTER_LOAD@expseu_" valueTo="//@candidates.0/@cosimunits.1/@ports.1" />
+      <ports xsi:type="hintco:OutputPortInstance" identifier="V_OUTPUT@expseu_" valueTo="//@candidates.0/@cosimunits.2/@ports.2"/>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="X_OUTPUT@expseu_" valueTo="//@candidates.0/@cosimunits.2/@ports.3" />
     </cosimunits>
   </candidates>
   <csuDeclarations identifier="Scenario" path="resources/Scenario.fmu" guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration" identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration" identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations identifier="DLoopController_FixedEuler_1Em6" path="resources/DLoopController_FixedEuler_1Em6.fmu" guid="2761528305">
-    <ports xsi:type="hintco:InputPortDeclaration" identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration" identifier="POS_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration" identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration" identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations identifier="EMAPlantNoLoad_FixedEuler_1Em6" path="resources/EMAPlantNoLoad_FixedEuler_1Em6.fmu" guid="698567049">
-    <ports xsi:type="hintco:InputPortDeclaration" identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration" identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration" identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration" identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration" identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration" identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations identifier="LoadNSensor_FixedEuler_1Em6" path="resources/LoadNSensor_FixedEuler_1Em6.fmu" guid="2810456241">
-    <ports xsi:type="hintco:InputPortDeclaration" identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration" identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration" identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration" identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 68 - 0
HintCO/instances/case_study_double_loop_pbond_hier.hintco

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="ASCII"?>
+<hintco:Candidates xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hintco="ua.ansymo.hintco">
+  <candidates identifier="Original" stopTime="2.0" stepSize="0.001" outputStepSize="0.001">
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance" identifier="Scenario" declaration="//@csuDeclarations.0">
+      <ports xsi:type="hintco:OutputPortInstance" identifier="psuvolt" valueTo="//@candidates.0/@cosimunits.2/@ports.1"/>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="ref" valueTo="//@candidates.0/@cosimunits.1/@ports.2" />
+    </cosimunits>
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance" identifier="DLoopController_FixedEuler_1Em6" declaration="//@csuDeclarations.1">
+      <ports xsi:type="hintco:InputPortInstance" identifier="VEL_FB@expseu_"  valueFrom="//@candidates.0/@cosimunits.2/@ports.4">
+        <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
+      </ports>
+      <ports xsi:type="hintco:InputPortInstance" identifier="POS_FB@expseu_" valueFrom="//@candidates.0/@cosimunits.3/@ports.1">
+        <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
+      </ports>
+      <ports xsi:type="hintco:InputPortInstance" identifier="REFERENCE@expseu_" valueFrom="//@candidates.0/@cosimunits.0/@ports.1">
+        <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
+      </ports>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="OUTPUT@expseu_" valueTo="//@candidates.0/@cosimunits.2/@ports.0"/>
+    </cosimunits>
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance" identifier="EMAPlantNoLoad_FixedEuler_1Em6" declaration="//@csuDeclarations.2">
+      <adaptation xsi:type="hintco:PowerBondAdaptation" effort="//@candidates.0/@cosimunits.2/@ports.5" flow="//@candidates.0/@cosimunits.2/@ports.2"/>
+      <ports xsi:type="hintco:InputPortInstance" identifier="torque_input@expseu_" valueFrom="//@candidates.0/@cosimunits.1/@ports.3">
+        <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
+      </ports>
+      <ports xsi:type="hintco:InputPortInstance" identifier="psu_vol_input_v@expseu_" valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
+        <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
+      </ports>
+      <ports xsi:type="hintco:InputPortInstance" identifier="V_IN@expseu_" valueFrom="//@candidates.0/@cosimunits.3/@ports.2">
+        <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
+      </ports>
+      <ports xsi:type="hintco:InputPortInstance" identifier="X_IN@expseu_"  valueFrom="//@candidates.0/@cosimunits.3/@ports.3">
+        <adaptation xsi:type="hintco:ExtrapolationAdaptation"/>
+      </ports>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="ang_vel_out_rpm@expseu_" valueTo="//@candidates.0/@cosimunits.1/@ports.0" />
+      <ports xsi:type="hintco:OutputPortInstance" identifier="F_OUT@expseu_" valueTo="//@candidates.0/@cosimunits.3/@ports.0" />
+    </cosimunits>
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance" identifier="LoadNSensor_FixedEuler_1Em6" declaration="//@csuDeclarations.3">
+      <adaptation xsi:type="hintco:PowerBondAdaptation" effort="//@candidates.0/@cosimunits.3/@ports.0" flow="//@candidates.0/@cosimunits.3/@ports.2"/>
+      <ports xsi:type="hintco:InputPortInstance" identifier="F_INPUT@expseu_" valueFrom="//@candidates.0/@cosimunits.2/@ports.5">
+        <adaptation xsi:type="hintco:InterpolationAdaptation"/>
+      </ports>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="X_AFTER_LOAD@expseu_" valueTo="//@candidates.0/@cosimunits.1/@ports.1" />
+      <ports xsi:type="hintco:OutputPortInstance" identifier="V_OUTPUT@expseu_" valueTo="//@candidates.0/@cosimunits.2/@ports.2" />
+      <ports xsi:type="hintco:OutputPortInstance" identifier="X_OUTPUT@expseu_" valueTo="//@candidates.0/@cosimunits.2/@ports.3" />
+    </cosimunits>
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance" xsi:type="hintco:HierarchicalUnitInstance" identifier="plant">
+      <cosimunits
+ xsi:type="hintco:CosimUnitInstance" xsi:type="hintco:HierarchicalUnitInstance"/>
+    </cosimunits>
+  </candidates>
+  <csuDeclarations identifier="Scenario" path="resources/Scenario.fmu" guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
+
+  </csuDeclarations>
+  <csuDeclarations identifier="DLoopController_FixedEuler_1Em6" path="resources/DLoopController_FixedEuler_1Em6.fmu" guid="2761528305">
+
+  </csuDeclarations>
+  <csuDeclarations identifier="EMAPlantNoLoad_FixedEuler_1Em6" path="resources/EMAPlantNoLoad_FixedEuler_1Em6.fmu" guid="698567049">
+
+  </csuDeclarations>
+  <csuDeclarations identifier="LoadNSensor_FixedEuler_1Em6" path="resources/LoadNSensor_FixedEuler_1Em6.fmu" guid="2810456241">
+
+  </csuDeclarations>
+</hintco:Candidates>

+ 60 - 73
HintCO/instances/complex_order_test.xmi

@@ -1,159 +1,146 @@
 <?xml version="1.0" encoding="ASCII"?>
-<candidates:Candidates
+<hintco:Candidates
     xmi:version="2.0"
     xmlns:xmi="http://www.omg.org/XMI"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:candidates="ua.ansymo.hintco">
+    xmlns:hintco="ua.ansymo.hintco">
   <candidates
       identifier="Original">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2">
         <adaptation
-            xsi:type="candidates:InterpolationAdaptation"
+            xsi:type="hintco:InterpolationAdaptation"
             weight="10"
             order="1"/>
       </ports>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5">
         <adaptation
-            xsi:type="candidates:ExtrapolationAdaptation"
+            xsi:type="hintco:ExtrapolationAdaptation"
             order="1"/>
       </ports>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario">
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
+
+
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
+
+
+
+
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
+    
+
+
   </csuDeclarations>
-</candidates:Candidates>
+</hintco:Candidates>

+ 28 - 52
HintCO/instances/create_default_candidate_space_test.xmi

@@ -6,145 +6,121 @@
     xmlns:hintco="ua.ansymo.hintco">
   <candidates
       identifier="Original">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 0 - 51
HintCO/instances/default_scenario_test.xmi

@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<candidates:Candidates
-    xmi:version="2.0"
-    xmlns:xmi="http://www.omg.org/XMI"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:candidates="ua.ansymo.hintco">
-  <csuDeclarations
-      identifier="Scenario">
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ref"/>
-  </csuDeclarations>
-  <csuDeclarations
-      identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
-  </csuDeclarations>
-  <csuDeclarations
-      identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
-  </csuDeclarations>
-  <csuDeclarations
-      identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
-  </csuDeclarations>
-</candidates:Candidates>

+ 9 - 10
HintCO/instances/duplicate_unit_test.xmi

@@ -9,38 +9,37 @@
       stopTime="10.0"
       stepSize="0.01"
       outputStepSize="0.01">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="wt1"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank2WaterLevel"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank2OutFlow"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="wt2"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank2WaterLevel"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank2OutFlow"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="threewatertank1"
       path="resources/threewatertank1.fmu"
       guid="{dcd729ec-423a-4a0d-8030-4c42a840abba}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank2WaterLevel"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank2OutFlow"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 28 - 52
HintCO/instances/execute_cosim_test.xmi

@@ -9,21 +9,23 @@
       stopTime="0.1"
       stepSize="0.001"
       outputStepSize="0.001">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <adaptation
@@ -32,7 +34,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4">
         <adaptation
             xsi:type="hintco:XorAdaptation">
@@ -48,7 +50,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1">
         <adaptation
             xsi:type="hintco:XorAdaptation">
@@ -64,7 +66,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1">
         <adaptation
             xsi:type="hintco:XorAdaptation">
@@ -81,9 +83,10 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <adaptation
@@ -92,7 +95,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3">
         <adaptation
             xsi:type="hintco:XorAdaptation">
@@ -108,7 +111,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
         <adaptation
             xsi:type="hintco:XorAdaptation">
@@ -124,7 +127,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2">
         <adaptation
             xsi:type="hintco:XorAdaptation">
@@ -140,7 +143,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3">
         <adaptation
             xsi:type="hintco:XorAdaptation">
@@ -157,14 +160,15 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <adaptation
@@ -173,7 +177,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5">
         <adaptation
             xsi:type="hintco:XorAdaptation">
@@ -190,69 +194,41 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario"
       path="resources/Scenario.fmu"
       guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6"
       path="resources/DLoopController_FixedEuler_1Em6.fmu"
       guid="2761528305">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6"
       path="resources/EMAPlantNoLoad_FixedEuler_1Em6.fmu"
       guid="698567049">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6"
       path="resources/LoadNSensor_FixedEuler_1Em6.fmu"
       guid="2810456241">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 18 - 30
HintCO/instances/execute_cosim_test_watertanks.xmi

@@ -9,58 +9,61 @@
       stopTime="10.0"
       stepSize="0.01"
       outputStepSize="0.01">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="ctrl"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="wt3_level"
-          declaration="//@csuDeclarations.0/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.2"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="wt3_valve"
           valueTo="//@candidates.0/@cosimunits.2/@ports.4"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="wt1"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank2WaterLevel"
-          declaration="//@csuDeclarations.1/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank2OutFlow"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.1/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="wt2"
         declaration="//@csuDeclarations.2">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="puddle"
-          declaration="//@csuDeclarations.2/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank3OutFlow"
-          declaration="//@csuDeclarations.2/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="level"
           valueTo="//@candidates.0/@cosimunits.0/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="inFlow"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.1"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="valveControl"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
     </cosimunits>
   </candidates>
@@ -68,33 +71,18 @@
       identifier="threewatertankcontroller2"
       path="resources/threewatertankcontroller2.fmu"
       guid="{8c4e810f-3df3-4a00-8276-176fa3c9f003}">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="wt3_level"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="wt3_valve"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="threewatertank1"
       path="resources/threewatertank1.fmu"
       guid="{dcd729ec-423a-4a0d-8030-4c42a840abba}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank2WaterLevel"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank2OutFlow"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="threewatertank2"
       path="resources/threewatertank2.fmu"
       guid="{25941611-1350-4ca2-8fe8-85d9193c14fd}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="puddle"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="inFlow"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank3OutFlow"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="valveControl"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="level"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 8 - 8
HintCO/instances/extrapolation_test.xmi

@@ -9,16 +9,18 @@
       stopTime="10.0"
       stepSize="1.0"
       outputStepSize="1.0">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Source"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="out"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Sink"
         declaration="//@csuDeclarations.1">
       <adaptation
@@ -27,7 +29,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="in"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
         <adaptation
             xsi:type="hintco:ExtrapolationAdaptation"
@@ -39,14 +41,12 @@
       identifier="Source"
       path="resources/Scenario.fmu"
       guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="out"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="Sink"
       path="resources/DLoopController_FixedEuler_1Em6.fmu"
       guid="2761528305">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="in"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 53 - 77
HintCO/instances/generate_variant_diagram_test.xmi

@@ -1,162 +1,138 @@
 <?xml version="1.0" encoding="ASCII"?>
-<candidates:Candidates
+<hintco:Candidates
     xmi:version="2.0"
     xmlns:xmi="http://www.omg.org/XMI"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:candidates="ua.ansymo.hintco">
+    xmlns:hintco="ua.ansymo.hintco">
   <candidates
       identifier="Original">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"/>
+          />
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"/>
+          />
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2">
+          >
         <adaptation
-            xsi:type="candidates:XorPortAdaptation">
+            xsi:type="hintco:XorPortAdaptation">
           <children
-              xsi:type="candidates:ExtrapolationAdaptation"
+              xsi:type="hintco:ExtrapolationAdaptation"
               weight="1"/>
           <children
-              xsi:type="candidates:InterpolationAdaptation"
+              xsi:type="hintco:InterpolationAdaptation"
               weight="5"/>
         </adaptation>
       </ports>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0">
+          >
         <adaptation
-            xsi:type="candidates:XorPortAdaptation">
+            xsi:type="hintco:XorPortAdaptation">
           <children
-              xsi:type="candidates:ExtrapolationAdaptation"
+              xsi:type="hintco:ExtrapolationAdaptation"
               weight="3"/>
           <children
-              xsi:type="candidates:InterpolationAdaptation"
+              xsi:type="hintco:InterpolationAdaptation"
               weight="7"/>
         </adaptation>
       </ports>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"/>
+          />
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"/>
+          />
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario">
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
-</candidates:Candidates>
+</hintco:Candidates>

+ 48 - 72
HintCO/instances/generate_variants_extrapolation_test.xmi

@@ -1,154 +1,130 @@
 <?xml version="1.0" encoding="ASCII"?>
-<candidates:Candidates
+<hintco:Candidates
     xmi:version="2.0"
     xmlns:xmi="http://www.omg.org/XMI"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:candidates="ua.ansymo.hintco">
+    xmlns:hintco="ua.ansymo.hintco">
   <candidates
       identifier="Original">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4">
         <adaptation
-            xsi:type="candidates:ExtrapolationAdaptation"
+            xsi:type="hintco:ExtrapolationAdaptation"
             weight="1"/>
       </ports>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario">
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
-</candidates:Candidates>
+</hintco:Candidates>

+ 28 - 52
HintCO/instances/generate_variants_infeasible_implication_test.xmi

@@ -6,61 +6,64 @@
     xmlns:hintco="ua.ansymo.hintco">
   <candidates
       identifier="Original">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"
@@ -70,26 +73,27 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5">
         <adaptation
             xsi:type="hintco:XorPortAdaptation">
@@ -105,61 +109,33 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 51 - 75
HintCO/instances/generate_variants_infeasible_interpolation_test.xmi

@@ -1,162 +1,138 @@
 <?xml version="1.0" encoding="ASCII"?>
-<candidates:Candidates
+<hintco:Candidates
     xmi:version="2.0"
     xmlns:xmi="http://www.omg.org/XMI"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:candidates="ua.ansymo.hintco">
+    xmlns:hintco="ua.ansymo.hintco">
   <candidates
       identifier="Original">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2">
         <adaptation
-            xsi:type="candidates:InterpolationAdaptation"
+            xsi:type="hintco:InterpolationAdaptation"
             weight="10"/>
       </ports>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5">
         <adaptation
-            xsi:type="candidates:XorPortAdaptation">
+            xsi:type="hintco:XorPortAdaptation">
           <children
-              xsi:type="candidates:InterpolationAdaptation"/>
+              xsi:type="hintco:InterpolationAdaptation"/>
           <children
-              xsi:type="candidates:ExtrapolationAdaptation"/>
+              xsi:type="hintco:ExtrapolationAdaptation"/>
         </adaptation>
       </ports>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario">
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
-</candidates:Candidates>
+</hintco:Candidates>

+ 48 - 72
HintCO/instances/generate_variants_interpolation_test.xmi

@@ -1,153 +1,129 @@
 <?xml version="1.0" encoding="ASCII"?>
-<candidates:Candidates
+<hintco:Candidates
     xmi:version="2.0"
     xmlns:xmi="http://www.omg.org/XMI"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:candidates="ua.ansymo.hintco">
+    xmlns:hintco="ua.ansymo.hintco">
   <candidates
       identifier="Original">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4">
         <adaptation
-            xsi:type="candidates:InterpolationAdaptation"/>
+            xsi:type="hintco:InterpolationAdaptation"/>
       </ports>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario">
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
-</candidates:Candidates>
+</hintco:Candidates>

+ 53 - 77
HintCO/instances/generate_variants_test.xmi

@@ -1,162 +1,138 @@
 <?xml version="1.0" encoding="ASCII"?>
-<candidates:Candidates
+<hintco:Candidates
     xmi:version="2.0"
     xmlns:xmi="http://www.omg.org/XMI"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:candidates="ua.ansymo.hintco">
+    xmlns:hintco="ua.ansymo.hintco">
   <candidates
       identifier="Original">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"/>
+          />
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"/>
+          />
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2">
+          >
         <adaptation
-            xsi:type="candidates:XorPortAdaptation">
+            xsi:type="hintco:XorPortAdaptation">
           <children
-              xsi:type="candidates:ExtrapolationAdaptation"
+              xsi:type="hintco:ExtrapolationAdaptation"
               weight="1"/>
           <children
-              xsi:type="candidates:InterpolationAdaptation"
+              xsi:type="hintco:InterpolationAdaptation"
               weight="5"/>
         </adaptation>
       </ports>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0">
+          >
         <adaptation
-            xsi:type="candidates:XorPortAdaptation">
+            xsi:type="hintco:XorPortAdaptation">
           <children
-              xsi:type="candidates:ExtrapolationAdaptation"
+              xsi:type="hintco:ExtrapolationAdaptation"
               weight="3"/>
           <children
-              xsi:type="candidates:InterpolationAdaptation"
+              xsi:type="hintco:InterpolationAdaptation"
               weight="7"/>
         </adaptation>
       </ports>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"/>
+          />
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"/>
+          />
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario">
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
-</candidates:Candidates>
+</hintco:Candidates>

+ 8 - 8
HintCO/instances/interpolation_test.xmi

@@ -9,16 +9,18 @@
       stopTime="10.0"
       stepSize="1.0"
       outputStepSize="1.0">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Source"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="out"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Sink"
         declaration="//@csuDeclarations.1">
       <adaptation
@@ -27,7 +29,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="in"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"
@@ -39,14 +41,12 @@
       identifier="Source"
       path="resources/Scenario.fmu"
       guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="out"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="Sink"
       path="resources/DLoopController_FixedEuler_1Em6.fmu"
       guid="2761528305">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="in"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 28 - 52
HintCO/instances/model_test.xmi

@@ -6,21 +6,23 @@
     xmlns:hintco="ua.ansymo.hintco">
   <candidates
       identifier="Original">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.2/@ports.1"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ref"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="DLoopController_FixedEuler_1Em6"
         declaration="//@csuDeclarations.1">
       <adaptation
@@ -30,17 +32,17 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="VEL_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.4"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="POS_FB@expseu_"
-          declaration="//@csuDeclarations.1/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.1"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="REFERENCE@expseu_"
-          declaration="//@csuDeclarations.1/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1">
         <adaptation
             xsi:type="hintco:XorPortAdaptation"
@@ -58,9 +60,10 @@
           xsi:type="hintco:OutputPortInstance"
           identifier="OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.1/@ports.3"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <adaptation
@@ -77,7 +80,7 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="torque_input@expseu_"
-          declaration="//@csuDeclarations.2/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3">
         <adaptation
             xsi:type="hintco:XorPortAdaptation"
@@ -94,96 +97,69 @@
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.2"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.3/@ports.3"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="ang_vel_out_rpm@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.3/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.5"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_AFTER_LOAD@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.1"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ref"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 44 - 57
HintCO/instances/simple_order_test.xmi

@@ -1,116 +1,103 @@
 <?xml version="1.0" encoding="ASCII"?>
-<candidates:Candidates
+<hintco:Candidates
     xmi:version="2.0"
     xmlns:xmi="http://www.omg.org/XMI"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:candidates="ua.ansymo.hintco">
+    xmlns:hintco="ua.ansymo.hintco">
   <candidates
       identifier="Original">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Scenario"
         declaration="//@csuDeclarations.0">
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="psuvolt"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="EMAPlantNoLoad_FixedEuler_1Em6"
         declaration="//@csuDeclarations.2">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="psu_vol_input_v@expseu_"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0"/>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="V_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.2"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.1">
         <adaptation
-            xsi:type="candidates:InterpolationAdaptation"
+            xsi:type="hintco:InterpolationAdaptation"
             weight="10"/>
       </ports>
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="X_IN@expseu_"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.2"/>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="F_OUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.2/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.5"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="LoadNSensor_FixedEuler_1Em6"
         declaration="//@csuDeclarations.3">
       <ports
-          xsi:type="candidates:InputPortInstance"
+          xsi:type="hintco:InputPortInstance"
           identifier="F_INPUT@expseu_"
-          declaration="//@csuDeclarations.3/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.3">
         <adaptation
-            xsi:type="candidates:XorPortAdaptation">
+            xsi:type="hintco:XorPortAdaptation">
           <children
-              xsi:type="candidates:ExtrapolationAdaptation"/>
+              xsi:type="hintco:ExtrapolationAdaptation"/>
         </adaptation>
       </ports>
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="V_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.1"
-          declaration="//@csuDeclarations.3/@ports.2"/>
+          />
       <ports
-          xsi:type="candidates:OutputPortInstance"
+          xsi:type="hintco:OutputPortInstance"
           identifier="X_OUTPUT@expseu_"
           valueTo="//@candidates.0/@cosimunits.1/@ports.2"
-          declaration="//@csuDeclarations.3/@ports.3"/>
+          />
     </cosimunits>
   </candidates>
   <csuDeclarations
       identifier="Scenario">
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="psuvolt"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ref"/>
+
+
   </csuDeclarations>
   <csuDeclarations
       identifier="DLoopController_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="VEL_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="POS_FB@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="REFERENCE@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="OUTPUT@expseu_"/>
+
+
+
+
   </csuDeclarations>
   <csuDeclarations
       identifier="EMAPlantNoLoad_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="torque_input@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="psu_vol_input_v@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="V_IN@expseu_"/>
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="X_IN@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="ang_vel_out_rpm@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="F_OUT@expseu_"/>
+
+
+
+
+
+
   </csuDeclarations>
   <csuDeclarations
       identifier="LoadNSensor_FixedEuler_1Em6">
-    <ports xsi:type="candidates:InputPortDeclaration"
-        identifier="F_INPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_AFTER_LOAD@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="V_OUTPUT@expseu_"/>
-    <ports xsi:type="candidates:OutputPortDeclaration"
-        identifier="X_OUTPUT@expseu_"/>
+
+
+
+
   </csuDeclarations>
-</candidates:Candidates>
+</hintco:Candidates>

+ 3 - 3
HintCO/instances/storage_test.xmi

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<candidates:Candidates
+<hintco:Candidates
     xmi:version="2.0"
     xmlns:xmi="http://www.omg.org/XMI"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:candidates="ua.ansymo.hintco"
+    xmlns:hintco="ua.ansymo.hintco"
     xsi:schemaLocation="ua.ansymo.hintco ../model/Candidates.xcore#/EPackage">
   <candidates
       identifier="c1"/>
-</candidates:Candidates>
+</hintco:Candidates>

+ 18 - 30
HintCO/instances/watertanks.xmi

@@ -9,58 +9,61 @@
       stopTime="10.0"
       stepSize="0.01"
       outputStepSize="0.01">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="ctrl"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="wt3_level"
-          declaration="//@csuDeclarations.0/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.2/@ports.2"/>
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="wt3_valve"
           valueTo="//@candidates.0/@cosimunits.2/@ports.4"
-          declaration="//@csuDeclarations.0/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="wt1"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank2WaterLevel"
-          declaration="//@csuDeclarations.1/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank2OutFlow"
           valueTo="//@candidates.0/@cosimunits.2/@ports.3"
-          declaration="//@csuDeclarations.1/@ports.1"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="wt2"
         declaration="//@csuDeclarations.2">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="puddle"
-          declaration="//@csuDeclarations.2/@ports.0"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="Tank3OutFlow"
-          declaration="//@csuDeclarations.2/@ports.2"/>
+          />
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="level"
           valueTo="//@candidates.0/@cosimunits.0/@ports.0"
-          declaration="//@csuDeclarations.2/@ports.4"/>
+          />
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="inFlow"
-          declaration="//@csuDeclarations.2/@ports.1"
+
           valueFrom="//@candidates.0/@cosimunits.1/@ports.1"/>
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="valveControl"
-          declaration="//@csuDeclarations.2/@ports.3"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.1"/>
     </cosimunits>
   </candidates>
@@ -68,33 +71,18 @@
       identifier="threewatertankcontroller2"
       path="resources/threewatertankcontroller2.fmu"
       guid="{8c4e810f-3df3-4a00-8276-176fa3c9f003}">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="wt3_level"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="wt3_valve"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="threewatertank1"
       path="resources/threewatertank1.fmu"
       guid="{dcd729ec-423a-4a0d-8030-4c42a840abba}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank2WaterLevel"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank2OutFlow"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="threewatertank2"
       path="resources/threewatertank2.fmu"
       guid="{25941611-1350-4ca2-8fe8-85d9193c14fd}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="puddle"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="inFlow"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="Tank3OutFlow"/>
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="valveControl"/>
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="level"/>
+
   </csuDeclarations>
 </hintco:Candidates>

+ 8 - 8
HintCO/instances/zero_interpolation_test.xmi

@@ -9,22 +9,24 @@
       stopTime="10.0"
       stepSize="1.0"
       outputStepSize="1.0">
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Source"
         declaration="//@csuDeclarations.0">
       <ports
           xsi:type="hintco:OutputPortInstance"
           identifier="out"
           valueTo="//@candidates.0/@cosimunits.1/@ports.0"
-          declaration="//@csuDeclarations.0/@ports.0"/>
+          />
     </cosimunits>
-    <cosimunits
+    <cosimunits
+ xsi:type="hintco:CosimUnitInstance"
         identifier="Sink"
         declaration="//@csuDeclarations.1">
       <ports
           xsi:type="hintco:InputPortInstance"
           identifier="in"
-          declaration="//@csuDeclarations.1/@ports.0"
+
           valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
         <adaptation
             xsi:type="hintco:InterpolationAdaptation"/>
@@ -35,14 +37,12 @@
       identifier="Source"
       path="resources/Scenario.fmu"
       guid="{a174734c-d15f-4ef0-838d-06526230b19e}">
-    <ports xsi:type="hintco:OutputPortDeclaration"
-        identifier="out"/>
+
   </csuDeclarations>
   <csuDeclarations
       identifier="Sink"
       path="resources/DLoopController_FixedEuler_1Em6.fmu"
       guid="2761528305">
-    <ports xsi:type="hintco:InputPortDeclaration"
-        identifier="in"/>
+
   </csuDeclarations>
 </hintco:Candidates>

File diff suppressed because it is too large
+ 18 - 21
HintCO/model/Candidates.genmodel


+ 19 - 28
HintCO/model/Candidates.xcore

@@ -9,7 +9,7 @@ abstract class IDed {
 }
 
 class Candidates {
-	contains CandidateScenario[] candidates
+	contains RootCandidateScenario[] candidates
 	contains CosimUnitDeclaration[] csuDeclarations
 	refers VariantDiagram root
 	contains VariantDiagram[] nodes
@@ -21,8 +21,8 @@ class VariantDiagram extends IDed {
 	derived String name get {
 		val prefix = identifier+"_"
 		if (alternative !== null){
-			if (alternative instanceof CandidateScenario){
-				prefix + "sce " + (alternative as CandidateScenario).name
+			if (alternative instanceof RootCandidateScenario){
+				prefix + "sce " + (alternative as RootCandidateScenario).name
 			} else if (alternative instanceof XorPortAdaptation) {
 				prefix + "xor " + (alternative as XorPortAdaptation).name
 			} else if (alternative instanceof XorUnitAdaptation) {
@@ -48,8 +48,7 @@ abstract class PrecendenceNode {
 	refers PrecendenceNode after opposite before
 }
 
-class CandidateScenario extends IDed, Alternative {
-	contains CosimUnitInstance[] cosimunits opposite scenario
+class RootCandidateScenario extends IDed, Alternative, CandidateScenario {
 	derived String name get {
 		identifier + "(w=" + weight + ")"
 	}
@@ -58,21 +57,19 @@ class CandidateScenario extends IDed, Alternative {
 	double outputStepSize
 }
 
+class CandidateScenario extends IDed, Alternative, UnitInstance {
+	contains UnitInstance[] cosimunits opposite scenario
+}
+
 class CosimUnitDeclaration extends IDed {
-	contains PortDeclaration[] ports
 	String path
 	String guid
 }
 
-class HierarchicalCosimUnitDeclaration extends CosimUnitDeclaration {
-	contains CosimUnitInstance[] children
-}
-
-class CosimUnitInstance extends IDed,PrecendenceNode {
+class UnitInstance extends IDed,PrecendenceNode{
+	refers CandidateScenario scenario opposite cosimunits
 	contains UnitAdaptation adaptation opposite unit
-	refers CosimUnitDeclaration[1] declaration
 	contains PortInstance[] ports opposite unit
-	refers CandidateScenario scenario opposite cosimunits
 	
 	op UnitAdaptation[] selectedAdaptations() {
 		if (adaptation === null){
@@ -89,20 +86,12 @@ class CosimUnitInstance extends IDed,PrecendenceNode {
 	}
 }
 
-abstract class PortDeclaration extends IDed {
-	
-}
-
-class InputPortDeclaration extends PortDeclaration {
-	
-}
-
-class OutputPortDeclaration extends PortDeclaration {
-	
+class CosimUnitInstance extends UnitInstance {
+	refers CosimUnitDeclaration[1] declaration
 }
 
 abstract class PortInstance extends PrecendenceNode,IDed {
-	refers CosimUnitInstance unit opposite ports
+	refers UnitInstance unit opposite ports
 	contains PortAdaptation adaptation opposite port
 	
 	op PortAdaptation[] selectedAdaptations() {
@@ -120,14 +109,16 @@ abstract class PortInstance extends PrecendenceNode,IDed {
 	}
 }
 
+class HierarchicalUnitPort extends InputPortInstance,OutputPortInstance{
+	
+}
+
 class InputPortInstance extends PortInstance {
-	refers InputPortDeclaration declaration
 	refers OutputPortInstance valueFrom opposite valueTo
 }
 
 class OutputPortInstance extends PortInstance {
 	refers InputPortInstance[] valueTo opposite valueFrom
-	refers OutputPortDeclaration declaration
 }
 
 abstract class Alternative
@@ -177,9 +168,9 @@ abstract class DecompositionPortAdaptation extends PortAdaptation {
 }
 
 abstract class UnitAdaptation extends Adaptation {
-	refers CosimUnitInstance unit opposite adaptation
+	refers UnitInstance unit opposite adaptation
 	refers DecompositionUnitAdaptation parent opposite children
-	op CosimUnitInstance adapted() {
+	op UnitInstance adapted() {
 		if (unit !== null){
 			return unit
 		}

File diff suppressed because it is too large
+ 23 - 28
HintCO/model/hintco.ecore


+ 5 - 103
HintCO/src-gen/ua/ansymo/hintco/CandidateScenario.java

@@ -14,21 +14,17 @@ import org.eclipse.emf.common.util.EList;
  * </p>
  * <ul>
  *   <li>{@link ua.ansymo.hintco.CandidateScenario#getCosimunits <em>Cosimunits</em>}</li>
- *   <li>{@link ua.ansymo.hintco.CandidateScenario#getName <em>Name</em>}</li>
- *   <li>{@link ua.ansymo.hintco.CandidateScenario#getStopTime <em>Stop Time</em>}</li>
- *   <li>{@link ua.ansymo.hintco.CandidateScenario#getStepSize <em>Step Size</em>}</li>
- *   <li>{@link ua.ansymo.hintco.CandidateScenario#getOutputStepSize <em>Output Step Size</em>}</li>
  * </ul>
  *
  * @see ua.ansymo.hintco.HintcoPackage#getCandidateScenario()
  * @model
  * @generated
  */
-public interface CandidateScenario extends IDed, Alternative {
+public interface CandidateScenario extends IDed, Alternative, UnitInstance {
 	/**
 	 * Returns the value of the '<em><b>Cosimunits</b></em>' containment reference list.
-	 * The list contents are of type {@link ua.ansymo.hintco.CosimUnitInstance}.
-	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.CosimUnitInstance#getScenario <em>Scenario</em>}'.
+	 * The list contents are of type {@link ua.ansymo.hintco.UnitInstance}.
+	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.UnitInstance#getScenario <em>Scenario</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <p>
 	 * If the meaning of the '<em>Cosimunits</em>' containment reference list isn't clear,
@@ -37,104 +33,10 @@ public interface CandidateScenario extends IDed, Alternative {
 	 * <!-- end-user-doc -->
 	 * @return the value of the '<em>Cosimunits</em>' containment reference list.
 	 * @see ua.ansymo.hintco.HintcoPackage#getCandidateScenario_Cosimunits()
-	 * @see ua.ansymo.hintco.CosimUnitInstance#getScenario
+	 * @see ua.ansymo.hintco.UnitInstance#getScenario
 	 * @model opposite="scenario" containment="true"
 	 * @generated
 	 */
-	EList<CosimUnitInstance> getCosimunits();
-
-	/**
-	 * Returns the value of the '<em><b>Name</b></em>' attribute.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Name</em>' attribute.
-	 * @see ua.ansymo.hintco.HintcoPackage#getCandidateScenario_Name()
-	 * @model unique="false" transient="true" changeable="false" volatile="true" derived="true"
-	 *        annotation="http://www.eclipse.org/emf/2002/GenModel get='&lt;%java.lang.String%&gt; _identifier = this.getIdentifier();\n&lt;%java.lang.String%&gt; _plus = (_identifier + \"(w=\");\nint _weight = this.getWeight();\n&lt;%java.lang.String%&gt; _plus_1 = (_plus + &lt;%java.lang.Integer%&gt;.valueOf(_weight));\nreturn (_plus_1 + \")\");'"
-	 * @generated
-	 */
-	String getName();
-
-	/**
-	 * Returns the value of the '<em><b>Stop Time</b></em>' attribute.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Stop Time</em>' attribute isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Stop Time</em>' attribute.
-	 * @see #setStopTime(double)
-	 * @see ua.ansymo.hintco.HintcoPackage#getCandidateScenario_StopTime()
-	 * @model unique="false"
-	 * @generated
-	 */
-	double getStopTime();
-
-	/**
-	 * Sets the value of the '{@link ua.ansymo.hintco.CandidateScenario#getStopTime <em>Stop Time</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @param value the new value of the '<em>Stop Time</em>' attribute.
-	 * @see #getStopTime()
-	 * @generated
-	 */
-	void setStopTime(double value);
-
-	/**
-	 * Returns the value of the '<em><b>Step Size</b></em>' attribute.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Step Size</em>' attribute isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Step Size</em>' attribute.
-	 * @see #setStepSize(double)
-	 * @see ua.ansymo.hintco.HintcoPackage#getCandidateScenario_StepSize()
-	 * @model unique="false"
-	 * @generated
-	 */
-	double getStepSize();
-
-	/**
-	 * Sets the value of the '{@link ua.ansymo.hintco.CandidateScenario#getStepSize <em>Step Size</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @param value the new value of the '<em>Step Size</em>' attribute.
-	 * @see #getStepSize()
-	 * @generated
-	 */
-	void setStepSize(double value);
-
-	/**
-	 * Returns the value of the '<em><b>Output Step Size</b></em>' attribute.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Output Step Size</em>' attribute isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Output Step Size</em>' attribute.
-	 * @see #setOutputStepSize(double)
-	 * @see ua.ansymo.hintco.HintcoPackage#getCandidateScenario_OutputStepSize()
-	 * @model unique="false"
-	 * @generated
-	 */
-	double getOutputStepSize();
-
-	/**
-	 * Sets the value of the '{@link ua.ansymo.hintco.CandidateScenario#getOutputStepSize <em>Output Step Size</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @param value the new value of the '<em>Output Step Size</em>' attribute.
-	 * @see #getOutputStepSize()
-	 * @generated
-	 */
-	void setOutputStepSize(double value);
+	EList<UnitInstance> getCosimunits();
 
 } // CandidateScenario

+ 2 - 2
HintCO/src-gen/ua/ansymo/hintco/Candidates.java

@@ -28,7 +28,7 @@ import org.eclipse.emf.ecore.EObject;
 public interface Candidates extends EObject {
 	/**
 	 * Returns the value of the '<em><b>Candidates</b></em>' containment reference list.
-	 * The list contents are of type {@link ua.ansymo.hintco.CandidateScenario}.
+	 * The list contents are of type {@link ua.ansymo.hintco.RootCandidateScenario}.
 	 * <!-- begin-user-doc -->
 	 * <p>
 	 * If the meaning of the '<em>Candidates</em>' containment reference list isn't clear,
@@ -40,7 +40,7 @@ public interface Candidates extends EObject {
 	 * @model containment="true"
 	 * @generated
 	 */
-	EList<CandidateScenario> getCandidates();
+	EList<RootCandidateScenario> getCandidates();
 
 	/**
 	 * Returns the value of the '<em><b>Csu Declarations</b></em>' containment reference list.

+ 0 - 18
HintCO/src-gen/ua/ansymo/hintco/CosimUnitDeclaration.java

@@ -2,7 +2,6 @@
  */
 package ua.ansymo.hintco;
 
-import org.eclipse.emf.common.util.EList;
 
 /**
  * <!-- begin-user-doc -->
@@ -13,7 +12,6 @@ import org.eclipse.emf.common.util.EList;
  * The following features are supported:
  * </p>
  * <ul>
- *   <li>{@link ua.ansymo.hintco.CosimUnitDeclaration#getPorts <em>Ports</em>}</li>
  *   <li>{@link ua.ansymo.hintco.CosimUnitDeclaration#getPath <em>Path</em>}</li>
  *   <li>{@link ua.ansymo.hintco.CosimUnitDeclaration#getGuid <em>Guid</em>}</li>
  * </ul>
@@ -23,22 +21,6 @@ import org.eclipse.emf.common.util.EList;
  * @generated
  */
 public interface CosimUnitDeclaration extends IDed {
-	/**
-	 * Returns the value of the '<em><b>Ports</b></em>' containment reference list.
-	 * The list contents are of type {@link ua.ansymo.hintco.PortDeclaration}.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Ports</em>' containment reference list isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Ports</em>' containment reference list.
-	 * @see ua.ansymo.hintco.HintcoPackage#getCosimUnitDeclaration_Ports()
-	 * @model containment="true"
-	 * @generated
-	 */
-	EList<PortDeclaration> getPorts();
-
 	/**
 	 * Returns the value of the '<em><b>Path</b></em>' attribute.
 	 * <!-- begin-user-doc -->

File diff suppressed because it is too large
+ 1 - 88
HintCO/src-gen/ua/ansymo/hintco/CosimUnitInstance.java


+ 0 - 40
HintCO/src-gen/ua/ansymo/hintco/HierarchicalCosimUnitDeclaration.java

@@ -1,40 +0,0 @@
-/**
- */
-package ua.ansymo.hintco;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Hierarchical Cosim Unit Declaration</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- *   <li>{@link ua.ansymo.hintco.HierarchicalCosimUnitDeclaration#getChildren <em>Children</em>}</li>
- * </ul>
- *
- * @see ua.ansymo.hintco.HintcoPackage#getHierarchicalCosimUnitDeclaration()
- * @model
- * @generated
- */
-public interface HierarchicalCosimUnitDeclaration extends CosimUnitDeclaration {
-	/**
-	 * Returns the value of the '<em><b>Children</b></em>' containment reference list.
-	 * The list contents are of type {@link ua.ansymo.hintco.CosimUnitInstance}.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Children</em>' containment reference list isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Children</em>' containment reference list.
-	 * @see ua.ansymo.hintco.HintcoPackage#getHierarchicalCosimUnitDeclaration_Children()
-	 * @model containment="true"
-	 * @generated
-	 */
-	EList<CosimUnitInstance> getChildren();
-
-} // HierarchicalCosimUnitDeclaration

+ 17 - 0
HintCO/src-gen/ua/ansymo/hintco/HierarchicalUnitPort.java

@@ -0,0 +1,17 @@
+/**
+ */
+package ua.ansymo.hintco;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Hierarchical Unit Port</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see ua.ansymo.hintco.HintcoPackage#getHierarchicalUnitPort()
+ * @model
+ * @generated
+ */
+public interface HierarchicalUnitPort extends InputPortInstance, OutputPortInstance {
+} // HierarchicalUnitPort

+ 15 - 15
HintCO/src-gen/ua/ansymo/hintco/HintcoFactory.java

@@ -39,6 +39,15 @@ public interface HintcoFactory extends EFactory {
 	 */
 	VariantDiagram createVariantDiagram();
 
+	/**
+	 * Returns a new object of class '<em>Root Candidate Scenario</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>Root Candidate Scenario</em>'.
+	 * @generated
+	 */
+	RootCandidateScenario createRootCandidateScenario();
+
 	/**
 	 * Returns a new object of class '<em>Candidate Scenario</em>'.
 	 * <!-- begin-user-doc -->
@@ -58,13 +67,13 @@ public interface HintcoFactory extends EFactory {
 	CosimUnitDeclaration createCosimUnitDeclaration();
 
 	/**
-	 * Returns a new object of class '<em>Hierarchical Cosim Unit Declaration</em>'.
+	 * Returns a new object of class '<em>Unit Instance</em>'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return a new object of class '<em>Hierarchical Cosim Unit Declaration</em>'.
+	 * @return a new object of class '<em>Unit Instance</em>'.
 	 * @generated
 	 */
-	HierarchicalCosimUnitDeclaration createHierarchicalCosimUnitDeclaration();
+	UnitInstance createUnitInstance();
 
 	/**
 	 * Returns a new object of class '<em>Cosim Unit Instance</em>'.
@@ -76,22 +85,13 @@ public interface HintcoFactory extends EFactory {
 	CosimUnitInstance createCosimUnitInstance();
 
 	/**
-	 * Returns a new object of class '<em>Input Port Declaration</em>'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return a new object of class '<em>Input Port Declaration</em>'.
-	 * @generated
-	 */
-	InputPortDeclaration createInputPortDeclaration();
-
-	/**
-	 * Returns a new object of class '<em>Output Port Declaration</em>'.
+	 * Returns a new object of class '<em>Hierarchical Unit Port</em>'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return a new object of class '<em>Output Port Declaration</em>'.
+	 * @return a new object of class '<em>Hierarchical Unit Port</em>'.
 	 * @generated
 	 */
-	OutputPortDeclaration createOutputPortDeclaration();
+	HierarchicalUnitPort createHierarchicalUnitPort();
 
 	/**
 	 * Returns a new object of class '<em>Input Port Instance</em>'.

File diff suppressed because it is too large
+ 490 - 353
HintCO/src-gen/ua/ansymo/hintco/HintcoPackage.java


+ 0 - 17
HintCO/src-gen/ua/ansymo/hintco/InputPortDeclaration.java

@@ -1,17 +0,0 @@
-/**
- */
-package ua.ansymo.hintco;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Input Port Declaration</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see ua.ansymo.hintco.HintcoPackage#getInputPortDeclaration()
- * @model
- * @generated
- */
-public interface InputPortDeclaration extends PortDeclaration {
-} // InputPortDeclaration

+ 0 - 27
HintCO/src-gen/ua/ansymo/hintco/InputPortInstance.java

@@ -12,7 +12,6 @@ package ua.ansymo.hintco;
  * The following features are supported:
  * </p>
  * <ul>
- *   <li>{@link ua.ansymo.hintco.InputPortInstance#getDeclaration <em>Declaration</em>}</li>
  *   <li>{@link ua.ansymo.hintco.InputPortInstance#getValueFrom <em>Value From</em>}</li>
  * </ul>
  *
@@ -21,32 +20,6 @@ package ua.ansymo.hintco;
  * @generated
  */
 public interface InputPortInstance extends PortInstance {
-	/**
-	 * Returns the value of the '<em><b>Declaration</b></em>' reference.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Declaration</em>' reference isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Declaration</em>' reference.
-	 * @see #setDeclaration(InputPortDeclaration)
-	 * @see ua.ansymo.hintco.HintcoPackage#getInputPortInstance_Declaration()
-	 * @model
-	 * @generated
-	 */
-	InputPortDeclaration getDeclaration();
-
-	/**
-	 * Sets the value of the '{@link ua.ansymo.hintco.InputPortInstance#getDeclaration <em>Declaration</em>}' reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @param value the new value of the '<em>Declaration</em>' reference.
-	 * @see #getDeclaration()
-	 * @generated
-	 */
-	void setDeclaration(InputPortDeclaration value);
-
 	/**
 	 * Returns the value of the '<em><b>Value From</b></em>' reference.
 	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.OutputPortInstance#getValueTo <em>Value To</em>}'.

+ 0 - 17
HintCO/src-gen/ua/ansymo/hintco/OutputPortDeclaration.java

@@ -1,17 +0,0 @@
-/**
- */
-package ua.ansymo.hintco;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Output Port Declaration</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see ua.ansymo.hintco.HintcoPackage#getOutputPortDeclaration()
- * @model
- * @generated
- */
-public interface OutputPortDeclaration extends PortDeclaration {
-} // OutputPortDeclaration

+ 0 - 27
HintCO/src-gen/ua/ansymo/hintco/OutputPortInstance.java

@@ -14,7 +14,6 @@ import org.eclipse.emf.common.util.EList;
  * </p>
  * <ul>
  *   <li>{@link ua.ansymo.hintco.OutputPortInstance#getValueTo <em>Value To</em>}</li>
- *   <li>{@link ua.ansymo.hintco.OutputPortInstance#getDeclaration <em>Declaration</em>}</li>
  * </ul>
  *
  * @see ua.ansymo.hintco.HintcoPackage#getOutputPortInstance()
@@ -40,30 +39,4 @@ public interface OutputPortInstance extends PortInstance {
 	 */
 	EList<InputPortInstance> getValueTo();
 
-	/**
-	 * Returns the value of the '<em><b>Declaration</b></em>' reference.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Declaration</em>' reference isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Declaration</em>' reference.
-	 * @see #setDeclaration(OutputPortDeclaration)
-	 * @see ua.ansymo.hintco.HintcoPackage#getOutputPortInstance_Declaration()
-	 * @model
-	 * @generated
-	 */
-	OutputPortDeclaration getDeclaration();
-
-	/**
-	 * Sets the value of the '{@link ua.ansymo.hintco.OutputPortInstance#getDeclaration <em>Declaration</em>}' reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @param value the new value of the '<em>Declaration</em>' reference.
-	 * @see #getDeclaration()
-	 * @generated
-	 */
-	void setDeclaration(OutputPortDeclaration value);
-
 } // OutputPortInstance

+ 0 - 17
HintCO/src-gen/ua/ansymo/hintco/PortDeclaration.java

@@ -1,17 +0,0 @@
-/**
- */
-package ua.ansymo.hintco;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Port Declaration</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see ua.ansymo.hintco.HintcoPackage#getPortDeclaration()
- * @model abstract="true"
- * @generated
- */
-public interface PortDeclaration extends IDed {
-} // PortDeclaration

+ 5 - 5
HintCO/src-gen/ua/ansymo/hintco/PortInstance.java

@@ -24,7 +24,7 @@ import org.eclipse.emf.common.util.EList;
 public interface PortInstance extends PrecendenceNode, IDed {
 	/**
 	 * Returns the value of the '<em><b>Unit</b></em>' container reference.
-	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.CosimUnitInstance#getPorts <em>Ports</em>}'.
+	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.UnitInstance#getPorts <em>Ports</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <p>
 	 * If the meaning of the '<em>Unit</em>' container reference isn't clear,
@@ -32,13 +32,13 @@ public interface PortInstance extends PrecendenceNode, IDed {
 	 * </p>
 	 * <!-- end-user-doc -->
 	 * @return the value of the '<em>Unit</em>' container reference.
-	 * @see #setUnit(CosimUnitInstance)
+	 * @see #setUnit(UnitInstance)
 	 * @see ua.ansymo.hintco.HintcoPackage#getPortInstance_Unit()
-	 * @see ua.ansymo.hintco.CosimUnitInstance#getPorts
+	 * @see ua.ansymo.hintco.UnitInstance#getPorts
 	 * @model opposite="ports" transient="false"
 	 * @generated
 	 */
-	CosimUnitInstance getUnit();
+	UnitInstance getUnit();
 
 	/**
 	 * Sets the value of the '{@link ua.ansymo.hintco.PortInstance#getUnit <em>Unit</em>}' container reference.
@@ -48,7 +48,7 @@ public interface PortInstance extends PrecendenceNode, IDed {
 	 * @see #getUnit()
 	 * @generated
 	 */
-	void setUnit(CosimUnitInstance value);
+	void setUnit(UnitInstance value);
 
 	/**
 	 * Returns the value of the '<em><b>Adaptation</b></em>' containment reference.

File diff suppressed because it is too large
+ 1 - 1
HintCO/src-gen/ua/ansymo/hintco/PowerBondAdaptation.java


+ 120 - 0
HintCO/src-gen/ua/ansymo/hintco/RootCandidateScenario.java

@@ -0,0 +1,120 @@
+/**
+ */
+package ua.ansymo.hintco;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Root Candidate Scenario</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ *   <li>{@link ua.ansymo.hintco.RootCandidateScenario#getName <em>Name</em>}</li>
+ *   <li>{@link ua.ansymo.hintco.RootCandidateScenario#getStopTime <em>Stop Time</em>}</li>
+ *   <li>{@link ua.ansymo.hintco.RootCandidateScenario#getStepSize <em>Step Size</em>}</li>
+ *   <li>{@link ua.ansymo.hintco.RootCandidateScenario#getOutputStepSize <em>Output Step Size</em>}</li>
+ * </ul>
+ *
+ * @see ua.ansymo.hintco.HintcoPackage#getRootCandidateScenario()
+ * @model
+ * @generated
+ */
+public interface RootCandidateScenario extends IDed, Alternative, CandidateScenario {
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see ua.ansymo.hintco.HintcoPackage#getRootCandidateScenario_Name()
+	 * @model unique="false" transient="true" changeable="false" volatile="true" derived="true"
+	 *        annotation="http://www.eclipse.org/emf/2002/GenModel get='&lt;%java.lang.String%&gt; _identifier = this.getIdentifier();\n&lt;%java.lang.String%&gt; _plus = (_identifier + \"(w=\");\nint _weight = this.getWeight();\n&lt;%java.lang.String%&gt; _plus_1 = (_plus + &lt;%java.lang.Integer%&gt;.valueOf(_weight));\nreturn (_plus_1 + \")\");'"
+	 * @generated
+	 */
+	String getName();
+
+	/**
+	 * Returns the value of the '<em><b>Stop Time</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Stop Time</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Stop Time</em>' attribute.
+	 * @see #setStopTime(double)
+	 * @see ua.ansymo.hintco.HintcoPackage#getRootCandidateScenario_StopTime()
+	 * @model unique="false"
+	 * @generated
+	 */
+	double getStopTime();
+
+	/**
+	 * Sets the value of the '{@link ua.ansymo.hintco.RootCandidateScenario#getStopTime <em>Stop Time</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Stop Time</em>' attribute.
+	 * @see #getStopTime()
+	 * @generated
+	 */
+	void setStopTime(double value);
+
+	/**
+	 * Returns the value of the '<em><b>Step Size</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Step Size</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Step Size</em>' attribute.
+	 * @see #setStepSize(double)
+	 * @see ua.ansymo.hintco.HintcoPackage#getRootCandidateScenario_StepSize()
+	 * @model unique="false"
+	 * @generated
+	 */
+	double getStepSize();
+
+	/**
+	 * Sets the value of the '{@link ua.ansymo.hintco.RootCandidateScenario#getStepSize <em>Step Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Step Size</em>' attribute.
+	 * @see #getStepSize()
+	 * @generated
+	 */
+	void setStepSize(double value);
+
+	/**
+	 * Returns the value of the '<em><b>Output Step Size</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Output Step Size</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Output Step Size</em>' attribute.
+	 * @see #setOutputStepSize(double)
+	 * @see ua.ansymo.hintco.HintcoPackage#getRootCandidateScenario_OutputStepSize()
+	 * @model unique="false"
+	 * @generated
+	 */
+	double getOutputStepSize();
+
+	/**
+	 * Sets the value of the '{@link ua.ansymo.hintco.RootCandidateScenario#getOutputStepSize <em>Output Step Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Output Step Size</em>' attribute.
+	 * @see #getOutputStepSize()
+	 * @generated
+	 */
+	void setOutputStepSize(double value);
+
+} // RootCandidateScenario

+ 7 - 7
HintCO/src-gen/ua/ansymo/hintco/UnitAdaptation.java

@@ -23,7 +23,7 @@ package ua.ansymo.hintco;
 public interface UnitAdaptation extends Adaptation {
 	/**
 	 * Returns the value of the '<em><b>Unit</b></em>' container reference.
-	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.CosimUnitInstance#getAdaptation <em>Adaptation</em>}'.
+	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.UnitInstance#getAdaptation <em>Adaptation</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <p>
 	 * If the meaning of the '<em>Unit</em>' container reference isn't clear,
@@ -31,13 +31,13 @@ public interface UnitAdaptation extends Adaptation {
 	 * </p>
 	 * <!-- end-user-doc -->
 	 * @return the value of the '<em>Unit</em>' container reference.
-	 * @see #setUnit(CosimUnitInstance)
+	 * @see #setUnit(UnitInstance)
 	 * @see ua.ansymo.hintco.HintcoPackage#getUnitAdaptation_Unit()
-	 * @see ua.ansymo.hintco.CosimUnitInstance#getAdaptation
+	 * @see ua.ansymo.hintco.UnitInstance#getAdaptation
 	 * @model opposite="adaptation" transient="false"
 	 * @generated
 	 */
-	CosimUnitInstance getUnit();
+	UnitInstance getUnit();
 
 	/**
 	 * Sets the value of the '{@link ua.ansymo.hintco.UnitAdaptation#getUnit <em>Unit</em>}' container reference.
@@ -47,7 +47,7 @@ public interface UnitAdaptation extends Adaptation {
 	 * @see #getUnit()
 	 * @generated
 	 */
-	void setUnit(CosimUnitInstance value);
+	void setUnit(UnitInstance value);
 
 	/**
 	 * Returns the value of the '<em><b>Parent</b></em>' container reference.
@@ -81,9 +81,9 @@ public interface UnitAdaptation extends Adaptation {
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @model unique="false"
-	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='&lt;%ua.ansymo.hintco.CosimUnitInstance%&gt; _unit = this.getUnit();\nboolean _tripleNotEquals = (_unit != null);\nif (_tripleNotEquals)\n{\n\treturn this.getUnit();\n}\n&lt;%ua.ansymo.hintco.DecompositionUnitAdaptation%&gt; _parent = this.getParent();\nboolean _tripleEquals = (_parent == null);\nif (_tripleEquals)\n{\n\treturn null;\n}\nreturn this.getParent().adapted();'"
+	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='&lt;%ua.ansymo.hintco.UnitInstance%&gt; _unit = this.getUnit();\nboolean _tripleNotEquals = (_unit != null);\nif (_tripleNotEquals)\n{\n\treturn this.getUnit();\n}\n&lt;%ua.ansymo.hintco.DecompositionUnitAdaptation%&gt; _parent = this.getParent();\nboolean _tripleEquals = (_parent == null);\nif (_tripleEquals)\n{\n\treturn null;\n}\nreturn this.getParent().adapted();'"
 	 * @generated
 	 */
-	CosimUnitInstance adapted();
+	UnitInstance adapted();
 
 } // UnitAdaptation

File diff suppressed because it is too large
+ 109 - 0
HintCO/src-gen/ua/ansymo/hintco/UnitInstance.java


File diff suppressed because it is too large
+ 1 - 1
HintCO/src-gen/ua/ansymo/hintco/VariantDiagram.java


+ 466 - 106
HintCO/src-gen/ua/ansymo/hintco/impl/CandidateScenarioImpl.java

@@ -2,11 +2,14 @@
  */
 package ua.ansymo.hintco.impl;
 
+import java.lang.reflect.InvocationTargetException;
+
 import java.util.Collection;
 
 import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.notify.NotificationChain;
 
+import org.eclipse.emf.common.util.BasicEList;
 import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
@@ -16,12 +19,18 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
 
 import ua.ansymo.hintco.Alternative;
 import ua.ansymo.hintco.CandidateScenario;
-import ua.ansymo.hintco.CosimUnitInstance;
+import ua.ansymo.hintco.DecompositionUnitAdaptation;
 import ua.ansymo.hintco.HintcoPackage;
+import ua.ansymo.hintco.PortInstance;
+import ua.ansymo.hintco.PrecendenceNode;
+import ua.ansymo.hintco.UnitAdaptation;
+import ua.ansymo.hintco.UnitInstance;
 
 /**
  * <!-- begin-user-doc -->
@@ -34,11 +43,14 @@ import ua.ansymo.hintco.HintcoPackage;
  *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getWeight <em>Weight</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#isSelected <em>Selected</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getImplies <em>Implies</em>}</li>
+ *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getPrecedes <em>Precedes</em>}</li>
+ *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getSucceeds <em>Succeeds</em>}</li>
+ *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getBefore <em>Before</em>}</li>
+ *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getAfter <em>After</em>}</li>
+ *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getScenario <em>Scenario</em>}</li>
+ *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getAdaptation <em>Adaptation</em>}</li>
+ *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getPorts <em>Ports</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getCosimunits <em>Cosimunits</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getName <em>Name</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getStopTime <em>Stop Time</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getStepSize <em>Step Size</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.CandidateScenarioImpl#getOutputStepSize <em>Output Step Size</em>}</li>
  * </ul>
  *
  * @generated
@@ -95,84 +107,74 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	protected EList<Alternative> implies;
 
 	/**
-	 * The cached value of the '{@link #getCosimunits() <em>Cosimunits</em>}' containment reference list.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getCosimunits()
-	 * @generated
-	 * @ordered
-	 */
-	protected EList<CosimUnitInstance> cosimunits;
-
-	/**
-	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * The cached value of the '{@link #getPrecedes() <em>Precedes</em>}' reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getName()
+	 * @see #getPrecedes()
 	 * @generated
 	 * @ordered
 	 */
-	protected static final String NAME_EDEFAULT = null;
+	protected EList<PrecendenceNode> precedes;
 
 	/**
-	 * The default value of the '{@link #getStopTime() <em>Stop Time</em>}' attribute.
+	 * The cached value of the '{@link #getSucceeds() <em>Succeeds</em>}' reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getStopTime()
+	 * @see #getSucceeds()
 	 * @generated
 	 * @ordered
 	 */
-	protected static final double STOP_TIME_EDEFAULT = 0.0;
+	protected EList<PrecendenceNode> succeeds;
 
 	/**
-	 * The cached value of the '{@link #getStopTime() <em>Stop Time</em>}' attribute.
+	 * The cached value of the '{@link #getBefore() <em>Before</em>}' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getStopTime()
+	 * @see #getBefore()
 	 * @generated
 	 * @ordered
 	 */
-	protected double stopTime = STOP_TIME_EDEFAULT;
+	protected PrecendenceNode before;
 
 	/**
-	 * The default value of the '{@link #getStepSize() <em>Step Size</em>}' attribute.
+	 * The cached value of the '{@link #getAfter() <em>After</em>}' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getStepSize()
+	 * @see #getAfter()
 	 * @generated
 	 * @ordered
 	 */
-	protected static final double STEP_SIZE_EDEFAULT = 0.0;
+	protected PrecendenceNode after;
 
 	/**
-	 * The cached value of the '{@link #getStepSize() <em>Step Size</em>}' attribute.
+	 * The cached value of the '{@link #getAdaptation() <em>Adaptation</em>}' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getStepSize()
+	 * @see #getAdaptation()
 	 * @generated
 	 * @ordered
 	 */
-	protected double stepSize = STEP_SIZE_EDEFAULT;
+	protected UnitAdaptation adaptation;
 
 	/**
-	 * The default value of the '{@link #getOutputStepSize() <em>Output Step Size</em>}' attribute.
+	 * The cached value of the '{@link #getPorts() <em>Ports</em>}' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getOutputStepSize()
+	 * @see #getPorts()
 	 * @generated
 	 * @ordered
 	 */
-	protected static final double OUTPUT_STEP_SIZE_EDEFAULT = 0.0;
+	protected EList<PortInstance> ports;
 
 	/**
-	 * The cached value of the '{@link #getOutputStepSize() <em>Output Step Size</em>}' attribute.
+	 * The cached value of the '{@link #getCosimunits() <em>Cosimunits</em>}' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getOutputStepSize()
+	 * @see #getCosimunits()
 	 * @generated
 	 * @ordered
 	 */
-	protected double outputStepSize = OUTPUT_STEP_SIZE_EDEFAULT;
+	protected EList<UnitInstance> cosimunits;
 
 	/**
 	 * <!-- begin-user-doc -->
@@ -252,11 +254,11 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EList<CosimUnitInstance> getCosimunits() {
-		if (cosimunits == null) {
-			cosimunits = new EObjectContainmentWithInverseEList<CosimUnitInstance>(CosimUnitInstance.class, this, HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS, HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO);
+	public EList<PrecendenceNode> getPrecedes() {
+		if (precedes == null) {
+			precedes = new EObjectWithInverseResolvingEList.ManyInverse<PrecendenceNode>(PrecendenceNode.class, this, HintcoPackage.CANDIDATE_SCENARIO__PRECEDES, HintcoPackage.PRECENDENCE_NODE__SUCCEEDS);
 		}
-		return cosimunits;
+		return precedes;
 	}
 
 	/**
@@ -264,12 +266,11 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public String getName() {
-		String _identifier = this.getIdentifier();
-		String _plus = (_identifier + "(w=");
-		int _weight = this.getWeight();
-		String _plus_1 = (_plus + Integer.valueOf(_weight));
-		return (_plus_1 + ")");
+	public EList<PrecendenceNode> getSucceeds() {
+		if (succeeds == null) {
+			succeeds = new EObjectWithInverseResolvingEList.ManyInverse<PrecendenceNode>(PrecendenceNode.class, this, HintcoPackage.CANDIDATE_SCENARIO__SUCCEEDS, HintcoPackage.PRECENDENCE_NODE__PRECEDES);
+		}
+		return succeeds;
 	}
 
 	/**
@@ -277,8 +278,16 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public double getStopTime() {
-		return stopTime;
+	public PrecendenceNode getBefore() {
+		if (before != null && before.eIsProxy()) {
+			InternalEObject oldBefore = (InternalEObject)before;
+			before = (PrecendenceNode)eResolveProxy(oldBefore);
+			if (before != oldBefore) {
+				if (eNotificationRequired())
+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, HintcoPackage.CANDIDATE_SCENARIO__BEFORE, oldBefore, before));
+			}
+		}
+		return before;
 	}
 
 	/**
@@ -286,11 +295,8 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void setStopTime(double newStopTime) {
-		double oldStopTime = stopTime;
-		stopTime = newStopTime;
-		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.CANDIDATE_SCENARIO__STOP_TIME, oldStopTime, stopTime));
+	public PrecendenceNode basicGetBefore() {
+		return before;
 	}
 
 	/**
@@ -298,8 +304,14 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public double getStepSize() {
-		return stepSize;
+	public NotificationChain basicSetBefore(PrecendenceNode newBefore, NotificationChain msgs) {
+		PrecendenceNode oldBefore = before;
+		before = newBefore;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, HintcoPackage.CANDIDATE_SCENARIO__BEFORE, oldBefore, newBefore);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
 	}
 
 	/**
@@ -307,11 +319,18 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void setStepSize(double newStepSize) {
-		double oldStepSize = stepSize;
-		stepSize = newStepSize;
-		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.CANDIDATE_SCENARIO__STEP_SIZE, oldStepSize, stepSize));
+	public void setBefore(PrecendenceNode newBefore) {
+		if (newBefore != before) {
+			NotificationChain msgs = null;
+			if (before != null)
+				msgs = ((InternalEObject)before).eInverseRemove(this, HintcoPackage.PRECENDENCE_NODE__AFTER, PrecendenceNode.class, msgs);
+			if (newBefore != null)
+				msgs = ((InternalEObject)newBefore).eInverseAdd(this, HintcoPackage.PRECENDENCE_NODE__AFTER, PrecendenceNode.class, msgs);
+			msgs = basicSetBefore(newBefore, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.CANDIDATE_SCENARIO__BEFORE, newBefore, newBefore));
 	}
 
 	/**
@@ -319,8 +338,16 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public double getOutputStepSize() {
-		return outputStepSize;
+	public PrecendenceNode getAfter() {
+		if (after != null && after.eIsProxy()) {
+			InternalEObject oldAfter = (InternalEObject)after;
+			after = (PrecendenceNode)eResolveProxy(oldAfter);
+			if (after != oldAfter) {
+				if (eNotificationRequired())
+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, HintcoPackage.CANDIDATE_SCENARIO__AFTER, oldAfter, after));
+			}
+		}
+		return after;
 	}
 
 	/**
@@ -328,11 +355,184 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void setOutputStepSize(double newOutputStepSize) {
-		double oldOutputStepSize = outputStepSize;
-		outputStepSize = newOutputStepSize;
-		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE, oldOutputStepSize, outputStepSize));
+	public PrecendenceNode basicGetAfter() {
+		return after;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetAfter(PrecendenceNode newAfter, NotificationChain msgs) {
+		PrecendenceNode oldAfter = after;
+		after = newAfter;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, HintcoPackage.CANDIDATE_SCENARIO__AFTER, oldAfter, newAfter);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setAfter(PrecendenceNode newAfter) {
+		if (newAfter != after) {
+			NotificationChain msgs = null;
+			if (after != null)
+				msgs = ((InternalEObject)after).eInverseRemove(this, HintcoPackage.PRECENDENCE_NODE__BEFORE, PrecendenceNode.class, msgs);
+			if (newAfter != null)
+				msgs = ((InternalEObject)newAfter).eInverseAdd(this, HintcoPackage.PRECENDENCE_NODE__BEFORE, PrecendenceNode.class, msgs);
+			msgs = basicSetAfter(newAfter, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.CANDIDATE_SCENARIO__AFTER, newAfter, newAfter));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public CandidateScenario getScenario() {
+		if (eContainerFeatureID() != HintcoPackage.CANDIDATE_SCENARIO__SCENARIO) return null;
+		return (CandidateScenario)eContainer();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public CandidateScenario basicGetScenario() {
+		if (eContainerFeatureID() != HintcoPackage.CANDIDATE_SCENARIO__SCENARIO) return null;
+		return (CandidateScenario)eInternalContainer();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetScenario(CandidateScenario newScenario, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject)newScenario, HintcoPackage.CANDIDATE_SCENARIO__SCENARIO, msgs);
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setScenario(CandidateScenario newScenario) {
+		if (newScenario != eInternalContainer() || (eContainerFeatureID() != HintcoPackage.CANDIDATE_SCENARIO__SCENARIO && newScenario != null)) {
+			if (EcoreUtil.isAncestor(this, newScenario))
+				throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+			NotificationChain msgs = null;
+			if (eInternalContainer() != null)
+				msgs = eBasicRemoveFromContainer(msgs);
+			if (newScenario != null)
+				msgs = ((InternalEObject)newScenario).eInverseAdd(this, HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS, CandidateScenario.class, msgs);
+			msgs = basicSetScenario(newScenario, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.CANDIDATE_SCENARIO__SCENARIO, newScenario, newScenario));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public UnitAdaptation getAdaptation() {
+		return adaptation;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetAdaptation(UnitAdaptation newAdaptation, NotificationChain msgs) {
+		UnitAdaptation oldAdaptation = adaptation;
+		adaptation = newAdaptation;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION, oldAdaptation, newAdaptation);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setAdaptation(UnitAdaptation newAdaptation) {
+		if (newAdaptation != adaptation) {
+			NotificationChain msgs = null;
+			if (adaptation != null)
+				msgs = ((InternalEObject)adaptation).eInverseRemove(this, HintcoPackage.UNIT_ADAPTATION__UNIT, UnitAdaptation.class, msgs);
+			if (newAdaptation != null)
+				msgs = ((InternalEObject)newAdaptation).eInverseAdd(this, HintcoPackage.UNIT_ADAPTATION__UNIT, UnitAdaptation.class, msgs);
+			msgs = basicSetAdaptation(newAdaptation, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION, newAdaptation, newAdaptation));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<PortInstance> getPorts() {
+		if (ports == null) {
+			ports = new EObjectContainmentWithInverseEList<PortInstance>(PortInstance.class, this, HintcoPackage.CANDIDATE_SCENARIO__PORTS, HintcoPackage.PORT_INSTANCE__UNIT);
+		}
+		return ports;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<UnitInstance> getCosimunits() {
+		if (cosimunits == null) {
+			cosimunits = new EObjectContainmentWithInverseEList<UnitInstance>(UnitInstance.class, this, HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS, HintcoPackage.UNIT_INSTANCE__SCENARIO);
+		}
+		return cosimunits;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<UnitAdaptation> selectedAdaptations() {
+		UnitAdaptation _adaptation = this.getAdaptation();
+		boolean _tripleEquals = (_adaptation == null);
+		if (_tripleEquals) {
+			return new BasicEList<UnitAdaptation>(java.util.Collections.<UnitAdaptation>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<UnitAdaptation>newArrayList()));
+		}
+		boolean _isSelected = this.getAdaptation().isSelected();
+		if (_isSelected) {
+			UnitAdaptation _adaptation_1 = this.getAdaptation();
+			if ((_adaptation_1 instanceof DecompositionUnitAdaptation)) {
+				UnitAdaptation _adaptation_2 = this.getAdaptation();
+				return ((DecompositionUnitAdaptation) _adaptation_2).selectedAdaptations();
+			}
+			UnitAdaptation _adaptation_3 = this.getAdaptation();
+			return new BasicEList<UnitAdaptation>(java.util.Collections.<UnitAdaptation>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<UnitAdaptation>newArrayList(_adaptation_3)));
+		}
+		return new BasicEList<UnitAdaptation>(java.util.Collections.<UnitAdaptation>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<UnitAdaptation>newArrayList()));
 	}
 
 	/**
@@ -344,6 +544,28 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	@Override
 	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
 		switch (featureID) {
+			case HintcoPackage.CANDIDATE_SCENARIO__PRECEDES:
+				return ((InternalEList<InternalEObject>)(InternalEList<?>)getPrecedes()).basicAdd(otherEnd, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__SUCCEEDS:
+				return ((InternalEList<InternalEObject>)(InternalEList<?>)getSucceeds()).basicAdd(otherEnd, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__BEFORE:
+				if (before != null)
+					msgs = ((InternalEObject)before).eInverseRemove(this, HintcoPackage.PRECENDENCE_NODE__AFTER, PrecendenceNode.class, msgs);
+				return basicSetBefore((PrecendenceNode)otherEnd, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__AFTER:
+				if (after != null)
+					msgs = ((InternalEObject)after).eInverseRemove(this, HintcoPackage.PRECENDENCE_NODE__BEFORE, PrecendenceNode.class, msgs);
+				return basicSetAfter((PrecendenceNode)otherEnd, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__SCENARIO:
+				if (eInternalContainer() != null)
+					msgs = eBasicRemoveFromContainer(msgs);
+				return basicSetScenario((CandidateScenario)otherEnd, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION:
+				if (adaptation != null)
+					msgs = ((InternalEObject)adaptation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION, null, msgs);
+				return basicSetAdaptation((UnitAdaptation)otherEnd, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__PORTS:
+				return ((InternalEList<InternalEObject>)(InternalEList<?>)getPorts()).basicAdd(otherEnd, msgs);
 			case HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS:
 				return ((InternalEList<InternalEObject>)(InternalEList<?>)getCosimunits()).basicAdd(otherEnd, msgs);
 		}
@@ -358,12 +580,40 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 	@Override
 	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
 		switch (featureID) {
+			case HintcoPackage.CANDIDATE_SCENARIO__PRECEDES:
+				return ((InternalEList<?>)getPrecedes()).basicRemove(otherEnd, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__SUCCEEDS:
+				return ((InternalEList<?>)getSucceeds()).basicRemove(otherEnd, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__BEFORE:
+				return basicSetBefore(null, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__AFTER:
+				return basicSetAfter(null, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__SCENARIO:
+				return basicSetScenario(null, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION:
+				return basicSetAdaptation(null, msgs);
+			case HintcoPackage.CANDIDATE_SCENARIO__PORTS:
+				return ((InternalEList<?>)getPorts()).basicRemove(otherEnd, msgs);
 			case HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS:
 				return ((InternalEList<?>)getCosimunits()).basicRemove(otherEnd, msgs);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+		switch (eContainerFeatureID()) {
+			case HintcoPackage.CANDIDATE_SCENARIO__SCENARIO:
+				return eInternalContainer().eInverseRemove(this, HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS, CandidateScenario.class, msgs);
+		}
+		return super.eBasicRemoveFromContainerFeature(msgs);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -378,16 +628,25 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 				return isSelected();
 			case HintcoPackage.CANDIDATE_SCENARIO__IMPLIES:
 				return getImplies();
+			case HintcoPackage.CANDIDATE_SCENARIO__PRECEDES:
+				return getPrecedes();
+			case HintcoPackage.CANDIDATE_SCENARIO__SUCCEEDS:
+				return getSucceeds();
+			case HintcoPackage.CANDIDATE_SCENARIO__BEFORE:
+				if (resolve) return getBefore();
+				return basicGetBefore();
+			case HintcoPackage.CANDIDATE_SCENARIO__AFTER:
+				if (resolve) return getAfter();
+				return basicGetAfter();
+			case HintcoPackage.CANDIDATE_SCENARIO__SCENARIO:
+				if (resolve) return getScenario();
+				return basicGetScenario();
+			case HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION:
+				return getAdaptation();
+			case HintcoPackage.CANDIDATE_SCENARIO__PORTS:
+				return getPorts();
 			case HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS:
 				return getCosimunits();
-			case HintcoPackage.CANDIDATE_SCENARIO__NAME:
-				return getName();
-			case HintcoPackage.CANDIDATE_SCENARIO__STOP_TIME:
-				return getStopTime();
-			case HintcoPackage.CANDIDATE_SCENARIO__STEP_SIZE:
-				return getStepSize();
-			case HintcoPackage.CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE:
-				return getOutputStepSize();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -411,18 +670,33 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 				getImplies().clear();
 				getImplies().addAll((Collection<? extends Alternative>)newValue);
 				return;
-			case HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS:
-				getCosimunits().clear();
-				getCosimunits().addAll((Collection<? extends CosimUnitInstance>)newValue);
+			case HintcoPackage.CANDIDATE_SCENARIO__PRECEDES:
+				getPrecedes().clear();
+				getPrecedes().addAll((Collection<? extends PrecendenceNode>)newValue);
+				return;
+			case HintcoPackage.CANDIDATE_SCENARIO__SUCCEEDS:
+				getSucceeds().clear();
+				getSucceeds().addAll((Collection<? extends PrecendenceNode>)newValue);
+				return;
+			case HintcoPackage.CANDIDATE_SCENARIO__BEFORE:
+				setBefore((PrecendenceNode)newValue);
 				return;
-			case HintcoPackage.CANDIDATE_SCENARIO__STOP_TIME:
-				setStopTime((Double)newValue);
+			case HintcoPackage.CANDIDATE_SCENARIO__AFTER:
+				setAfter((PrecendenceNode)newValue);
 				return;
-			case HintcoPackage.CANDIDATE_SCENARIO__STEP_SIZE:
-				setStepSize((Double)newValue);
+			case HintcoPackage.CANDIDATE_SCENARIO__SCENARIO:
+				setScenario((CandidateScenario)newValue);
 				return;
-			case HintcoPackage.CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE:
-				setOutputStepSize((Double)newValue);
+			case HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION:
+				setAdaptation((UnitAdaptation)newValue);
+				return;
+			case HintcoPackage.CANDIDATE_SCENARIO__PORTS:
+				getPorts().clear();
+				getPorts().addAll((Collection<? extends PortInstance>)newValue);
+				return;
+			case HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS:
+				getCosimunits().clear();
+				getCosimunits().addAll((Collection<? extends UnitInstance>)newValue);
 				return;
 		}
 		super.eSet(featureID, newValue);
@@ -445,17 +719,29 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 			case HintcoPackage.CANDIDATE_SCENARIO__IMPLIES:
 				getImplies().clear();
 				return;
-			case HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS:
-				getCosimunits().clear();
+			case HintcoPackage.CANDIDATE_SCENARIO__PRECEDES:
+				getPrecedes().clear();
+				return;
+			case HintcoPackage.CANDIDATE_SCENARIO__SUCCEEDS:
+				getSucceeds().clear();
+				return;
+			case HintcoPackage.CANDIDATE_SCENARIO__BEFORE:
+				setBefore((PrecendenceNode)null);
 				return;
-			case HintcoPackage.CANDIDATE_SCENARIO__STOP_TIME:
-				setStopTime(STOP_TIME_EDEFAULT);
+			case HintcoPackage.CANDIDATE_SCENARIO__AFTER:
+				setAfter((PrecendenceNode)null);
 				return;
-			case HintcoPackage.CANDIDATE_SCENARIO__STEP_SIZE:
-				setStepSize(STEP_SIZE_EDEFAULT);
+			case HintcoPackage.CANDIDATE_SCENARIO__SCENARIO:
+				setScenario((CandidateScenario)null);
 				return;
-			case HintcoPackage.CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE:
-				setOutputStepSize(OUTPUT_STEP_SIZE_EDEFAULT);
+			case HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION:
+				setAdaptation((UnitAdaptation)null);
+				return;
+			case HintcoPackage.CANDIDATE_SCENARIO__PORTS:
+				getPorts().clear();
+				return;
+			case HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS:
+				getCosimunits().clear();
 				return;
 		}
 		super.eUnset(featureID);
@@ -475,16 +761,22 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 				return selected != SELECTED_EDEFAULT;
 			case HintcoPackage.CANDIDATE_SCENARIO__IMPLIES:
 				return implies != null && !implies.isEmpty();
+			case HintcoPackage.CANDIDATE_SCENARIO__PRECEDES:
+				return precedes != null && !precedes.isEmpty();
+			case HintcoPackage.CANDIDATE_SCENARIO__SUCCEEDS:
+				return succeeds != null && !succeeds.isEmpty();
+			case HintcoPackage.CANDIDATE_SCENARIO__BEFORE:
+				return before != null;
+			case HintcoPackage.CANDIDATE_SCENARIO__AFTER:
+				return after != null;
+			case HintcoPackage.CANDIDATE_SCENARIO__SCENARIO:
+				return basicGetScenario() != null;
+			case HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION:
+				return adaptation != null;
+			case HintcoPackage.CANDIDATE_SCENARIO__PORTS:
+				return ports != null && !ports.isEmpty();
 			case HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS:
 				return cosimunits != null && !cosimunits.isEmpty();
-			case HintcoPackage.CANDIDATE_SCENARIO__NAME:
-				return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName());
-			case HintcoPackage.CANDIDATE_SCENARIO__STOP_TIME:
-				return stopTime != STOP_TIME_EDEFAULT;
-			case HintcoPackage.CANDIDATE_SCENARIO__STEP_SIZE:
-				return stepSize != STEP_SIZE_EDEFAULT;
-			case HintcoPackage.CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE:
-				return outputStepSize != OUTPUT_STEP_SIZE_EDEFAULT;
 		}
 		return super.eIsSet(featureID);
 	}
@@ -504,6 +796,23 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 				default: return -1;
 			}
 		}
+		if (baseClass == PrecendenceNode.class) {
+			switch (derivedFeatureID) {
+				case HintcoPackage.CANDIDATE_SCENARIO__PRECEDES: return HintcoPackage.PRECENDENCE_NODE__PRECEDES;
+				case HintcoPackage.CANDIDATE_SCENARIO__SUCCEEDS: return HintcoPackage.PRECENDENCE_NODE__SUCCEEDS;
+				case HintcoPackage.CANDIDATE_SCENARIO__BEFORE: return HintcoPackage.PRECENDENCE_NODE__BEFORE;
+				case HintcoPackage.CANDIDATE_SCENARIO__AFTER: return HintcoPackage.PRECENDENCE_NODE__AFTER;
+				default: return -1;
+			}
+		}
+		if (baseClass == UnitInstance.class) {
+			switch (derivedFeatureID) {
+				case HintcoPackage.CANDIDATE_SCENARIO__SCENARIO: return HintcoPackage.UNIT_INSTANCE__SCENARIO;
+				case HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION: return HintcoPackage.UNIT_INSTANCE__ADAPTATION;
+				case HintcoPackage.CANDIDATE_SCENARIO__PORTS: return HintcoPackage.UNIT_INSTANCE__PORTS;
+				default: return -1;
+			}
+		}
 		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
 	}
 
@@ -522,9 +831,66 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 				default: return -1;
 			}
 		}
+		if (baseClass == PrecendenceNode.class) {
+			switch (baseFeatureID) {
+				case HintcoPackage.PRECENDENCE_NODE__PRECEDES: return HintcoPackage.CANDIDATE_SCENARIO__PRECEDES;
+				case HintcoPackage.PRECENDENCE_NODE__SUCCEEDS: return HintcoPackage.CANDIDATE_SCENARIO__SUCCEEDS;
+				case HintcoPackage.PRECENDENCE_NODE__BEFORE: return HintcoPackage.CANDIDATE_SCENARIO__BEFORE;
+				case HintcoPackage.PRECENDENCE_NODE__AFTER: return HintcoPackage.CANDIDATE_SCENARIO__AFTER;
+				default: return -1;
+			}
+		}
+		if (baseClass == UnitInstance.class) {
+			switch (baseFeatureID) {
+				case HintcoPackage.UNIT_INSTANCE__SCENARIO: return HintcoPackage.CANDIDATE_SCENARIO__SCENARIO;
+				case HintcoPackage.UNIT_INSTANCE__ADAPTATION: return HintcoPackage.CANDIDATE_SCENARIO__ADAPTATION;
+				case HintcoPackage.UNIT_INSTANCE__PORTS: return HintcoPackage.CANDIDATE_SCENARIO__PORTS;
+				default: return -1;
+			}
+		}
 		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) {
+		if (baseClass == Alternative.class) {
+			switch (baseOperationID) {
+				default: return -1;
+			}
+		}
+		if (baseClass == PrecendenceNode.class) {
+			switch (baseOperationID) {
+				default: return -1;
+			}
+		}
+		if (baseClass == UnitInstance.class) {
+			switch (baseOperationID) {
+				case HintcoPackage.UNIT_INSTANCE___SELECTED_ADAPTATIONS: return HintcoPackage.CANDIDATE_SCENARIO___SELECTED_ADAPTATIONS;
+				default: return -1;
+			}
+		}
+		return super.eDerivedOperationID(baseOperationID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+		switch (operationID) {
+			case HintcoPackage.CANDIDATE_SCENARIO___SELECTED_ADAPTATIONS:
+				return selectedAdaptations();
+		}
+		return super.eInvoke(operationID, arguments);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -539,12 +905,6 @@ public class CandidateScenarioImpl extends IDedImpl implements CandidateScenario
 		result.append(weight);
 		result.append(", selected: ");
 		result.append(selected);
-		result.append(", stopTime: ");
-		result.append(stopTime);
-		result.append(", stepSize: ");
-		result.append(stepSize);
-		result.append(", outputStepSize: ");
-		result.append(outputStepSize);
 		result.append(')');
 		return result.toString();
 	}

+ 5 - 5
HintCO/src-gen/ua/ansymo/hintco/impl/CandidatesImpl.java

@@ -18,10 +18,10 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.InternalEList;
 
-import ua.ansymo.hintco.CandidateScenario;
 import ua.ansymo.hintco.Candidates;
 import ua.ansymo.hintco.CosimUnitDeclaration;
 import ua.ansymo.hintco.HintcoPackage;
+import ua.ansymo.hintco.RootCandidateScenario;
 import ua.ansymo.hintco.VariantDiagram;
 
 /**
@@ -49,7 +49,7 @@ public class CandidatesImpl extends MinimalEObjectImpl.Container implements Cand
 	 * @generated
 	 * @ordered
 	 */
-	protected EList<CandidateScenario> candidates;
+	protected EList<RootCandidateScenario> candidates;
 
 	/**
 	 * The cached value of the '{@link #getCsuDeclarations() <em>Csu Declarations</em>}' containment reference list.
@@ -105,9 +105,9 @@ public class CandidatesImpl extends MinimalEObjectImpl.Container implements Cand
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EList<CandidateScenario> getCandidates() {
+	public EList<RootCandidateScenario> getCandidates() {
 		if (candidates == null) {
-			candidates = new EObjectContainmentEList<CandidateScenario>(CandidateScenario.class, this, HintcoPackage.CANDIDATES__CANDIDATES);
+			candidates = new EObjectContainmentEList<RootCandidateScenario>(RootCandidateScenario.class, this, HintcoPackage.CANDIDATES__CANDIDATES);
 		}
 		return candidates;
 	}
@@ -224,7 +224,7 @@ public class CandidatesImpl extends MinimalEObjectImpl.Container implements Cand
 		switch (featureID) {
 			case HintcoPackage.CANDIDATES__CANDIDATES:
 				getCandidates().clear();
-				getCandidates().addAll((Collection<? extends CandidateScenario>)newValue);
+				getCandidates().addAll((Collection<? extends RootCandidateScenario>)newValue);
 				return;
 			case HintcoPackage.CANDIDATES__CSU_DECLARATIONS:
 				getCsuDeclarations().clear();

+ 0 - 59
HintCO/src-gen/ua/ansymo/hintco/impl/CosimUnitDeclarationImpl.java

@@ -2,24 +2,14 @@
  */
 package ua.ansymo.hintco.impl;
 
-import java.util.Collection;
-
 import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
 import ua.ansymo.hintco.CosimUnitDeclaration;
 import ua.ansymo.hintco.HintcoPackage;
-import ua.ansymo.hintco.PortDeclaration;
 
 /**
  * <!-- begin-user-doc -->
@@ -29,7 +19,6 @@ import ua.ansymo.hintco.PortDeclaration;
  * The following features are implemented:
  * </p>
  * <ul>
- *   <li>{@link ua.ansymo.hintco.impl.CosimUnitDeclarationImpl#getPorts <em>Ports</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.CosimUnitDeclarationImpl#getPath <em>Path</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.CosimUnitDeclarationImpl#getGuid <em>Guid</em>}</li>
  * </ul>
@@ -37,16 +26,6 @@ import ua.ansymo.hintco.PortDeclaration;
  * @generated
  */
 public class CosimUnitDeclarationImpl extends IDedImpl implements CosimUnitDeclaration {
-	/**
-	 * The cached value of the '{@link #getPorts() <em>Ports</em>}' containment reference list.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getPorts()
-	 * @generated
-	 * @ordered
-	 */
-	protected EList<PortDeclaration> ports;
-
 	/**
 	 * The default value of the '{@link #getPath() <em>Path</em>}' attribute.
 	 * <!-- begin-user-doc -->
@@ -106,18 +85,6 @@ public class CosimUnitDeclarationImpl extends IDedImpl implements CosimUnitDecla
 		return HintcoPackage.Literals.COSIM_UNIT_DECLARATION;
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EList<PortDeclaration> getPorts() {
-		if (ports == null) {
-			ports = new EObjectContainmentEList<PortDeclaration>(PortDeclaration.class, this, HintcoPackage.COSIM_UNIT_DECLARATION__PORTS);
-		}
-		return ports;
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -160,20 +127,6 @@ public class CosimUnitDeclarationImpl extends IDedImpl implements CosimUnitDecla
 			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.COSIM_UNIT_DECLARATION__GUID, oldGuid, guid));
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
-		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_DECLARATION__PORTS:
-				return ((InternalEList<?>)getPorts()).basicRemove(otherEnd, msgs);
-		}
-		return super.eInverseRemove(otherEnd, featureID, msgs);
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -182,8 +135,6 @@ public class CosimUnitDeclarationImpl extends IDedImpl implements CosimUnitDecla
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_DECLARATION__PORTS:
-				return getPorts();
 			case HintcoPackage.COSIM_UNIT_DECLARATION__PATH:
 				return getPath();
 			case HintcoPackage.COSIM_UNIT_DECLARATION__GUID:
@@ -197,14 +148,9 @@ public class CosimUnitDeclarationImpl extends IDedImpl implements CosimUnitDecla
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	@SuppressWarnings("unchecked")
 	@Override
 	public void eSet(int featureID, Object newValue) {
 		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_DECLARATION__PORTS:
-				getPorts().clear();
-				getPorts().addAll((Collection<? extends PortDeclaration>)newValue);
-				return;
 			case HintcoPackage.COSIM_UNIT_DECLARATION__PATH:
 				setPath((String)newValue);
 				return;
@@ -223,9 +169,6 @@ public class CosimUnitDeclarationImpl extends IDedImpl implements CosimUnitDecla
 	@Override
 	public void eUnset(int featureID) {
 		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_DECLARATION__PORTS:
-				getPorts().clear();
-				return;
 			case HintcoPackage.COSIM_UNIT_DECLARATION__PATH:
 				setPath(PATH_EDEFAULT);
 				return;
@@ -244,8 +187,6 @@ public class CosimUnitDeclarationImpl extends IDedImpl implements CosimUnitDecla
 	@Override
 	public boolean eIsSet(int featureID) {
 		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_DECLARATION__PORTS:
-				return ports != null && !ports.isEmpty();
 			case HintcoPackage.COSIM_UNIT_DECLARATION__PATH:
 				return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path);
 			case HintcoPackage.COSIM_UNIT_DECLARATION__GUID:

+ 1 - 564
HintCO/src-gen/ua/ansymo/hintco/impl/CosimUnitInstanceImpl.java

@@ -2,34 +2,16 @@
  */
 package ua.ansymo.hintco.impl;
 
-import java.lang.reflect.InvocationTargetException;
-
-import java.util.Collection;
-
 import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
-import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import ua.ansymo.hintco.CandidateScenario;
 import ua.ansymo.hintco.CosimUnitDeclaration;
 import ua.ansymo.hintco.CosimUnitInstance;
-import ua.ansymo.hintco.DecompositionUnitAdaptation;
 import ua.ansymo.hintco.HintcoPackage;
-import ua.ansymo.hintco.PortInstance;
-import ua.ansymo.hintco.PrecendenceNode;
-import ua.ansymo.hintco.UnitAdaptation;
 
 /**
  * <!-- begin-user-doc -->
@@ -39,69 +21,12 @@ import ua.ansymo.hintco.UnitAdaptation;
  * The following features are implemented:
  * </p>
  * <ul>
- *   <li>{@link ua.ansymo.hintco.impl.CosimUnitInstanceImpl#getPrecedes <em>Precedes</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.CosimUnitInstanceImpl#getSucceeds <em>Succeeds</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.CosimUnitInstanceImpl#getBefore <em>Before</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.CosimUnitInstanceImpl#getAfter <em>After</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.CosimUnitInstanceImpl#getAdaptation <em>Adaptation</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.CosimUnitInstanceImpl#getDeclaration <em>Declaration</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.CosimUnitInstanceImpl#getPorts <em>Ports</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.CosimUnitInstanceImpl#getScenario <em>Scenario</em>}</li>
  * </ul>
  *
  * @generated
  */
-public class CosimUnitInstanceImpl extends IDedImpl implements CosimUnitInstance {
-	/**
-	 * The cached value of the '{@link #getPrecedes() <em>Precedes</em>}' reference list.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getPrecedes()
-	 * @generated
-	 * @ordered
-	 */
-	protected EList<PrecendenceNode> precedes;
-
-	/**
-	 * The cached value of the '{@link #getSucceeds() <em>Succeeds</em>}' reference list.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getSucceeds()
-	 * @generated
-	 * @ordered
-	 */
-	protected EList<PrecendenceNode> succeeds;
-
-	/**
-	 * The cached value of the '{@link #getBefore() <em>Before</em>}' reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getBefore()
-	 * @generated
-	 * @ordered
-	 */
-	protected PrecendenceNode before;
-
-	/**
-	 * The cached value of the '{@link #getAfter() <em>After</em>}' reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getAfter()
-	 * @generated
-	 * @ordered
-	 */
-	protected PrecendenceNode after;
-
-	/**
-	 * The cached value of the '{@link #getAdaptation() <em>Adaptation</em>}' containment reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getAdaptation()
-	 * @generated
-	 * @ordered
-	 */
-	protected UnitAdaptation adaptation;
-
+public class CosimUnitInstanceImpl extends UnitInstanceImpl implements CosimUnitInstance {
 	/**
 	 * The cached value of the '{@link #getDeclaration() <em>Declaration</em>}' reference.
 	 * <!-- begin-user-doc -->
@@ -112,16 +37,6 @@ public class CosimUnitInstanceImpl extends IDedImpl implements CosimUnitInstance
 	 */
 	protected CosimUnitDeclaration declaration;
 
-	/**
-	 * The cached value of the '{@link #getPorts() <em>Ports</em>}' containment reference list.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getPorts()
-	 * @generated
-	 * @ordered
-	 */
-	protected EList<PortInstance> ports;
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -141,193 +56,6 @@ public class CosimUnitInstanceImpl extends IDedImpl implements CosimUnitInstance
 		return HintcoPackage.Literals.COSIM_UNIT_INSTANCE;
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EList<PrecendenceNode> getPrecedes() {
-		if (precedes == null) {
-			precedes = new EObjectWithInverseResolvingEList.ManyInverse<PrecendenceNode>(PrecendenceNode.class, this, HintcoPackage.COSIM_UNIT_INSTANCE__PRECEDES, HintcoPackage.PRECENDENCE_NODE__SUCCEEDS);
-		}
-		return precedes;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EList<PrecendenceNode> getSucceeds() {
-		if (succeeds == null) {
-			succeeds = new EObjectWithInverseResolvingEList.ManyInverse<PrecendenceNode>(PrecendenceNode.class, this, HintcoPackage.COSIM_UNIT_INSTANCE__SUCCEEDS, HintcoPackage.PRECENDENCE_NODE__PRECEDES);
-		}
-		return succeeds;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public PrecendenceNode getBefore() {
-		if (before != null && before.eIsProxy()) {
-			InternalEObject oldBefore = (InternalEObject)before;
-			before = (PrecendenceNode)eResolveProxy(oldBefore);
-			if (before != oldBefore) {
-				if (eNotificationRequired())
-					eNotify(new ENotificationImpl(this, Notification.RESOLVE, HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE, oldBefore, before));
-			}
-		}
-		return before;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public PrecendenceNode basicGetBefore() {
-		return before;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public NotificationChain basicSetBefore(PrecendenceNode newBefore, NotificationChain msgs) {
-		PrecendenceNode oldBefore = before;
-		before = newBefore;
-		if (eNotificationRequired()) {
-			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE, oldBefore, newBefore);
-			if (msgs == null) msgs = notification; else msgs.add(notification);
-		}
-		return msgs;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public void setBefore(PrecendenceNode newBefore) {
-		if (newBefore != before) {
-			NotificationChain msgs = null;
-			if (before != null)
-				msgs = ((InternalEObject)before).eInverseRemove(this, HintcoPackage.PRECENDENCE_NODE__AFTER, PrecendenceNode.class, msgs);
-			if (newBefore != null)
-				msgs = ((InternalEObject)newBefore).eInverseAdd(this, HintcoPackage.PRECENDENCE_NODE__AFTER, PrecendenceNode.class, msgs);
-			msgs = basicSetBefore(newBefore, msgs);
-			if (msgs != null) msgs.dispatch();
-		}
-		else if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE, newBefore, newBefore));
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public PrecendenceNode getAfter() {
-		if (after != null && after.eIsProxy()) {
-			InternalEObject oldAfter = (InternalEObject)after;
-			after = (PrecendenceNode)eResolveProxy(oldAfter);
-			if (after != oldAfter) {
-				if (eNotificationRequired())
-					eNotify(new ENotificationImpl(this, Notification.RESOLVE, HintcoPackage.COSIM_UNIT_INSTANCE__AFTER, oldAfter, after));
-			}
-		}
-		return after;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public PrecendenceNode basicGetAfter() {
-		return after;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public NotificationChain basicSetAfter(PrecendenceNode newAfter, NotificationChain msgs) {
-		PrecendenceNode oldAfter = after;
-		after = newAfter;
-		if (eNotificationRequired()) {
-			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, HintcoPackage.COSIM_UNIT_INSTANCE__AFTER, oldAfter, newAfter);
-			if (msgs == null) msgs = notification; else msgs.add(notification);
-		}
-		return msgs;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public void setAfter(PrecendenceNode newAfter) {
-		if (newAfter != after) {
-			NotificationChain msgs = null;
-			if (after != null)
-				msgs = ((InternalEObject)after).eInverseRemove(this, HintcoPackage.PRECENDENCE_NODE__BEFORE, PrecendenceNode.class, msgs);
-			if (newAfter != null)
-				msgs = ((InternalEObject)newAfter).eInverseAdd(this, HintcoPackage.PRECENDENCE_NODE__BEFORE, PrecendenceNode.class, msgs);
-			msgs = basicSetAfter(newAfter, msgs);
-			if (msgs != null) msgs.dispatch();
-		}
-		else if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.COSIM_UNIT_INSTANCE__AFTER, newAfter, newAfter));
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public UnitAdaptation getAdaptation() {
-		return adaptation;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public NotificationChain basicSetAdaptation(UnitAdaptation newAdaptation, NotificationChain msgs) {
-		UnitAdaptation oldAdaptation = adaptation;
-		adaptation = newAdaptation;
-		if (eNotificationRequired()) {
-			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, HintcoPackage.COSIM_UNIT_INSTANCE__ADAPTATION, oldAdaptation, newAdaptation);
-			if (msgs == null) msgs = notification; else msgs.add(notification);
-		}
-		return msgs;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public void setAdaptation(UnitAdaptation newAdaptation) {
-		if (newAdaptation != adaptation) {
-			NotificationChain msgs = null;
-			if (adaptation != null)
-				msgs = ((InternalEObject)adaptation).eInverseRemove(this, HintcoPackage.UNIT_ADAPTATION__UNIT, UnitAdaptation.class, msgs);
-			if (newAdaptation != null)
-				msgs = ((InternalEObject)newAdaptation).eInverseAdd(this, HintcoPackage.UNIT_ADAPTATION__UNIT, UnitAdaptation.class, msgs);
-			msgs = basicSetAdaptation(newAdaptation, msgs);
-			if (msgs != null) msgs.dispatch();
-		}
-		else if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.COSIM_UNIT_INSTANCE__ADAPTATION, newAdaptation, newAdaptation));
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -366,168 +94,6 @@ public class CosimUnitInstanceImpl extends IDedImpl implements CosimUnitInstance
 			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.COSIM_UNIT_INSTANCE__DECLARATION, oldDeclaration, declaration));
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EList<PortInstance> getPorts() {
-		if (ports == null) {
-			ports = new EObjectContainmentWithInverseEList<PortInstance>(PortInstance.class, this, HintcoPackage.COSIM_UNIT_INSTANCE__PORTS, HintcoPackage.PORT_INSTANCE__UNIT);
-		}
-		return ports;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public CandidateScenario getScenario() {
-		if (eContainerFeatureID() != HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO) return null;
-		return (CandidateScenario)eContainer();
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public CandidateScenario basicGetScenario() {
-		if (eContainerFeatureID() != HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO) return null;
-		return (CandidateScenario)eInternalContainer();
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public NotificationChain basicSetScenario(CandidateScenario newScenario, NotificationChain msgs) {
-		msgs = eBasicSetContainer((InternalEObject)newScenario, HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO, msgs);
-		return msgs;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public void setScenario(CandidateScenario newScenario) {
-		if (newScenario != eInternalContainer() || (eContainerFeatureID() != HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO && newScenario != null)) {
-			if (EcoreUtil.isAncestor(this, newScenario))
-				throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
-			NotificationChain msgs = null;
-			if (eInternalContainer() != null)
-				msgs = eBasicRemoveFromContainer(msgs);
-			if (newScenario != null)
-				msgs = ((InternalEObject)newScenario).eInverseAdd(this, HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS, CandidateScenario.class, msgs);
-			msgs = basicSetScenario(newScenario, msgs);
-			if (msgs != null) msgs.dispatch();
-		}
-		else if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO, newScenario, newScenario));
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EList<UnitAdaptation> selectedAdaptations() {
-		UnitAdaptation _adaptation = this.getAdaptation();
-		boolean _tripleEquals = (_adaptation == null);
-		if (_tripleEquals) {
-			return new BasicEList<UnitAdaptation>(java.util.Collections.<UnitAdaptation>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<UnitAdaptation>newArrayList()));
-		}
-		boolean _isSelected = this.getAdaptation().isSelected();
-		if (_isSelected) {
-			UnitAdaptation _adaptation_1 = this.getAdaptation();
-			if ((_adaptation_1 instanceof DecompositionUnitAdaptation)) {
-				UnitAdaptation _adaptation_2 = this.getAdaptation();
-				return ((DecompositionUnitAdaptation) _adaptation_2).selectedAdaptations();
-			}
-			UnitAdaptation _adaptation_3 = this.getAdaptation();
-			return new BasicEList<UnitAdaptation>(java.util.Collections.<UnitAdaptation>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<UnitAdaptation>newArrayList(_adaptation_3)));
-		}
-		return new BasicEList<UnitAdaptation>(java.util.Collections.<UnitAdaptation>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<UnitAdaptation>newArrayList()));
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@SuppressWarnings("unchecked")
-	@Override
-	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
-		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PRECEDES:
-				return ((InternalEList<InternalEObject>)(InternalEList<?>)getPrecedes()).basicAdd(otherEnd, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SUCCEEDS:
-				return ((InternalEList<InternalEObject>)(InternalEList<?>)getSucceeds()).basicAdd(otherEnd, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE:
-				if (before != null)
-					msgs = ((InternalEObject)before).eInverseRemove(this, HintcoPackage.PRECENDENCE_NODE__AFTER, PrecendenceNode.class, msgs);
-				return basicSetBefore((PrecendenceNode)otherEnd, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__AFTER:
-				if (after != null)
-					msgs = ((InternalEObject)after).eInverseRemove(this, HintcoPackage.PRECENDENCE_NODE__BEFORE, PrecendenceNode.class, msgs);
-				return basicSetAfter((PrecendenceNode)otherEnd, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__ADAPTATION:
-				if (adaptation != null)
-					msgs = ((InternalEObject)adaptation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - HintcoPackage.COSIM_UNIT_INSTANCE__ADAPTATION, null, msgs);
-				return basicSetAdaptation((UnitAdaptation)otherEnd, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PORTS:
-				return ((InternalEList<InternalEObject>)(InternalEList<?>)getPorts()).basicAdd(otherEnd, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO:
-				if (eInternalContainer() != null)
-					msgs = eBasicRemoveFromContainer(msgs);
-				return basicSetScenario((CandidateScenario)otherEnd, msgs);
-		}
-		return super.eInverseAdd(otherEnd, featureID, msgs);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
-		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PRECEDES:
-				return ((InternalEList<?>)getPrecedes()).basicRemove(otherEnd, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SUCCEEDS:
-				return ((InternalEList<?>)getSucceeds()).basicRemove(otherEnd, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE:
-				return basicSetBefore(null, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__AFTER:
-				return basicSetAfter(null, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__ADAPTATION:
-				return basicSetAdaptation(null, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PORTS:
-				return ((InternalEList<?>)getPorts()).basicRemove(otherEnd, msgs);
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO:
-				return basicSetScenario(null, msgs);
-		}
-		return super.eInverseRemove(otherEnd, featureID, msgs);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
-		switch (eContainerFeatureID()) {
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO:
-				return eInternalContainer().eInverseRemove(this, HintcoPackage.CANDIDATE_SCENARIO__COSIMUNITS, CandidateScenario.class, msgs);
-		}
-		return super.eBasicRemoveFromContainerFeature(msgs);
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -536,26 +102,9 @@ public class CosimUnitInstanceImpl extends IDedImpl implements CosimUnitInstance
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PRECEDES:
-				return getPrecedes();
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SUCCEEDS:
-				return getSucceeds();
-			case HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE:
-				if (resolve) return getBefore();
-				return basicGetBefore();
-			case HintcoPackage.COSIM_UNIT_INSTANCE__AFTER:
-				if (resolve) return getAfter();
-				return basicGetAfter();
-			case HintcoPackage.COSIM_UNIT_INSTANCE__ADAPTATION:
-				return getAdaptation();
 			case HintcoPackage.COSIM_UNIT_INSTANCE__DECLARATION:
 				if (resolve) return getDeclaration();
 				return basicGetDeclaration();
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PORTS:
-				return getPorts();
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO:
-				if (resolve) return getScenario();
-				return basicGetScenario();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -565,37 +114,12 @@ public class CosimUnitInstanceImpl extends IDedImpl implements CosimUnitInstance
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	@SuppressWarnings("unchecked")
 	@Override
 	public void eSet(int featureID, Object newValue) {
 		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PRECEDES:
-				getPrecedes().clear();
-				getPrecedes().addAll((Collection<? extends PrecendenceNode>)newValue);
-				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SUCCEEDS:
-				getSucceeds().clear();
-				getSucceeds().addAll((Collection<? extends PrecendenceNode>)newValue);
-				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE:
-				setBefore((PrecendenceNode)newValue);
-				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__AFTER:
-				setAfter((PrecendenceNode)newValue);
-				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__ADAPTATION:
-				setAdaptation((UnitAdaptation)newValue);
-				return;
 			case HintcoPackage.COSIM_UNIT_INSTANCE__DECLARATION:
 				setDeclaration((CosimUnitDeclaration)newValue);
 				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PORTS:
-				getPorts().clear();
-				getPorts().addAll((Collection<? extends PortInstance>)newValue);
-				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO:
-				setScenario((CandidateScenario)newValue);
-				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -608,30 +132,9 @@ public class CosimUnitInstanceImpl extends IDedImpl implements CosimUnitInstance
 	@Override
 	public void eUnset(int featureID) {
 		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PRECEDES:
-				getPrecedes().clear();
-				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SUCCEEDS:
-				getSucceeds().clear();
-				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE:
-				setBefore((PrecendenceNode)null);
-				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__AFTER:
-				setAfter((PrecendenceNode)null);
-				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__ADAPTATION:
-				setAdaptation((UnitAdaptation)null);
-				return;
 			case HintcoPackage.COSIM_UNIT_INSTANCE__DECLARATION:
 				setDeclaration((CosimUnitDeclaration)null);
 				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PORTS:
-				getPorts().clear();
-				return;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO:
-				setScenario((CandidateScenario)null);
-				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -644,76 +147,10 @@ public class CosimUnitInstanceImpl extends IDedImpl implements CosimUnitInstance
 	@Override
 	public boolean eIsSet(int featureID) {
 		switch (featureID) {
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PRECEDES:
-				return precedes != null && !precedes.isEmpty();
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SUCCEEDS:
-				return succeeds != null && !succeeds.isEmpty();
-			case HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE:
-				return before != null;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__AFTER:
-				return after != null;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__ADAPTATION:
-				return adaptation != null;
 			case HintcoPackage.COSIM_UNIT_INSTANCE__DECLARATION:
 				return declaration != null;
-			case HintcoPackage.COSIM_UNIT_INSTANCE__PORTS:
-				return ports != null && !ports.isEmpty();
-			case HintcoPackage.COSIM_UNIT_INSTANCE__SCENARIO:
-				return basicGetScenario() != null;
 		}
 		return super.eIsSet(featureID);
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
-		if (baseClass == PrecendenceNode.class) {
-			switch (derivedFeatureID) {
-				case HintcoPackage.COSIM_UNIT_INSTANCE__PRECEDES: return HintcoPackage.PRECENDENCE_NODE__PRECEDES;
-				case HintcoPackage.COSIM_UNIT_INSTANCE__SUCCEEDS: return HintcoPackage.PRECENDENCE_NODE__SUCCEEDS;
-				case HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE: return HintcoPackage.PRECENDENCE_NODE__BEFORE;
-				case HintcoPackage.COSIM_UNIT_INSTANCE__AFTER: return HintcoPackage.PRECENDENCE_NODE__AFTER;
-				default: return -1;
-			}
-		}
-		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
-		if (baseClass == PrecendenceNode.class) {
-			switch (baseFeatureID) {
-				case HintcoPackage.PRECENDENCE_NODE__PRECEDES: return HintcoPackage.COSIM_UNIT_INSTANCE__PRECEDES;
-				case HintcoPackage.PRECENDENCE_NODE__SUCCEEDS: return HintcoPackage.COSIM_UNIT_INSTANCE__SUCCEEDS;
-				case HintcoPackage.PRECENDENCE_NODE__BEFORE: return HintcoPackage.COSIM_UNIT_INSTANCE__BEFORE;
-				case HintcoPackage.PRECENDENCE_NODE__AFTER: return HintcoPackage.COSIM_UNIT_INSTANCE__AFTER;
-				default: return -1;
-			}
-		}
-		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
-		switch (operationID) {
-			case HintcoPackage.COSIM_UNIT_INSTANCE___SELECTED_ADAPTATIONS:
-				return selectedAdaptations();
-		}
-		return super.eInvoke(operationID, arguments);
-	}
-
 } //CosimUnitInstanceImpl

+ 0 - 150
HintCO/src-gen/ua/ansymo/hintco/impl/HierarchicalCosimUnitDeclarationImpl.java

@@ -1,150 +0,0 @@
-/**
- */
-package ua.ansymo.hintco.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import ua.ansymo.hintco.CosimUnitInstance;
-import ua.ansymo.hintco.HierarchicalCosimUnitDeclaration;
-import ua.ansymo.hintco.HintcoPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Hierarchical Cosim Unit Declaration</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- *   <li>{@link ua.ansymo.hintco.impl.HierarchicalCosimUnitDeclarationImpl#getChildren <em>Children</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class HierarchicalCosimUnitDeclarationImpl extends CosimUnitDeclarationImpl implements HierarchicalCosimUnitDeclaration {
-	/**
-	 * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getChildren()
-	 * @generated
-	 * @ordered
-	 */
-	protected EList<CosimUnitInstance> children;
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected HierarchicalCosimUnitDeclarationImpl() {
-		super();
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	protected EClass eStaticClass() {
-		return HintcoPackage.Literals.HIERARCHICAL_COSIM_UNIT_DECLARATION;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EList<CosimUnitInstance> getChildren() {
-		if (children == null) {
-			children = new EObjectContainmentEList<CosimUnitInstance>(CosimUnitInstance.class, this, HintcoPackage.HIERARCHICAL_COSIM_UNIT_DECLARATION__CHILDREN);
-		}
-		return children;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
-		switch (featureID) {
-			case HintcoPackage.HIERARCHICAL_COSIM_UNIT_DECLARATION__CHILDREN:
-				return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs);
-		}
-		return super.eInverseRemove(otherEnd, featureID, msgs);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public Object eGet(int featureID, boolean resolve, boolean coreType) {
-		switch (featureID) {
-			case HintcoPackage.HIERARCHICAL_COSIM_UNIT_DECLARATION__CHILDREN:
-				return getChildren();
-		}
-		return super.eGet(featureID, resolve, coreType);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@SuppressWarnings("unchecked")
-	@Override
-	public void eSet(int featureID, Object newValue) {
-		switch (featureID) {
-			case HintcoPackage.HIERARCHICAL_COSIM_UNIT_DECLARATION__CHILDREN:
-				getChildren().clear();
-				getChildren().addAll((Collection<? extends CosimUnitInstance>)newValue);
-				return;
-		}
-		super.eSet(featureID, newValue);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public void eUnset(int featureID) {
-		switch (featureID) {
-			case HintcoPackage.HIERARCHICAL_COSIM_UNIT_DECLARATION__CHILDREN:
-				getChildren().clear();
-				return;
-		}
-		super.eUnset(featureID);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public boolean eIsSet(int featureID) {
-		switch (featureID) {
-			case HintcoPackage.HIERARCHICAL_COSIM_UNIT_DECLARATION__CHILDREN:
-				return children != null && !children.isEmpty();
-		}
-		return super.eIsSet(featureID);
-	}
-
-} //HierarchicalCosimUnitDeclarationImpl

+ 198 - 0
HintCO/src-gen/ua/ansymo/hintco/impl/HierarchicalUnitPortImpl.java

@@ -0,0 +1,198 @@
+/**
+ */
+package ua.ansymo.hintco.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import ua.ansymo.hintco.HierarchicalUnitPort;
+import ua.ansymo.hintco.HintcoPackage;
+import ua.ansymo.hintco.InputPortInstance;
+import ua.ansymo.hintco.OutputPortInstance;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Hierarchical Unit Port</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ *   <li>{@link ua.ansymo.hintco.impl.HierarchicalUnitPortImpl#getValueTo <em>Value To</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class HierarchicalUnitPortImpl extends InputPortInstanceImpl implements HierarchicalUnitPort {
+	/**
+	 * The cached value of the '{@link #getValueTo() <em>Value To</em>}' reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getValueTo()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<InputPortInstance> valueTo;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected HierarchicalUnitPortImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return HintcoPackage.Literals.HIERARCHICAL_UNIT_PORT;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<InputPortInstance> getValueTo() {
+		if (valueTo == null) {
+			valueTo = new EObjectWithInverseResolvingEList<InputPortInstance>(InputPortInstance.class, this, HintcoPackage.HIERARCHICAL_UNIT_PORT__VALUE_TO, HintcoPackage.INPUT_PORT_INSTANCE__VALUE_FROM);
+		}
+		return valueTo;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case HintcoPackage.HIERARCHICAL_UNIT_PORT__VALUE_TO:
+				return ((InternalEList<InternalEObject>)(InternalEList<?>)getValueTo()).basicAdd(otherEnd, msgs);
+		}
+		return super.eInverseAdd(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case HintcoPackage.HIERARCHICAL_UNIT_PORT__VALUE_TO:
+				return ((InternalEList<?>)getValueTo()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case HintcoPackage.HIERARCHICAL_UNIT_PORT__VALUE_TO:
+				return getValueTo();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case HintcoPackage.HIERARCHICAL_UNIT_PORT__VALUE_TO:
+				getValueTo().clear();
+				getValueTo().addAll((Collection<? extends InputPortInstance>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case HintcoPackage.HIERARCHICAL_UNIT_PORT__VALUE_TO:
+				getValueTo().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case HintcoPackage.HIERARCHICAL_UNIT_PORT__VALUE_TO:
+				return valueTo != null && !valueTo.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+		if (baseClass == OutputPortInstance.class) {
+			switch (derivedFeatureID) {
+				case HintcoPackage.HIERARCHICAL_UNIT_PORT__VALUE_TO: return HintcoPackage.OUTPUT_PORT_INSTANCE__VALUE_TO;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+		if (baseClass == OutputPortInstance.class) {
+			switch (baseFeatureID) {
+				case HintcoPackage.OUTPUT_PORT_INSTANCE__VALUE_TO: return HintcoPackage.HIERARCHICAL_UNIT_PORT__VALUE_TO;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+} //HierarchicalUnitPortImpl

+ 19 - 19
HintCO/src-gen/ua/ansymo/hintco/impl/HintcoFactoryImpl.java

@@ -59,12 +59,12 @@ public class HintcoFactoryImpl extends EFactoryImpl implements HintcoFactory {
 		switch (eClass.getClassifierID()) {
 			case HintcoPackage.CANDIDATES: return createCandidates();
 			case HintcoPackage.VARIANT_DIAGRAM: return createVariantDiagram();
+			case HintcoPackage.ROOT_CANDIDATE_SCENARIO: return createRootCandidateScenario();
 			case HintcoPackage.CANDIDATE_SCENARIO: return createCandidateScenario();
 			case HintcoPackage.COSIM_UNIT_DECLARATION: return createCosimUnitDeclaration();
-			case HintcoPackage.HIERARCHICAL_COSIM_UNIT_DECLARATION: return createHierarchicalCosimUnitDeclaration();
+			case HintcoPackage.UNIT_INSTANCE: return createUnitInstance();
 			case HintcoPackage.COSIM_UNIT_INSTANCE: return createCosimUnitInstance();
-			case HintcoPackage.INPUT_PORT_DECLARATION: return createInputPortDeclaration();
-			case HintcoPackage.OUTPUT_PORT_DECLARATION: return createOutputPortDeclaration();
+			case HintcoPackage.HIERARCHICAL_UNIT_PORT: return createHierarchicalUnitPort();
 			case HintcoPackage.INPUT_PORT_INSTANCE: return createInputPortInstance();
 			case HintcoPackage.OUTPUT_PORT_INSTANCE: return createOutputPortInstance();
 			case HintcoPackage.XOR_UNIT_ADAPTATION: return createXorUnitAdaptation();
@@ -129,6 +129,16 @@ public class HintcoFactoryImpl extends EFactoryImpl implements HintcoFactory {
 		return variantDiagram;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public RootCandidateScenario createRootCandidateScenario() {
+		RootCandidateScenarioImpl rootCandidateScenario = new RootCandidateScenarioImpl();
+		return rootCandidateScenario;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -154,9 +164,9 @@ public class HintcoFactoryImpl extends EFactoryImpl implements HintcoFactory {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public HierarchicalCosimUnitDeclaration createHierarchicalCosimUnitDeclaration() {
-		HierarchicalCosimUnitDeclarationImpl hierarchicalCosimUnitDeclaration = new HierarchicalCosimUnitDeclarationImpl();
-		return hierarchicalCosimUnitDeclaration;
+	public UnitInstance createUnitInstance() {
+		UnitInstanceImpl unitInstance = new UnitInstanceImpl();
+		return unitInstance;
 	}
 
 	/**
@@ -174,19 +184,9 @@ public class HintcoFactoryImpl extends EFactoryImpl implements HintcoFactory {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public InputPortDeclaration createInputPortDeclaration() {
-		InputPortDeclarationImpl inputPortDeclaration = new InputPortDeclarationImpl();
-		return inputPortDeclaration;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public OutputPortDeclaration createOutputPortDeclaration() {
-		OutputPortDeclarationImpl outputPortDeclaration = new OutputPortDeclarationImpl();
-		return outputPortDeclaration;
+	public HierarchicalUnitPort createHierarchicalUnitPort() {
+		HierarchicalUnitPortImpl hierarchicalUnitPort = new HierarchicalUnitPortImpl();
+		return hierarchicalUnitPort;
 	}
 
 	/**

+ 88 - 150
HintCO/src-gen/ua/ansymo/hintco/impl/HintcoPackageImpl.java

@@ -23,22 +23,21 @@ import ua.ansymo.hintco.CosimUnitInstance;
 import ua.ansymo.hintco.DecompositionPortAdaptation;
 import ua.ansymo.hintco.DecompositionUnitAdaptation;
 import ua.ansymo.hintco.ExtrapolationAdaptation;
-import ua.ansymo.hintco.HierarchicalCosimUnitDeclaration;
+import ua.ansymo.hintco.HierarchicalUnitPort;
 import ua.ansymo.hintco.HintcoFactory;
 import ua.ansymo.hintco.HintcoPackage;
 import ua.ansymo.hintco.IDed;
-import ua.ansymo.hintco.InputPortDeclaration;
 import ua.ansymo.hintco.InputPortInstance;
 import ua.ansymo.hintco.InterpolationAdaptation;
 import ua.ansymo.hintco.MultiRateAdaptation;
-import ua.ansymo.hintco.OutputPortDeclaration;
 import ua.ansymo.hintco.OutputPortInstance;
 import ua.ansymo.hintco.PortAdaptation;
-import ua.ansymo.hintco.PortDeclaration;
 import ua.ansymo.hintco.PortInstance;
 import ua.ansymo.hintco.PowerBondAdaptation;
 import ua.ansymo.hintco.PrecendenceNode;
+import ua.ansymo.hintco.RootCandidateScenario;
 import ua.ansymo.hintco.UnitAdaptation;
+import ua.ansymo.hintco.UnitInstance;
 import ua.ansymo.hintco.VariantDiagram;
 import ua.ansymo.hintco.XorPortAdaptation;
 import ua.ansymo.hintco.XorUnitAdaptation;
@@ -83,56 +82,49 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	private EClass candidateScenarioEClass = null;
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	private EClass cosimUnitDeclarationEClass = null;
+	private EClass rootCandidateScenarioEClass = null;
 
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	private EClass hierarchicalCosimUnitDeclarationEClass = null;
+	private EClass candidateScenarioEClass = null;
 
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	private EClass cosimUnitInstanceEClass = null;
+	private EClass cosimUnitDeclarationEClass = null;
 
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	private EClass portDeclarationEClass = null;
+	private EClass unitInstanceEClass = null;
 
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	private EClass inputPortDeclarationEClass = null;
+	private EClass cosimUnitInstanceEClass = null;
 
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	private EClass outputPortDeclarationEClass = null;
+	private EClass portInstanceEClass = null;
 
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	private EClass portInstanceEClass = null;
+	private EClass hierarchicalUnitPortEClass = null;
 
 	/**
 	 * <!-- begin-user-doc -->
@@ -466,8 +458,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EClass getCandidateScenario() {
-		return candidateScenarioEClass;
+	public EClass getRootCandidateScenario() {
+		return rootCandidateScenarioEClass;
 	}
 
 	/**
@@ -475,8 +467,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getCandidateScenario_Cosimunits() {
-		return (EReference)candidateScenarioEClass.getEStructuralFeatures().get(0);
+	public EAttribute getRootCandidateScenario_Name() {
+		return (EAttribute)rootCandidateScenarioEClass.getEStructuralFeatures().get(0);
 	}
 
 	/**
@@ -484,8 +476,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getCandidateScenario_Name() {
-		return (EAttribute)candidateScenarioEClass.getEStructuralFeatures().get(1);
+	public EAttribute getRootCandidateScenario_StopTime() {
+		return (EAttribute)rootCandidateScenarioEClass.getEStructuralFeatures().get(1);
 	}
 
 	/**
@@ -493,8 +485,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getCandidateScenario_StopTime() {
-		return (EAttribute)candidateScenarioEClass.getEStructuralFeatures().get(2);
+	public EAttribute getRootCandidateScenario_StepSize() {
+		return (EAttribute)rootCandidateScenarioEClass.getEStructuralFeatures().get(2);
 	}
 
 	/**
@@ -502,8 +494,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getCandidateScenario_StepSize() {
-		return (EAttribute)candidateScenarioEClass.getEStructuralFeatures().get(3);
+	public EAttribute getRootCandidateScenario_OutputStepSize() {
+		return (EAttribute)rootCandidateScenarioEClass.getEStructuralFeatures().get(3);
 	}
 
 	/**
@@ -511,8 +503,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getCandidateScenario_OutputStepSize() {
-		return (EAttribute)candidateScenarioEClass.getEStructuralFeatures().get(4);
+	public EClass getCandidateScenario() {
+		return candidateScenarioEClass;
 	}
 
 	/**
@@ -520,8 +512,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EClass getCosimUnitDeclaration() {
-		return cosimUnitDeclarationEClass;
+	public EReference getCandidateScenario_Cosimunits() {
+		return (EReference)candidateScenarioEClass.getEStructuralFeatures().get(0);
 	}
 
 	/**
@@ -529,8 +521,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getCosimUnitDeclaration_Ports() {
-		return (EReference)cosimUnitDeclarationEClass.getEStructuralFeatures().get(0);
+	public EClass getCosimUnitDeclaration() {
+		return cosimUnitDeclarationEClass;
 	}
 
 	/**
@@ -539,7 +531,7 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * @generated
 	 */
 	public EAttribute getCosimUnitDeclaration_Path() {
-		return (EAttribute)cosimUnitDeclarationEClass.getEStructuralFeatures().get(1);
+		return (EAttribute)cosimUnitDeclarationEClass.getEStructuralFeatures().get(0);
 	}
 
 	/**
@@ -548,43 +540,7 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * @generated
 	 */
 	public EAttribute getCosimUnitDeclaration_Guid() {
-		return (EAttribute)cosimUnitDeclarationEClass.getEStructuralFeatures().get(2);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EClass getHierarchicalCosimUnitDeclaration() {
-		return hierarchicalCosimUnitDeclarationEClass;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EReference getHierarchicalCosimUnitDeclaration_Children() {
-		return (EReference)hierarchicalCosimUnitDeclarationEClass.getEStructuralFeatures().get(0);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EClass getCosimUnitInstance() {
-		return cosimUnitInstanceEClass;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EReference getCosimUnitInstance_Adaptation() {
-		return (EReference)cosimUnitInstanceEClass.getEStructuralFeatures().get(0);
+		return (EAttribute)cosimUnitDeclarationEClass.getEStructuralFeatures().get(1);
 	}
 
 	/**
@@ -592,8 +548,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getCosimUnitInstance_Declaration() {
-		return (EReference)cosimUnitInstanceEClass.getEStructuralFeatures().get(1);
+	public EClass getUnitInstance() {
+		return unitInstanceEClass;
 	}
 
 	/**
@@ -601,8 +557,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getCosimUnitInstance_Ports() {
-		return (EReference)cosimUnitInstanceEClass.getEStructuralFeatures().get(2);
+	public EReference getUnitInstance_Scenario() {
+		return (EReference)unitInstanceEClass.getEStructuralFeatures().get(0);
 	}
 
 	/**
@@ -610,8 +566,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getCosimUnitInstance_Scenario() {
-		return (EReference)cosimUnitInstanceEClass.getEStructuralFeatures().get(3);
+	public EReference getUnitInstance_Adaptation() {
+		return (EReference)unitInstanceEClass.getEStructuralFeatures().get(1);
 	}
 
 	/**
@@ -619,8 +575,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EOperation getCosimUnitInstance__SelectedAdaptations() {
-		return cosimUnitInstanceEClass.getEOperations().get(0);
+	public EReference getUnitInstance_Ports() {
+		return (EReference)unitInstanceEClass.getEStructuralFeatures().get(2);
 	}
 
 	/**
@@ -628,8 +584,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EClass getPortDeclaration() {
-		return portDeclarationEClass;
+	public EOperation getUnitInstance__SelectedAdaptations() {
+		return unitInstanceEClass.getEOperations().get(0);
 	}
 
 	/**
@@ -637,8 +593,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EClass getInputPortDeclaration() {
-		return inputPortDeclarationEClass;
+	public EClass getCosimUnitInstance() {
+		return cosimUnitInstanceEClass;
 	}
 
 	/**
@@ -646,8 +602,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EClass getOutputPortDeclaration() {
-		return outputPortDeclarationEClass;
+	public EReference getCosimUnitInstance_Declaration() {
+		return (EReference)cosimUnitInstanceEClass.getEStructuralFeatures().get(0);
 	}
 
 	/**
@@ -691,8 +647,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EClass getInputPortInstance() {
-		return inputPortInstanceEClass;
+	public EClass getHierarchicalUnitPort() {
+		return hierarchicalUnitPortEClass;
 	}
 
 	/**
@@ -700,8 +656,8 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getInputPortInstance_Declaration() {
-		return (EReference)inputPortInstanceEClass.getEStructuralFeatures().get(0);
+	public EClass getInputPortInstance() {
+		return inputPortInstanceEClass;
 	}
 
 	/**
@@ -710,7 +666,7 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * @generated
 	 */
 	public EReference getInputPortInstance_ValueFrom() {
-		return (EReference)inputPortInstanceEClass.getEStructuralFeatures().get(1);
+		return (EReference)inputPortInstanceEClass.getEStructuralFeatures().get(0);
 	}
 
 	/**
@@ -731,15 +687,6 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 		return (EReference)outputPortInstanceEClass.getEStructuralFeatures().get(0);
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EReference getOutputPortInstance_Declaration() {
-		return (EReference)outputPortInstanceEClass.getEStructuralFeatures().get(1);
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -1148,46 +1095,40 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 		createEReference(precendenceNodeEClass, PRECENDENCE_NODE__BEFORE);
 		createEReference(precendenceNodeEClass, PRECENDENCE_NODE__AFTER);
 
+		rootCandidateScenarioEClass = createEClass(ROOT_CANDIDATE_SCENARIO);
+		createEAttribute(rootCandidateScenarioEClass, ROOT_CANDIDATE_SCENARIO__NAME);
+		createEAttribute(rootCandidateScenarioEClass, ROOT_CANDIDATE_SCENARIO__STOP_TIME);
+		createEAttribute(rootCandidateScenarioEClass, ROOT_CANDIDATE_SCENARIO__STEP_SIZE);
+		createEAttribute(rootCandidateScenarioEClass, ROOT_CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE);
+
 		candidateScenarioEClass = createEClass(CANDIDATE_SCENARIO);
 		createEReference(candidateScenarioEClass, CANDIDATE_SCENARIO__COSIMUNITS);
-		createEAttribute(candidateScenarioEClass, CANDIDATE_SCENARIO__NAME);
-		createEAttribute(candidateScenarioEClass, CANDIDATE_SCENARIO__STOP_TIME);
-		createEAttribute(candidateScenarioEClass, CANDIDATE_SCENARIO__STEP_SIZE);
-		createEAttribute(candidateScenarioEClass, CANDIDATE_SCENARIO__OUTPUT_STEP_SIZE);
 
 		cosimUnitDeclarationEClass = createEClass(COSIM_UNIT_DECLARATION);
-		createEReference(cosimUnitDeclarationEClass, COSIM_UNIT_DECLARATION__PORTS);
 		createEAttribute(cosimUnitDeclarationEClass, COSIM_UNIT_DECLARATION__PATH);
 		createEAttribute(cosimUnitDeclarationEClass, COSIM_UNIT_DECLARATION__GUID);
 
-		hierarchicalCosimUnitDeclarationEClass = createEClass(HIERARCHICAL_COSIM_UNIT_DECLARATION);
-		createEReference(hierarchicalCosimUnitDeclarationEClass, HIERARCHICAL_COSIM_UNIT_DECLARATION__CHILDREN);
+		unitInstanceEClass = createEClass(UNIT_INSTANCE);
+		createEReference(unitInstanceEClass, UNIT_INSTANCE__SCENARIO);
+		createEReference(unitInstanceEClass, UNIT_INSTANCE__ADAPTATION);
+		createEReference(unitInstanceEClass, UNIT_INSTANCE__PORTS);
+		createEOperation(unitInstanceEClass, UNIT_INSTANCE___SELECTED_ADAPTATIONS);
 
 		cosimUnitInstanceEClass = createEClass(COSIM_UNIT_INSTANCE);
-		createEReference(cosimUnitInstanceEClass, COSIM_UNIT_INSTANCE__ADAPTATION);
 		createEReference(cosimUnitInstanceEClass, COSIM_UNIT_INSTANCE__DECLARATION);
-		createEReference(cosimUnitInstanceEClass, COSIM_UNIT_INSTANCE__PORTS);
-		createEReference(cosimUnitInstanceEClass, COSIM_UNIT_INSTANCE__SCENARIO);
-		createEOperation(cosimUnitInstanceEClass, COSIM_UNIT_INSTANCE___SELECTED_ADAPTATIONS);
-
-		portDeclarationEClass = createEClass(PORT_DECLARATION);
-
-		inputPortDeclarationEClass = createEClass(INPUT_PORT_DECLARATION);
-
-		outputPortDeclarationEClass = createEClass(OUTPUT_PORT_DECLARATION);
 
 		portInstanceEClass = createEClass(PORT_INSTANCE);
 		createEReference(portInstanceEClass, PORT_INSTANCE__UNIT);
 		createEReference(portInstanceEClass, PORT_INSTANCE__ADAPTATION);
 		createEOperation(portInstanceEClass, PORT_INSTANCE___SELECTED_ADAPTATIONS);
 
+		hierarchicalUnitPortEClass = createEClass(HIERARCHICAL_UNIT_PORT);
+
 		inputPortInstanceEClass = createEClass(INPUT_PORT_INSTANCE);
-		createEReference(inputPortInstanceEClass, INPUT_PORT_INSTANCE__DECLARATION);
 		createEReference(inputPortInstanceEClass, INPUT_PORT_INSTANCE__VALUE_FROM);
 
 		outputPortInstanceEClass = createEClass(OUTPUT_PORT_INSTANCE);
 		createEReference(outputPortInstanceEClass, OUTPUT_PORT_INSTANCE__VALUE_TO);
-		createEReference(outputPortInstanceEClass, OUTPUT_PORT_INSTANCE__DECLARATION);
 
 		alternativeEClass = createEClass(ALTERNATIVE);
 		createEAttribute(alternativeEClass, ALTERNATIVE__WEIGHT);
@@ -1278,17 +1219,20 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 
 		// Add supertypes to classes
 		variantDiagramEClass.getESuperTypes().add(this.getIDed());
+		rootCandidateScenarioEClass.getESuperTypes().add(this.getIDed());
+		rootCandidateScenarioEClass.getESuperTypes().add(this.getAlternative());
+		rootCandidateScenarioEClass.getESuperTypes().add(this.getCandidateScenario());
 		candidateScenarioEClass.getESuperTypes().add(this.getIDed());
 		candidateScenarioEClass.getESuperTypes().add(this.getAlternative());
+		candidateScenarioEClass.getESuperTypes().add(this.getUnitInstance());
 		cosimUnitDeclarationEClass.getESuperTypes().add(this.getIDed());
-		hierarchicalCosimUnitDeclarationEClass.getESuperTypes().add(this.getCosimUnitDeclaration());
-		cosimUnitInstanceEClass.getESuperTypes().add(this.getIDed());
-		cosimUnitInstanceEClass.getESuperTypes().add(this.getPrecendenceNode());
-		portDeclarationEClass.getESuperTypes().add(this.getIDed());
-		inputPortDeclarationEClass.getESuperTypes().add(this.getPortDeclaration());
-		outputPortDeclarationEClass.getESuperTypes().add(this.getPortDeclaration());
+		unitInstanceEClass.getESuperTypes().add(this.getIDed());
+		unitInstanceEClass.getESuperTypes().add(this.getPrecendenceNode());
+		cosimUnitInstanceEClass.getESuperTypes().add(this.getUnitInstance());
 		portInstanceEClass.getESuperTypes().add(this.getPrecendenceNode());
 		portInstanceEClass.getESuperTypes().add(this.getIDed());
+		hierarchicalUnitPortEClass.getESuperTypes().add(this.getInputPortInstance());
+		hierarchicalUnitPortEClass.getESuperTypes().add(this.getOutputPortInstance());
 		inputPortInstanceEClass.getESuperTypes().add(this.getPortInstance());
 		outputPortInstanceEClass.getESuperTypes().add(this.getPortInstance());
 		adaptationEClass.getESuperTypes().add(this.getAlternative());
@@ -1310,7 +1254,7 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 		initEAttribute(getIDed_Identifier(), theEcorePackage.getEString(), "identifier", null, 0, 1, IDed.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(candidatesEClass, Candidates.class, "Candidates", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getCandidates_Candidates(), this.getCandidateScenario(), null, "candidates", null, 0, -1, Candidates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getCandidates_Candidates(), this.getRootCandidateScenario(), null, "candidates", null, 0, -1, Candidates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getCandidates_CsuDeclarations(), this.getCosimUnitDeclaration(), null, "csuDeclarations", null, 0, -1, Candidates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getCandidates_Root(), this.getVariantDiagram(), null, "root", null, 0, 1, Candidates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getCandidates_Nodes(), this.getVariantDiagram(), null, "nodes", null, 0, -1, Candidates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -1326,48 +1270,42 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 		initEReference(getPrecendenceNode_Before(), this.getPrecendenceNode(), this.getPrecendenceNode_After(), "before", null, 0, 1, PrecendenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getPrecendenceNode_After(), this.getPrecendenceNode(), this.getPrecendenceNode_Before(), "after", null, 0, 1, PrecendenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
+		initEClass(rootCandidateScenarioEClass, RootCandidateScenario.class, "RootCandidateScenario", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getRootCandidateScenario_Name(), theEcorePackage.getEString(), "name", null, 0, 1, RootCandidateScenario.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+		initEAttribute(getRootCandidateScenario_StopTime(), theEcorePackage.getEDouble(), "stopTime", null, 0, 1, RootCandidateScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getRootCandidateScenario_StepSize(), theEcorePackage.getEDouble(), "stepSize", null, 0, 1, RootCandidateScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getRootCandidateScenario_OutputStepSize(), theEcorePackage.getEDouble(), "outputStepSize", null, 0, 1, RootCandidateScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
 		initEClass(candidateScenarioEClass, CandidateScenario.class, "CandidateScenario", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getCandidateScenario_Cosimunits(), this.getCosimUnitInstance(), this.getCosimUnitInstance_Scenario(), "cosimunits", null, 0, -1, CandidateScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEAttribute(getCandidateScenario_Name(), theEcorePackage.getEString(), "name", null, 0, 1, CandidateScenario.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED);
-		initEAttribute(getCandidateScenario_StopTime(), theEcorePackage.getEDouble(), "stopTime", null, 0, 1, CandidateScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEAttribute(getCandidateScenario_StepSize(), theEcorePackage.getEDouble(), "stepSize", null, 0, 1, CandidateScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEAttribute(getCandidateScenario_OutputStepSize(), theEcorePackage.getEDouble(), "outputStepSize", null, 0, 1, CandidateScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getCandidateScenario_Cosimunits(), this.getUnitInstance(), this.getUnitInstance_Scenario(), "cosimunits", null, 0, -1, CandidateScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(cosimUnitDeclarationEClass, CosimUnitDeclaration.class, "CosimUnitDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getCosimUnitDeclaration_Ports(), this.getPortDeclaration(), null, "ports", null, 0, -1, CosimUnitDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getCosimUnitDeclaration_Path(), theEcorePackage.getEString(), "path", null, 0, 1, CosimUnitDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getCosimUnitDeclaration_Guid(), theEcorePackage.getEString(), "guid", null, 0, 1, CosimUnitDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
-		initEClass(hierarchicalCosimUnitDeclarationEClass, HierarchicalCosimUnitDeclaration.class, "HierarchicalCosimUnitDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getHierarchicalCosimUnitDeclaration_Children(), this.getCosimUnitInstance(), null, "children", null, 0, -1, HierarchicalCosimUnitDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEClass(unitInstanceEClass, UnitInstance.class, "UnitInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getUnitInstance_Scenario(), this.getCandidateScenario(), this.getCandidateScenario_Cosimunits(), "scenario", null, 0, 1, UnitInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getUnitInstance_Adaptation(), this.getUnitAdaptation(), this.getUnitAdaptation_Unit(), "adaptation", null, 0, 1, UnitInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getUnitInstance_Ports(), this.getPortInstance(), this.getPortInstance_Unit(), "ports", null, 0, -1, UnitInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEOperation(getUnitInstance__SelectedAdaptations(), this.getUnitAdaptation(), "selectedAdaptations", 0, -1, !IS_UNIQUE, IS_ORDERED);
 
 		initEClass(cosimUnitInstanceEClass, CosimUnitInstance.class, "CosimUnitInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getCosimUnitInstance_Adaptation(), this.getUnitAdaptation(), this.getUnitAdaptation_Unit(), "adaptation", null, 0, 1, CosimUnitInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getCosimUnitInstance_Declaration(), this.getCosimUnitDeclaration(), null, "declaration", null, 1, 1, CosimUnitInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEReference(getCosimUnitInstance_Ports(), this.getPortInstance(), this.getPortInstance_Unit(), "ports", null, 0, -1, CosimUnitInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEReference(getCosimUnitInstance_Scenario(), this.getCandidateScenario(), this.getCandidateScenario_Cosimunits(), "scenario", null, 0, 1, CosimUnitInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
-		initEOperation(getCosimUnitInstance__SelectedAdaptations(), this.getUnitAdaptation(), "selectedAdaptations", 0, -1, !IS_UNIQUE, IS_ORDERED);
-
-		initEClass(portDeclarationEClass, PortDeclaration.class, "PortDeclaration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
-		initEClass(inputPortDeclarationEClass, InputPortDeclaration.class, "InputPortDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
-		initEClass(outputPortDeclarationEClass, OutputPortDeclaration.class, "OutputPortDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 
 		initEClass(portInstanceEClass, PortInstance.class, "PortInstance", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getPortInstance_Unit(), this.getCosimUnitInstance(), this.getCosimUnitInstance_Ports(), "unit", null, 0, 1, PortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getPortInstance_Unit(), this.getUnitInstance(), this.getUnitInstance_Ports(), "unit", null, 0, 1, PortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getPortInstance_Adaptation(), this.getPortAdaptation(), this.getPortAdaptation_Port(), "adaptation", null, 0, 1, PortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEOperation(getPortInstance__SelectedAdaptations(), this.getPortAdaptation(), "selectedAdaptations", 0, -1, !IS_UNIQUE, IS_ORDERED);
 
+		initEClass(hierarchicalUnitPortEClass, HierarchicalUnitPort.class, "HierarchicalUnitPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
 		initEClass(inputPortInstanceEClass, InputPortInstance.class, "InputPortInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getInputPortInstance_Declaration(), this.getInputPortDeclaration(), null, "declaration", null, 0, 1, InputPortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getInputPortInstance_ValueFrom(), this.getOutputPortInstance(), this.getOutputPortInstance_ValueTo(), "valueFrom", null, 0, 1, InputPortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(outputPortInstanceEClass, OutputPortInstance.class, "OutputPortInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getOutputPortInstance_ValueTo(), this.getInputPortInstance(), this.getInputPortInstance_ValueFrom(), "valueTo", null, 0, -1, OutputPortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEReference(getOutputPortInstance_Declaration(), this.getOutputPortDeclaration(), null, "declaration", null, 0, 1, OutputPortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(alternativeEClass, Alternative.class, "Alternative", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getAlternative_Weight(), theEcorePackage.getEInt(), "weight", null, 0, 1, Alternative.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -1389,10 +1327,10 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 		initEOperation(getDecompositionPortAdaptation__SelectedAdaptations(), this.getPortAdaptation(), "selectedAdaptations", 0, -1, !IS_UNIQUE, IS_ORDERED);
 
 		initEClass(unitAdaptationEClass, UnitAdaptation.class, "UnitAdaptation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getUnitAdaptation_Unit(), this.getCosimUnitInstance(), this.getCosimUnitInstance_Adaptation(), "unit", null, 0, 1, UnitAdaptation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getUnitAdaptation_Unit(), this.getUnitInstance(), this.getUnitInstance_Adaptation(), "unit", null, 0, 1, UnitAdaptation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getUnitAdaptation_Parent(), this.getDecompositionUnitAdaptation(), this.getDecompositionUnitAdaptation_Children(), "parent", null, 0, 1, UnitAdaptation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
-		initEOperation(getUnitAdaptation__Adapted(), this.getCosimUnitInstance(), "adapted", 0, 1, !IS_UNIQUE, IS_ORDERED);
+		initEOperation(getUnitAdaptation__Adapted(), this.getUnitInstance(), "adapted", 0, 1, !IS_UNIQUE, IS_ORDERED);
 
 		initEClass(decompositionUnitAdaptationEClass, DecompositionUnitAdaptation.class, "DecompositionUnitAdaptation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getDecompositionUnitAdaptation_Children(), this.getUnitAdaptation(), this.getUnitAdaptation_Parent(), "children", null, 0, -1, DecompositionUnitAdaptation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+ 0 - 37
HintCO/src-gen/ua/ansymo/hintco/impl/InputPortDeclarationImpl.java

@@ -1,37 +0,0 @@
-/**
- */
-package ua.ansymo.hintco.impl;
-
-import org.eclipse.emf.ecore.EClass;
-
-import ua.ansymo.hintco.HintcoPackage;
-import ua.ansymo.hintco.InputPortDeclaration;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Input Port Declaration</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class InputPortDeclarationImpl extends PortDeclarationImpl implements InputPortDeclaration {
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected InputPortDeclarationImpl() {
-		super();
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	protected EClass eStaticClass() {
-		return HintcoPackage.Literals.INPUT_PORT_DECLARATION;
-	}
-
-} //InputPortDeclarationImpl

+ 0 - 61
HintCO/src-gen/ua/ansymo/hintco/impl/InputPortInstanceImpl.java

@@ -11,7 +11,6 @@ import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
 import ua.ansymo.hintco.HintcoPackage;
-import ua.ansymo.hintco.InputPortDeclaration;
 import ua.ansymo.hintco.InputPortInstance;
 import ua.ansymo.hintco.OutputPortInstance;
 
@@ -23,23 +22,12 @@ import ua.ansymo.hintco.OutputPortInstance;
  * The following features are implemented:
  * </p>
  * <ul>
- *   <li>{@link ua.ansymo.hintco.impl.InputPortInstanceImpl#getDeclaration <em>Declaration</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.InputPortInstanceImpl#getValueFrom <em>Value From</em>}</li>
  * </ul>
  *
  * @generated
  */
 public class InputPortInstanceImpl extends PortInstanceImpl implements InputPortInstance {
-	/**
-	 * The cached value of the '{@link #getDeclaration() <em>Declaration</em>}' reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getDeclaration()
-	 * @generated
-	 * @ordered
-	 */
-	protected InputPortDeclaration declaration;
-
 	/**
 	 * The cached value of the '{@link #getValueFrom() <em>Value From</em>}' reference.
 	 * <!-- begin-user-doc -->
@@ -69,44 +57,6 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 		return HintcoPackage.Literals.INPUT_PORT_INSTANCE;
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public InputPortDeclaration getDeclaration() {
-		if (declaration != null && declaration.eIsProxy()) {
-			InternalEObject oldDeclaration = (InternalEObject)declaration;
-			declaration = (InputPortDeclaration)eResolveProxy(oldDeclaration);
-			if (declaration != oldDeclaration) {
-				if (eNotificationRequired())
-					eNotify(new ENotificationImpl(this, Notification.RESOLVE, HintcoPackage.INPUT_PORT_INSTANCE__DECLARATION, oldDeclaration, declaration));
-			}
-		}
-		return declaration;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public InputPortDeclaration basicGetDeclaration() {
-		return declaration;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public void setDeclaration(InputPortDeclaration newDeclaration) {
-		InputPortDeclaration oldDeclaration = declaration;
-		declaration = newDeclaration;
-		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.INPUT_PORT_INSTANCE__DECLARATION, oldDeclaration, declaration));
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -205,9 +155,6 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
-			case HintcoPackage.INPUT_PORT_INSTANCE__DECLARATION:
-				if (resolve) return getDeclaration();
-				return basicGetDeclaration();
 			case HintcoPackage.INPUT_PORT_INSTANCE__VALUE_FROM:
 				if (resolve) return getValueFrom();
 				return basicGetValueFrom();
@@ -223,9 +170,6 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 	@Override
 	public void eSet(int featureID, Object newValue) {
 		switch (featureID) {
-			case HintcoPackage.INPUT_PORT_INSTANCE__DECLARATION:
-				setDeclaration((InputPortDeclaration)newValue);
-				return;
 			case HintcoPackage.INPUT_PORT_INSTANCE__VALUE_FROM:
 				setValueFrom((OutputPortInstance)newValue);
 				return;
@@ -241,9 +185,6 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 	@Override
 	public void eUnset(int featureID) {
 		switch (featureID) {
-			case HintcoPackage.INPUT_PORT_INSTANCE__DECLARATION:
-				setDeclaration((InputPortDeclaration)null);
-				return;
 			case HintcoPackage.INPUT_PORT_INSTANCE__VALUE_FROM:
 				setValueFrom((OutputPortInstance)null);
 				return;
@@ -259,8 +200,6 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 	@Override
 	public boolean eIsSet(int featureID) {
 		switch (featureID) {
-			case HintcoPackage.INPUT_PORT_INSTANCE__DECLARATION:
-				return declaration != null;
 			case HintcoPackage.INPUT_PORT_INSTANCE__VALUE_FROM:
 				return valueFrom != null;
 		}

+ 0 - 37
HintCO/src-gen/ua/ansymo/hintco/impl/OutputPortDeclarationImpl.java

@@ -1,37 +0,0 @@
-/**
- */
-package ua.ansymo.hintco.impl;
-
-import org.eclipse.emf.ecore.EClass;
-
-import ua.ansymo.hintco.HintcoPackage;
-import ua.ansymo.hintco.OutputPortDeclaration;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Output Port Declaration</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class OutputPortDeclarationImpl extends PortDeclarationImpl implements OutputPortDeclaration {
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected OutputPortDeclarationImpl() {
-		super();
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	protected EClass eStaticClass() {
-		return HintcoPackage.Literals.OUTPUT_PORT_DECLARATION;
-	}
-
-} //OutputPortDeclarationImpl

+ 0 - 64
HintCO/src-gen/ua/ansymo/hintco/impl/OutputPortInstanceImpl.java

@@ -4,7 +4,6 @@ package ua.ansymo.hintco.impl;
 
 import java.util.Collection;
 
-import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.notify.NotificationChain;
 
 import org.eclipse.emf.common.util.EList;
@@ -12,14 +11,11 @@ import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.InternalEObject;
 
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
 import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
 import org.eclipse.emf.ecore.util.InternalEList;
 
 import ua.ansymo.hintco.HintcoPackage;
 import ua.ansymo.hintco.InputPortInstance;
-import ua.ansymo.hintco.OutputPortDeclaration;
 import ua.ansymo.hintco.OutputPortInstance;
 
 /**
@@ -31,7 +27,6 @@ import ua.ansymo.hintco.OutputPortInstance;
  * </p>
  * <ul>
  *   <li>{@link ua.ansymo.hintco.impl.OutputPortInstanceImpl#getValueTo <em>Value To</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.OutputPortInstanceImpl#getDeclaration <em>Declaration</em>}</li>
  * </ul>
  *
  * @generated
@@ -47,16 +42,6 @@ public class OutputPortInstanceImpl extends PortInstanceImpl implements OutputPo
 	 */
 	protected EList<InputPortInstance> valueTo;
 
-	/**
-	 * The cached value of the '{@link #getDeclaration() <em>Declaration</em>}' reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getDeclaration()
-	 * @generated
-	 * @ordered
-	 */
-	protected OutputPortDeclaration declaration;
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -88,44 +73,6 @@ public class OutputPortInstanceImpl extends PortInstanceImpl implements OutputPo
 		return valueTo;
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public OutputPortDeclaration getDeclaration() {
-		if (declaration != null && declaration.eIsProxy()) {
-			InternalEObject oldDeclaration = (InternalEObject)declaration;
-			declaration = (OutputPortDeclaration)eResolveProxy(oldDeclaration);
-			if (declaration != oldDeclaration) {
-				if (eNotificationRequired())
-					eNotify(new ENotificationImpl(this, Notification.RESOLVE, HintcoPackage.OUTPUT_PORT_INSTANCE__DECLARATION, oldDeclaration, declaration));
-			}
-		}
-		return declaration;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public OutputPortDeclaration basicGetDeclaration() {
-		return declaration;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public void setDeclaration(OutputPortDeclaration newDeclaration) {
-		OutputPortDeclaration oldDeclaration = declaration;
-		declaration = newDeclaration;
-		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.OUTPUT_PORT_INSTANCE__DECLARATION, oldDeclaration, declaration));
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -165,9 +112,6 @@ public class OutputPortInstanceImpl extends PortInstanceImpl implements OutputPo
 		switch (featureID) {
 			case HintcoPackage.OUTPUT_PORT_INSTANCE__VALUE_TO:
 				return getValueTo();
-			case HintcoPackage.OUTPUT_PORT_INSTANCE__DECLARATION:
-				if (resolve) return getDeclaration();
-				return basicGetDeclaration();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -185,9 +129,6 @@ public class OutputPortInstanceImpl extends PortInstanceImpl implements OutputPo
 				getValueTo().clear();
 				getValueTo().addAll((Collection<? extends InputPortInstance>)newValue);
 				return;
-			case HintcoPackage.OUTPUT_PORT_INSTANCE__DECLARATION:
-				setDeclaration((OutputPortDeclaration)newValue);
-				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -203,9 +144,6 @@ public class OutputPortInstanceImpl extends PortInstanceImpl implements OutputPo
 			case HintcoPackage.OUTPUT_PORT_INSTANCE__VALUE_TO:
 				getValueTo().clear();
 				return;
-			case HintcoPackage.OUTPUT_PORT_INSTANCE__DECLARATION:
-				setDeclaration((OutputPortDeclaration)null);
-				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -220,8 +158,6 @@ public class OutputPortInstanceImpl extends PortInstanceImpl implements OutputPo
 		switch (featureID) {
 			case HintcoPackage.OUTPUT_PORT_INSTANCE__VALUE_TO:
 				return valueTo != null && !valueTo.isEmpty();
-			case HintcoPackage.OUTPUT_PORT_INSTANCE__DECLARATION:
-				return declaration != null;
 		}
 		return super.eIsSet(featureID);
 	}

+ 0 - 37
HintCO/src-gen/ua/ansymo/hintco/impl/PortDeclarationImpl.java

@@ -1,37 +0,0 @@
-/**
- */
-package ua.ansymo.hintco.impl;
-
-import org.eclipse.emf.ecore.EClass;
-
-import ua.ansymo.hintco.HintcoPackage;
-import ua.ansymo.hintco.PortDeclaration;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Port Declaration</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public abstract class PortDeclarationImpl extends IDedImpl implements PortDeclaration {
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected PortDeclarationImpl() {
-		super();
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	protected EClass eStaticClass() {
-		return HintcoPackage.Literals.PORT_DECLARATION;
-	}
-
-} //PortDeclarationImpl

+ 12 - 12
HintCO/src-gen/ua/ansymo/hintco/impl/PortInstanceImpl.java

@@ -17,12 +17,12 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
 import org.eclipse.emf.ecore.util.EcoreUtil;
 
-import ua.ansymo.hintco.CosimUnitInstance;
 import ua.ansymo.hintco.DecompositionPortAdaptation;
 import ua.ansymo.hintco.HintcoPackage;
 import ua.ansymo.hintco.IDed;
 import ua.ansymo.hintco.PortAdaptation;
 import ua.ansymo.hintco.PortInstance;
+import ua.ansymo.hintco.UnitInstance;
 
 /**
  * <!-- begin-user-doc -->
@@ -115,9 +115,9 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public CosimUnitInstance getUnit() {
+	public UnitInstance getUnit() {
 		if (eContainerFeatureID() != HintcoPackage.PORT_INSTANCE__UNIT) return null;
-		return (CosimUnitInstance)eContainer();
+		return (UnitInstance)eContainer();
 	}
 
 	/**
@@ -125,9 +125,9 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public CosimUnitInstance basicGetUnit() {
+	public UnitInstance basicGetUnit() {
 		if (eContainerFeatureID() != HintcoPackage.PORT_INSTANCE__UNIT) return null;
-		return (CosimUnitInstance)eInternalContainer();
+		return (UnitInstance)eInternalContainer();
 	}
 
 	/**
@@ -135,7 +135,7 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public NotificationChain basicSetUnit(CosimUnitInstance newUnit, NotificationChain msgs) {
+	public NotificationChain basicSetUnit(UnitInstance newUnit, NotificationChain msgs) {
 		msgs = eBasicSetContainer((InternalEObject)newUnit, HintcoPackage.PORT_INSTANCE__UNIT, msgs);
 		return msgs;
 	}
@@ -145,7 +145,7 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void setUnit(CosimUnitInstance newUnit) {
+	public void setUnit(UnitInstance newUnit) {
 		if (newUnit != eInternalContainer() || (eContainerFeatureID() != HintcoPackage.PORT_INSTANCE__UNIT && newUnit != null)) {
 			if (EcoreUtil.isAncestor(this, newUnit))
 				throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
@@ -153,7 +153,7 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 			if (eInternalContainer() != null)
 				msgs = eBasicRemoveFromContainer(msgs);
 			if (newUnit != null)
-				msgs = ((InternalEObject)newUnit).eInverseAdd(this, HintcoPackage.COSIM_UNIT_INSTANCE__PORTS, CosimUnitInstance.class, msgs);
+				msgs = ((InternalEObject)newUnit).eInverseAdd(this, HintcoPackage.UNIT_INSTANCE__PORTS, UnitInstance.class, msgs);
 			msgs = basicSetUnit(newUnit, msgs);
 			if (msgs != null) msgs.dispatch();
 		}
@@ -239,7 +239,7 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 			case HintcoPackage.PORT_INSTANCE__UNIT:
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return basicSetUnit((CosimUnitInstance)otherEnd, msgs);
+				return basicSetUnit((UnitInstance)otherEnd, msgs);
 			case HintcoPackage.PORT_INSTANCE__ADAPTATION:
 				if (adaptation != null)
 					msgs = ((InternalEObject)adaptation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - HintcoPackage.PORT_INSTANCE__ADAPTATION, null, msgs);
@@ -273,7 +273,7 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
 		switch (eContainerFeatureID()) {
 			case HintcoPackage.PORT_INSTANCE__UNIT:
-				return eInternalContainer().eInverseRemove(this, HintcoPackage.COSIM_UNIT_INSTANCE__PORTS, CosimUnitInstance.class, msgs);
+				return eInternalContainer().eInverseRemove(this, HintcoPackage.UNIT_INSTANCE__PORTS, UnitInstance.class, msgs);
 		}
 		return super.eBasicRemoveFromContainerFeature(msgs);
 	}
@@ -309,7 +309,7 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 				setIdentifier((String)newValue);
 				return;
 			case HintcoPackage.PORT_INSTANCE__UNIT:
-				setUnit((CosimUnitInstance)newValue);
+				setUnit((UnitInstance)newValue);
 				return;
 			case HintcoPackage.PORT_INSTANCE__ADAPTATION:
 				setAdaptation((PortAdaptation)newValue);
@@ -330,7 +330,7 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 				setIdentifier(IDENTIFIER_EDEFAULT);
 				return;
 			case HintcoPackage.PORT_INSTANCE__UNIT:
-				setUnit((CosimUnitInstance)null);
+				setUnit((UnitInstance)null);
 				return;
 			case HintcoPackage.PORT_INSTANCE__ADAPTATION:
 				setAdaptation((PortAdaptation)null);

+ 7 - 7
HintCO/src-gen/ua/ansymo/hintco/impl/PowerBondAdaptationImpl.java

@@ -20,12 +20,12 @@ import org.eclipse.xtext.xbase.lib.Functions.Function1;
 import org.eclipse.xtext.xbase.lib.IterableExtensions;
 import org.eclipse.xtext.xbase.lib.IteratorExtensions;
 
-import ua.ansymo.hintco.CosimUnitInstance;
 import ua.ansymo.hintco.HintcoPackage;
 import ua.ansymo.hintco.InputPortInstance;
 import ua.ansymo.hintco.OutputPortInstance;
 import ua.ansymo.hintco.PortInstance;
 import ua.ansymo.hintco.PowerBondAdaptation;
+import ua.ansymo.hintco.UnitInstance;
 
 /**
  * <!-- begin-user-doc -->
@@ -253,8 +253,8 @@ public class PowerBondAdaptationImpl extends UnitAdaptationImpl implements Power
 		{
 			PowerBondAdaptation res = null;
 			if (((this.getEffort() instanceof InputPortInstance) && (this.getFlow() instanceof OutputPortInstance))) {
-				final Function1<CosimUnitInstance, Iterable<PowerBondAdaptation>> _function = new Function1<CosimUnitInstance, Iterable<PowerBondAdaptation>>() {
-					public Iterable<PowerBondAdaptation> apply(final CosimUnitInstance u) {
+				final Function1<UnitInstance, Iterable<PowerBondAdaptation>> _function = new Function1<UnitInstance, Iterable<PowerBondAdaptation>>() {
+					public Iterable<PowerBondAdaptation> apply(final UnitInstance u) {
 						return IteratorExtensions.<PowerBondAdaptation>toIterable(Iterators.<PowerBondAdaptation>filter(u.eAllContents(), PowerBondAdaptation.class));
 					}
 				};
@@ -268,12 +268,12 @@ public class PowerBondAdaptationImpl extends UnitAdaptationImpl implements Power
 						return Boolean.valueOf((((OutputPortInstance) a.getEffort()).getValueTo().contains(PowerBondAdaptationImpl.this.getEffort()) && (((InputPortInstance) a.getFlow()).getValueFrom() == PowerBondAdaptationImpl.this.getFlow())));
 					}
 				};
-				res = IterableExtensions.<PowerBondAdaptation>findFirst(IterableExtensions.<PowerBondAdaptation>filter(IterableExtensions.<CosimUnitInstance, PowerBondAdaptation>flatMap(this.getUnit().getScenario().getCosimunits(), _function), _function_1), _function_2);
+				res = IterableExtensions.<PowerBondAdaptation>findFirst(IterableExtensions.<PowerBondAdaptation>filter(IterableExtensions.<UnitInstance, PowerBondAdaptation>flatMap(this.getUnit().getScenario().getCosimunits(), _function), _function_1), _function_2);
 			}
 			else {
 				if (((this.getEffort() instanceof OutputPortInstance) && (this.getFlow() instanceof InputPortInstance))) {
-					final Function1<CosimUnitInstance, Iterable<PowerBondAdaptation>> _function_3 = new Function1<CosimUnitInstance, Iterable<PowerBondAdaptation>>() {
-						public Iterable<PowerBondAdaptation> apply(final CosimUnitInstance u) {
+					final Function1<UnitInstance, Iterable<PowerBondAdaptation>> _function_3 = new Function1<UnitInstance, Iterable<PowerBondAdaptation>>() {
+						public Iterable<PowerBondAdaptation> apply(final UnitInstance u) {
 							return IteratorExtensions.<PowerBondAdaptation>toIterable(Iterators.<PowerBondAdaptation>filter(u.eAllContents(), PowerBondAdaptation.class));
 						}
 					};
@@ -287,7 +287,7 @@ public class PowerBondAdaptationImpl extends UnitAdaptationImpl implements Power
 							return Boolean.valueOf(((((InputPortInstance) a.getEffort()).getValueFrom() == PowerBondAdaptationImpl.this.getEffort()) && ((OutputPortInstance) a.getFlow()).getValueTo().contains(PowerBondAdaptationImpl.this.getFlow())));
 						}
 					};
-					res = IterableExtensions.<PowerBondAdaptation>findFirst(IterableExtensions.<PowerBondAdaptation>filter(IterableExtensions.<CosimUnitInstance, PowerBondAdaptation>flatMap(this.getUnit().getScenario().getCosimunits(), _function_3), _function_4), _function_5);
+					res = IterableExtensions.<PowerBondAdaptation>findFirst(IterableExtensions.<PowerBondAdaptation>filter(IterableExtensions.<UnitInstance, PowerBondAdaptation>flatMap(this.getUnit().getScenario().getCosimunits(), _function_3), _function_4), _function_5);
 				}
 				else {
 					throw new RuntimeException("Invalid effort and flow in power bond adaptation");

File diff suppressed because it is too large
+ 1120 - 0
HintCO/src-gen/ua/ansymo/hintco/impl/RootCandidateScenarioImpl.java


+ 0 - 0
HintCO/src-gen/ua/ansymo/hintco/impl/UnitAdaptationImpl.java


Some files were not shown because too many files changed in this diff