Add XCore derived preference to false.
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/bundle.properties b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/bundle.properties
index 339868f..5aaca1e 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/bundle.properties
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/bundle.properties
@@ -341,3 +341,9 @@
 _UI_ObservationAnalysisPlannerResult_statelessCostsMapEntries_feature = Stateless Costs Map Entries
 _UI_CostFunctionState_previousPass_feature = Previous Pass
 _UI_ObservationAnalysisPlannerNode_statefulCostFunctionMapEntries_feature = Stateful Cost Function Map Entries
+_UI_ObservationAnalysisPlannerNode_state_feature = State
+_UI_StatefulCostFunctionMapEntryValue_type = Stateful Cost Function Map Entry Value
+_UI_StatefulCostFunctionMapEntryValue_state_feature = State
+_UI_StatefulCostFunctionMapEntryValue_value_feature = Value
+_UI_StatefulCostFunctionMapEntryValue_cost_feature = Cost
+_UI_ObservationAnalysisPlannerNode_rootNode_feature = Root Node
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateAggregateContentNode_aggregateContent_StatefulCostFunctionMapEntryValue.gif b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateAggregateContentNode_aggregateContent_StatefulCostFunctionMapEntryValue.gif
new file mode 100644
index 0000000..845e9f4
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateAggregateContentNode_aggregateContent_StatefulCostFunctionMapEntryValue.gif
Binary files differ
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateContentNode_content_StatefulCostFunctionMapEntryValue.gif b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateContentNode_content_StatefulCostFunctionMapEntryValue.gif
new file mode 100644
index 0000000..978ee2b
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateContentNode_content_StatefulCostFunctionMapEntryValue.gif
Binary files differ
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateObservationAnalysisPlannerNode_state_CostFunctionState.gif b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateObservationAnalysisPlannerNode_state_CostFunctionState.gif
new file mode 100644
index 0000000..9862390
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateObservationAnalysisPlannerNode_state_CostFunctionState.gif
Binary files differ
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateObservationAnalysisPlannerNode_state_SimpleResourceCostFunctionState.gif b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateObservationAnalysisPlannerNode_state_SimpleResourceCostFunctionState.gif
new file mode 100644
index 0000000..41eefa2
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateObservationAnalysisPlannerNode_state_SimpleResourceCostFunctionState.gif
Binary files differ
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateStatefulCostFunctionMapEntryValue_state_CostFunctionState.gif b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateStatefulCostFunctionMapEntryValue_state_CostFunctionState.gif
new file mode 100644
index 0000000..84f9729
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateStatefulCostFunctionMapEntryValue_state_CostFunctionState.gif
Binary files differ
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateStatefulCostFunctionMapEntryValue_state_SimpleResourceCostFunctionState.gif b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateStatefulCostFunctionMapEntryValue_state_SimpleResourceCostFunctionState.gif
new file mode 100644
index 0000000..1f3ebd6
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateStatefulCostFunctionMapEntryValue_state_SimpleResourceCostFunctionState.gif
Binary files differ
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateStatefulCostFunctionMapEntry_value_StatefulCostFunctionMapEntryValue.gif b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateStatefulCostFunctionMapEntry_value_StatefulCostFunctionMapEntryValue.gif
new file mode 100644
index 0000000..96f2df5
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/ctool16/CreateStatefulCostFunctionMapEntry_value_StatefulCostFunctionMapEntryValue.gif
Binary files differ
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/obj16/StatefulCostFunctionMapEntryValue.gif b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/obj16/StatefulCostFunctionMapEntryValue.gif
new file mode 100644
index 0000000..a17dc7d
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/icons/full/obj16/StatefulCostFunctionMapEntryValue.gif
Binary files differ
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/ApogyCoreEnvironmentEarthOrbitPlannerItemProviderAdapterFactory.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/ApogyCoreEnvironmentEarthOrbitPlannerItemProviderAdapterFactory.java
index 84080e3..9dd5595 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/ApogyCoreEnvironmentEarthOrbitPlannerItemProviderAdapterFactory.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/ApogyCoreEnvironmentEarthOrbitPlannerItemProviderAdapterFactory.java
@@ -291,6 +291,29 @@
 	}
 
 	/**
+	 * This keeps track of the one adapter used for all {@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue} instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected StatefulCostFunctionMapEntryValueItemProvider statefulCostFunctionMapEntryValueItemProvider;
+
+	/**
+	 * This creates an adapter for a {@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Adapter createStatefulCostFunctionMapEntryValueAdapter() {
+		if (statefulCostFunctionMapEntryValueItemProvider == null) {
+			statefulCostFunctionMapEntryValueItemProvider = new StatefulCostFunctionMapEntryValueItemProvider(this);
+		}
+
+		return statefulCostFunctionMapEntryValueItemProvider;
+	}
+
+	/**
 	 * This keeps track of the one adapter used for all {@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode} instances.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -688,6 +711,7 @@
 		if (statelessCostFunctionMapItemProvider != null) statelessCostFunctionMapItemProvider.dispose();
 		if (statelessCostFunctionMapEntryItemProvider != null) statelessCostFunctionMapEntryItemProvider.dispose();
 		if (statefulCostFunctionMapEntryItemProvider != null) statefulCostFunctionMapEntryItemProvider.dispose();
+		if (statefulCostFunctionMapEntryValueItemProvider != null) statefulCostFunctionMapEntryValueItemProvider.dispose();
 		if (eclipseCostFunctionItemProvider != null) eclipseCostFunctionItemProvider.dispose();
 		if (timeIntervalCostFunctionItemProvider != null) timeIntervalCostFunctionItemProvider.dispose();
 		if (simpleResourceCostFunctionItemProvider != null) simpleResourceCostFunctionItemProvider.dispose();
@@ -898,6 +922,11 @@
 				newChildDescriptors.add
 					(createChildParameter
 						(ApogyCommonTopologyPackage.Literals.CONTENT_NODE__CONTENT,
+						 ApogyCoreEnvironmentEarthOrbitPlannerFactory.eINSTANCE.createStatefulCostFunctionMapEntryValue()));
+
+				newChildDescriptors.add
+					(createChildParameter
+						(ApogyCommonTopologyPackage.Literals.CONTENT_NODE__CONTENT,
 						 ApogyCoreEnvironmentEarthOrbitPlannerFactory.eINSTANCE.createEclipseCostFunction()));
 
 				newChildDescriptors.add
@@ -1003,6 +1032,11 @@
 				newChildDescriptors.add
 					(createChildParameter
 						(ApogyCommonTopologyPackage.Literals.AGGREGATE_CONTENT_NODE__AGGREGATE_CONTENT,
+						 ApogyCoreEnvironmentEarthOrbitPlannerFactory.eINSTANCE.createStatefulCostFunctionMapEntryValue()));
+
+				newChildDescriptors.add
+					(createChildParameter
+						(ApogyCommonTopologyPackage.Literals.AGGREGATE_CONTENT_NODE__AGGREGATE_CONTENT,
 						 ApogyCoreEnvironmentEarthOrbitPlannerFactory.eINSTANCE.createEclipseCostFunction()));
 
 				newChildDescriptors.add
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/CostFunctionStateItemProvider.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/CostFunctionStateItemProvider.java
index b8f5fb2..12a754d 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/CostFunctionStateItemProvider.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/CostFunctionStateItemProvider.java
@@ -17,14 +17,10 @@
 
 import java.util.Collection;
 import java.util.List;
-
-import org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage;
 import org.eclipse.emf.common.notify.AdapterFactory;
 import org.eclipse.emf.common.notify.Notification;
 
 import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
 import org.eclipse.emf.edit.provider.IChildCreationExtender;
 import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
 import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -69,34 +65,11 @@
 		if (itemPropertyDescriptors == null) {
 			super.getPropertyDescriptors(object);
 
-			addPreviousPassPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
 
 	/**
-	 * This adds a property descriptor for the Previous Pass feature.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected void addPreviousPassPropertyDescriptor(Object object) {
-		itemPropertyDescriptors.add
-			(createItemPropertyDescriptor
-				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
-				 getResourceLocator(),
-				 getString("_UI_CostFunctionState_previousPass_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_CostFunctionState_previousPass_feature", "_UI_CostFunctionState_type"),
-				 ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.COST_FUNCTION_STATE__PREVIOUS_PASS,
-				 true,
-				 false,
-				 true,
-				 null,
-				 null,
-				 null));
-	}
-
-	/**
 	 * This returns CostFunctionState.gif.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/ObservationAnalysisPlannerNodeItemProvider.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/ObservationAnalysisPlannerNodeItemProvider.java
index f6ee02a..c06a99c 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/ObservationAnalysisPlannerNodeItemProvider.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/ObservationAnalysisPlannerNodeItemProvider.java
@@ -79,6 +79,7 @@
 			addResultPropertyDescriptor(object);
 			addIdPropertyDescriptor(object);
 			addPassPropertyDescriptor(object);
+			addRootNodePropertyDescriptor(object);
 			addPlannerRootNodePropertyDescriptor(object);
 			addPlannerResultPropertyDescriptor(object);
 			addPlannerPropertyDescriptor(object);
@@ -160,6 +161,28 @@
 	}
 
 	/**
+	 * This adds a property descriptor for the Root Node feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addRootNodePropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_ObservationAnalysisPlannerNode_rootNode_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_ObservationAnalysisPlannerNode_rootNode_feature", "_UI_ObservationAnalysisPlannerNode_type"),
+				 ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.OBSERVATION_ANALYSIS_PLANNER_NODE__ROOT_NODE,
+				 false,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
 	 * This adds a property descriptor for the Planner Root Node feature.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -449,6 +472,7 @@
 
 		switch (notification.getFeatureID(ObservationAnalysisPlannerNode.class)) {
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__ID:
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__ROOT_NODE:
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__COST:
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__CUMULATIVE_COST:
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__LEVEL:
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/StatefulCostFunctionMapEntryItemProvider.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/StatefulCostFunctionMapEntryItemProvider.java
index 494a3b0..0da7245 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/StatefulCostFunctionMapEntryItemProvider.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/StatefulCostFunctionMapEntryItemProvider.java
@@ -19,6 +19,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFactory;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage;
 
 import org.eclipse.emf.common.notify.AdapterFactory;
@@ -26,6 +27,7 @@
 
 import org.eclipse.emf.common.util.ResourceLocator;
 
+import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
 import org.eclipse.emf.edit.provider.IChildCreationExtender;
 import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
@@ -34,7 +36,6 @@
 import org.eclipse.emf.edit.provider.IItemPropertySource;
 import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
 import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
 import org.eclipse.emf.edit.provider.ItemProviderAdapter;
 import org.eclipse.emf.edit.provider.ViewerNotification;
 
@@ -74,7 +75,6 @@
 			super.getPropertyDescriptors(object);
 
 			addKeyPropertyDescriptor(object);
-			addValuePropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
@@ -102,25 +102,33 @@
 	}
 
 	/**
-	 * This adds a property descriptor for the Value feature.
+	 * 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
 	 */
-	protected void addValuePropertyDescriptor(Object object) {
-		itemPropertyDescriptors.add
-			(createItemPropertyDescriptor
-				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
-				 getResourceLocator(),
-				 getString("_UI_StatefulCostFunctionMapEntry_value_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_StatefulCostFunctionMapEntry_value_feature", "_UI_StatefulCostFunctionMapEntry_type"),
-				 ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE,
-				 true,
-				 false,
-				 false,
-				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
-				 null,
-				 null));
+	@Override
+	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+		if (childrenFeatures == null) {
+			super.getChildrenFeatures(object);
+			childrenFeatures.add(ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE);
+		}
+		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);
 	}
 
 	/**
@@ -160,7 +168,7 @@
 
 		switch (notification.getFeatureID(Map.Entry.class)) {
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE:
-				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
 				return;
 		}
 		super.notifyChanged(notification);
@@ -176,6 +184,11 @@
 	@Override
 	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
 		super.collectNewChildDescriptors(newChildDescriptors, object);
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE,
+				 ApogyCoreEnvironmentEarthOrbitPlannerFactory.eINSTANCE.createStatefulCostFunctionMapEntryValue()));
 	}
 
 	/**
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/StatefulCostFunctionMapEntryValueItemProvider.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/StatefulCostFunctionMapEntryValueItemProvider.java
new file mode 100644
index 0000000..f48a7ba
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.edit/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/provider/StatefulCostFunctionMapEntryValueItemProvider.java
@@ -0,0 +1,215 @@
+/**
+ * *******************************************************************************
+ * Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *      Regent L'Archeveque - initial API and implementation
+ *         
+ * SPDX-License-Identifier: EPL-1.0    
+ * *******************************************************************************
+ */
+package org.eclipse.apogy.core.environment.earth.orbit.planner.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFactory;
+import org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage;
+import org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StatefulCostFunctionMapEntryValueItemProvider 
+	extends ItemProviderAdapter
+	implements
+		IEditingDomainItemProvider,
+		IStructuredItemContentProvider,
+		ITreeItemContentProvider,
+		IItemLabelProvider,
+		IItemPropertySource {
+	/**
+	 * This constructs an instance from a factory and a notifier.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public StatefulCostFunctionMapEntryValueItemProvider(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);
+
+			addCostPropertyDescriptor(object);
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This adds a property descriptor for the Cost feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addCostPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_StatefulCostFunctionMapEntryValue_cost_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_StatefulCostFunctionMapEntryValue_cost_feature", "_UI_StatefulCostFunctionMapEntryValue_type"),
+				 ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__COST,
+				 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(ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE);
+		}
+		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 StatefulCostFunctionMapEntryValue.gif.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/StatefulCostFunctionMapEntryValue"));
+	}
+
+	/**
+	 * This returns the label text for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String getText(Object object) {
+		StatefulCostFunctionMapEntryValue statefulCostFunctionMapEntryValue = (StatefulCostFunctionMapEntryValue)object;
+		return getString("_UI_StatefulCostFunctionMapEntryValue_type") + " " + statefulCostFunctionMapEntryValue.getCost();
+	}
+
+
+	/**
+	 * 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(StatefulCostFunctionMapEntryValue.class)) {
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__COST:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+				return;
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE:
+				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
+				(ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE,
+				 ApogyCoreEnvironmentEarthOrbitPlannerFactory.eINSTANCE.createCostFunctionState()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE,
+				 ApogyCoreEnvironmentEarthOrbitPlannerFactory.eINSTANCE.createSimpleResourceCostFunctionState()));
+	}
+
+	/**
+	 * Return the resource locator for this item provider's resources.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public ResourceLocator getResourceLocator() {
+		return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+	}
+
+}
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.ui/src/org/eclipse/apogy/core/environment/earth/orbit/planner/ui/composites/PlannerSolutionsComposite.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.ui/src/org/eclipse/apogy/core/environment/earth/orbit/planner/ui/composites/PlannerSolutionsComposite.java
index 31d41a8..8f47c91 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.ui/src/org/eclipse/apogy/core/environment/earth/orbit/planner/ui/composites/PlannerSolutionsComposite.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner.ui/src/org/eclipse/apogy/core/environment/earth/orbit/planner/ui/composites/PlannerSolutionsComposite.java
@@ -194,7 +194,8 @@
 		costColumn.setLabelProvider(new ColumnLabelProvider() {
 			@Override
 			public String getText(Object element) {
-				return Double.toString(((ObservationAnalysisPlannerNode) element).getCumulativeCost());
+				return Double.toString(ApogyCoreEnvironmentEarthOrbitPlannerFacade.INSTANCE.getSolutionTotalCost(
+						ApogyCoreEnvironmentEarthOrbitPlannerFacade.INSTANCE.getPlannerSolution((ObservationAnalysisPlannerNode) element)));
 			}
 		});
 		costColumn.getColumn().setData(AbstractECollectionComposite.TREE_COLUMN_MIN_WIDTH, COST_COL_MIN_WIDTH);
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/model/apogy_core_environment_earth_orbit_planner.xcore b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/model/apogy_core_environment_earth_orbit_planner.xcore
index 36e03f0..f03f260 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/model/apogy_core_environment_earth_orbit_planner.xcore
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/model/apogy_core_environment_earth_orbit_planner.xcore
@@ -108,26 +108,35 @@
 	
 	/*
 	 * Returns the total cost of all the stateless cost functions applicable to the specified visibility pass.
-	 * @param Refers the planner node.
+	 * @param node Refers the planner node.
 	 * @return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.
 	 */
-	op double getStatelessTotalCost(ObservationAnalysisPlannerNode plannerNode)
+	op double getNodeStatelessTotalCost(ObservationAnalysisPlannerNode node)
 	
 	/*
 	 * Returns the total cost of all the stateful cost functions applicable to the specified planner node.
-	 * @param Refers the planner node.
+	 * @param node Refers the planner node.
 	 * @return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.
 	 */
-	op double getStatefulTotalCost(ObservationAnalysisPlannerNode plannerNode)
+	op double getNodeStatefulTotalCost(ObservationAnalysisPlannerNode node)
 	
 	/*
 	 * Returns the total cost of all cost functions applicable to the specified planner node.
-	 * @param Refers the planner node.
+	 * @param node Refers the planner node.
 	 * @return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.
 	 * @see #getStatelessCostFunctionTotalCost(VisibilityPass)
 	 * @see #getStatefulCostFunctionTotalCost(ObservationAnalysisPlannerNode)
 	 */
-	op double getTotalCost(ObservationAnalysisPlannerNode plannerNode)
+	op double getNodeTotalCost(ObservationAnalysisPlannerNode node)
+	
+	/*
+	 * Returns the total cost of the specified plan.
+	 * @param plan Refers the plan.
+	 * @return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.
+	 * @see #getStatelessCostFunctionTotalCost(VisibilityPass)
+	 * @see #getStatefulCostFunctionTotalCost(ObservationAnalysisPlannerNode)
+	 */
+	op double getSolutionTotalCost(ObservationPlan plan)	
 }
 
 /*
@@ -186,6 +195,11 @@
 	@GenModel(property="None")
 	contains ObservationAnalysisPlannerNode[0..*] children opposite parent
 	
+	
+	derived boolean rootNode get {
+		return parent === null
+	}
+
 	refers local readonly volatile transient derived ObservationAnalysisPlannerNode plannerRootNode get {
 		if (parent === null) {
 			return this
@@ -214,7 +228,7 @@
 	 * Map that contains the Stateful cost function results.
 	 */
 	contains StatefulCostFunctionMapEntry[0..*] statefulCostsMapEntries
-	
+		
 	/*
 	 * Cost of the current node.  It corresponds to the sum of all applicable {@link StatelessCostFunctions} &
 	 * {@link StatefulCostFunctions}.
@@ -325,7 +339,6 @@
 }
 
 class CostFunctionState{
-	refers VisibilityPass previousPass
 }
 
 abstract class AbstractStatelessCostFunction extends AbstractCostFunction{
@@ -382,7 +395,12 @@
  */
 class StatefulCostFunctionMapEntry wraps java.util.Map$Entry{
 	refers AbstractStatefulCostFunction<CostFunctionState> key	
-	Double value
+	contains StatefulCostFunctionMapEntryValue value
+}
+
+class StatefulCostFunctionMapEntryValue{
+	contains CostFunctionState state
+	double cost
 }
 
 /*
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen-custom/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFacadeCustomImpl.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen-custom/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFacadeCustomImpl.java
index 1fa2a10..8a54f92 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen-custom/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFacadeCustomImpl.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen-custom/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFacadeCustomImpl.java
@@ -27,13 +27,16 @@
 import org.eclipse.apogy.core.environment.earth.orbit.EarthOrbitTool;
 import org.eclipse.apogy.core.environment.earth.orbit.EarthOrbitTools;
 import org.eclipse.apogy.core.environment.earth.orbit.VisibilityPass;
+import org.eclipse.apogy.core.environment.earth.orbit.planner.AbstractStatefulCostFunction;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.AbstractStatelessCostFunction;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFactory;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.Constants;
+import org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlanner;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerTool;
+import org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.StatelessCostFunctionMap;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.SubMonitor;
@@ -135,7 +138,7 @@
 
 			// Add the new costFunctionResultsMapEntry into the map.
 			AddCommand command = (AddCommand) AddCommand.create(
-					ApogyCommonTransactionFacade.INSTANCE.getDefaultEditingDomain(), planner.getResult().getStatelessCostsMapEntries(),
+					ApogyCommonTransactionFacade.INSTANCE.getDefaultEditingDomain(), planner.getResult(),
 					ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.OBSERVATION_ANALYSIS_PLANNER_RESULT__STATELESS_COSTS_MAP_ENTRIES,
 					statelessCostsMapEntry);
 			ApogyCommonTransactionFacade.INSTANCE.getDefaultEditingDomain().getCommandStack().execute(command);
@@ -150,31 +153,48 @@
 		return planner;
 	}
 
-	protected void computeStatefulCosts(ObservationAnalysisPlanner planner, ObservationAnalysisPlannerNode parent,
+	protected void computeStatefulCosts(ObservationAnalysisPlanner planner, ObservationAnalysisPlannerNode node,
 			IProgressMonitor monitor) {
 
-		SubMonitor subMonitor = SubMonitor.convert(monitor, parent.getChildren().size());
-		for (ObservationAnalysisPlannerNode node : parent.getChildren()) {
+		SubMonitor subMonitor = SubMonitor.convert(monitor, node.getChildren().size());
+		for (ObservationAnalysisPlannerNode child: node.getChildren()) {
 			// Process all stateless cost functions and cached their costs.
-			for (AbstractStatelessCostFunction costFunction : planner.getStatelessCostFunctions()) {
+			for (AbstractStatefulCostFunction<CostFunctionState> costFunction : planner.getStatefulCostFunctions()) {
 				if (costFunction.isEnable()) {
-//					planner.getResult().getgetObservationPlannerNodeStatefulCostFunctionResultsMapEntries()
-//							.put(costFunction, 10);
-//					
-//					// Create costFunctionResultsMapEntry.
-//					StatefulCostFunctionResultsMapEntriesImpl costFunctionResultsMapEntry = (VisibilityPassesStatelessCostFunctionResultsMapEntryImpl) ApogyCoreEnvironmentEarthOrbitPlannerFactory.eINSTANCE
-//							.create(ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.VISIBILITY_PASSES_STATELESS_COST_FUNCTION_RESULTS_MAP_ENTRY);
-//					costFunctionResultsMapEntry.setKey(visibilityPass);
-//					costFunctionResultsMapEntry.setValue(statelessCostFunctionResultsMapImpl);
-//
-//					// Add the new costFunctionResultsMapEntry into the map.
-//					AddCommand command = (AddCommand) AddCommand.create(
-//							ApogyCommonTransactionFacade.INSTANCE.getDefaultEditingDomain(), planner.getResult(),
-//							ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.OBSERVATION_ANALYSIS_PLANNER_RESULT__VISIBILITY_PASSES_STATELESS_COST_FUNCTION_RESULTS_MAP_ENTRIES,
-//							costFunctionResultsMapEntry);
-//					ApogyCommonTransactionFacade.INSTANCE.getDefaultEditingDomain().getCommandStack().execute(command);
 					
-//					totalCost += (costFunction.getCoefficient() * costFunction.computeCost(child.getPass()));
+					/*
+					 * Get the previous state.
+					 */
+					CostFunctionState previousState = null;					
+					if (!node.isRootNode()) {
+						StatefulCostFunctionMapEntryValue statefulCostFunctionMapEntryValue = node.getStatefulCostsMapEntries().get(costFunction);
+						previousState = statefulCostFunctionMapEntryValue != null? statefulCostFunctionMapEntryValue.getState(): null;
+					}
+					
+					/*
+					 * Create a new state and compute the cost.
+					 */
+					CostFunctionState nextState = costFunction.createState();					
+					double cost = costFunction.computeCost(previousState, nextState, child.getPass());					
+					StatefulCostFunctionMapEntryValue statefulCostFunctionMapEntryValue = ApogyCoreEnvironmentEarthOrbitPlannerFactory.eINSTANCE.createStatefulCostFunctionMapEntryValue();
+					statefulCostFunctionMapEntryValue.setCost(cost);
+					statefulCostFunctionMapEntryValue.setState(nextState);
+										
+					/*
+					 * Create an entry to store the cost and new state.
+					 */
+					StatefulCostFunctionMapEntryImpl statefulCostFunctionMapEntryImpl = new StatefulCostFunctionMapEntryImpl();
+					statefulCostFunctionMapEntryImpl.setKey(costFunction);					
+					statefulCostFunctionMapEntryImpl.setValue(statefulCostFunctionMapEntryValue);
+					
+					/*
+					 * Add the new StatefulCostFunctionMapEntry into the node map.
+					 */
+					AddCommand command = (AddCommand) AddCommand.create(
+							ApogyCommonTransactionFacade.INSTANCE.getDefaultEditingDomain(), child,
+							ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.OBSERVATION_ANALYSIS_PLANNER_NODE__STATEFUL_COSTS_MAP_ENTRIES,
+							statefulCostFunctionMapEntryImpl);
+					ApogyCommonTransactionFacade.INSTANCE.getDefaultEditingDomain().getCommandStack().execute(command);
 				}
 			}
 			// Store the computed cost and state.
@@ -240,7 +260,7 @@
 	}
 
 	@Override
-	public double getStatelessTotalCost(ObservationAnalysisPlannerNode plannerNode) {
+	public double getNodeStatelessTotalCost(ObservationAnalysisPlannerNode plannerNode) {
 		double cost = 0.0;
 		StatelessCostFunctionMap map = plannerNode.getResult()
 				.getStatelessCostsMapEntries().get(plannerNode.getPass());
@@ -253,19 +273,25 @@
 	}
 
 	@Override
-	public double getStatefulTotalCost(ObservationAnalysisPlannerNode plannerNode) {
+	public double getNodeStatefulTotalCost(ObservationAnalysisPlannerNode plannerNode) {
 		double cost = 0.0;		
-		for (Double value: plannerNode.getStatefulCostsMapEntries().values()) {
-			cost += value.doubleValue();
+		for (StatefulCostFunctionMapEntryValue value: plannerNode.getStatefulCostsMapEntries().values()) {
+			cost += value.getCost();
 		}		
 		return cost;
 	}
 
 	@Override
-	public double getTotalCost(ObservationAnalysisPlannerNode plannerNode) {
-		return 0.0;
-
-//		getStatelessCostFunctionTotalCost(plannerNode)
-//				+ getStatefulCostFunctionTotalCost(plannerNode);
+	public double getNodeTotalCost(ObservationAnalysisPlannerNode plannerNode) {
+		return getNodeStatelessTotalCost(plannerNode) + getNodeStatefulTotalCost(plannerNode);
+	}
+	
+	@Override
+	public double getSolutionTotalCost(EObjectReferencesList<ObservationAnalysisPlannerNode> plan) {
+		double cost = 0.0;		
+		for(ObservationAnalysisPlannerNode node: plan.getEObjects()) {
+			cost += getNodeTotalCost(node);
+		}		
+		return cost;
 	}
 }
\ No newline at end of file
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen-custom/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ObservationAnalysisPlannerNodeCustomImpl.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen-custom/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ObservationAnalysisPlannerNodeCustomImpl.java
index 6d56cf6..12f7fd3 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen-custom/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ObservationAnalysisPlannerNodeCustomImpl.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen-custom/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ObservationAnalysisPlannerNodeCustomImpl.java
@@ -18,7 +18,7 @@
 public class ObservationAnalysisPlannerNodeCustomImpl extends ObservationAnalysisPlannerNodeImpl {
 	@Override
 	public double getCost() {
-		return ApogyCoreEnvironmentEarthOrbitPlannerFacadeCustomImpl.INSTANCE.getTotalCost(this);
+		return ApogyCoreEnvironmentEarthOrbitPlannerFacadeCustomImpl.INSTANCE.getNodeTotalCost(this);
 	}
 
 	@Override
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerFacade.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerFacade.java
index 5e96622..fd050ee 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerFacade.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerFacade.java
@@ -125,41 +125,56 @@
 	 * <!-- end-user-doc -->
 	 * <!-- begin-model-doc -->
 	 * Returns the total cost of all the stateless cost functions applicable to the specified visibility pass.
-	 * @param Refers the planner node.
+	 * @param node Refers the planner node.
 	 * @return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.
 	 * <!-- end-model-doc -->
-	 * @model unique="false" plannerNodeUnique="false"
+	 * @model unique="false" nodeUnique="false"
 	 * @generated
 	 */
-	double getStatelessTotalCost(ObservationAnalysisPlannerNode plannerNode);
+	double getNodeStatelessTotalCost(ObservationAnalysisPlannerNode node);
 
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * <!-- begin-model-doc -->
 	 * Returns the total cost of all the stateful cost functions applicable to the specified planner node.
-	 * @param Refers the planner node.
+	 * @param node Refers the planner node.
 	 * @return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.
 	 * <!-- end-model-doc -->
-	 * @model unique="false" plannerNodeUnique="false"
+	 * @model unique="false" nodeUnique="false"
 	 * @generated
 	 */
-	double getStatefulTotalCost(ObservationAnalysisPlannerNode plannerNode);
+	double getNodeStatefulTotalCost(ObservationAnalysisPlannerNode node);
 
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * <!-- begin-model-doc -->
 	 * Returns the total cost of all cost functions applicable to the specified planner node.
-	 * @param Refers the planner node.
+	 * @param node Refers the planner node.
 	 * @return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.
 	 * @see #getStatelessCostFunctionTotalCost(VisibilityPass)
 	 * @see #getStatefulCostFunctionTotalCost(ObservationAnalysisPlannerNode)
 	 * <!-- end-model-doc -->
-	 * @model unique="false" plannerNodeUnique="false"
+	 * @model unique="false" nodeUnique="false"
 	 * @generated
 	 */
-	double getTotalCost(ObservationAnalysisPlannerNode plannerNode);
+	double getNodeTotalCost(ObservationAnalysisPlannerNode node);
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * <!-- begin-model-doc -->
+	 * Returns the total cost of the specified plan.
+	 * @param plan Refers the plan.
+	 * @return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.
+	 * @see #getStatelessCostFunctionTotalCost(VisibilityPass)
+	 * @see #getStatefulCostFunctionTotalCost(ObservationAnalysisPlannerNode)
+	 * <!-- end-model-doc -->
+	 * @model unique="false" planDataType="org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationPlan" planUnique="false"
+	 * @generated
+	 */
+	double getSolutionTotalCost(EObjectReferencesList<ObservationAnalysisPlannerNode> plan);
 
 	
     /**
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerFactory.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerFactory.java
index 962d297..9ae8853 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerFactory.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerFactory.java
@@ -124,6 +124,15 @@
 	StatelessCostFunctionMap createStatelessCostFunctionMap();
 
 	/**
+	 * Returns a new object of class '<em>Stateful Cost Function Map Entry Value</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>Stateful Cost Function Map Entry Value</em>'.
+	 * @generated
+	 */
+	StatefulCostFunctionMapEntryValue createStatefulCostFunctionMapEntryValue();
+
+	/**
 	 * Returns a new object of class '<em>Eclipse Cost Function</em>'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerPackage.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerPackage.java
index c5fb334..248cbbb 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerPackage.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ApogyCoreEnvironmentEarthOrbitPlannerPackage.java
@@ -152,31 +152,40 @@
 	int APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_VISIBILITY_PASSES__LIST = 5;
 
 	/**
-	 * The operation id for the '<em>Get Stateless Total Cost</em>' operation.
+	 * The operation id for the '<em>Get Node Stateless Total Cost</em>' operation.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_STATELESS_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = 6;
+	int APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_STATELESS_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = 6;
 
 	/**
-	 * The operation id for the '<em>Get Stateful Total Cost</em>' operation.
+	 * The operation id for the '<em>Get Node Stateful Total Cost</em>' operation.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_STATEFUL_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = 7;
+	int APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_STATEFUL_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = 7;
 
 	/**
-	 * The operation id for the '<em>Get Total Cost</em>' operation.
+	 * The operation id for the '<em>Get Node Total Cost</em>' operation.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = 8;
+	int APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = 8;
+
+	/**
+	 * The operation id for the '<em>Get Solution Total Cost</em>' operation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_SOLUTION_TOTAL_COST__EOBJECTREFERENCESLIST = 9;
 
 	/**
 	 * The number of operations of the '<em>Facade</em>' class.
@@ -185,7 +194,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE_OPERATION_COUNT = 9;
+	int APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE_OPERATION_COUNT = 10;
 
 	/**
 	 * The meta object id for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ObservationAnalysisPlannerToolImpl <em>Observation Analysis Planner Tool</em>}' class.
@@ -407,13 +416,22 @@
 	int OBSERVATION_ANALYSIS_PLANNER_NODE__CHILDREN = 4;
 
 	/**
+	 * The feature id for the '<em><b>Root Node</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__ROOT_NODE = 5;
+
+	/**
 	 * The feature id for the '<em><b>Planner Root Node</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER_ROOT_NODE = 5;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER_ROOT_NODE = 6;
 
 	/**
 	 * The feature id for the '<em><b>Planner Result</b></em>' reference.
@@ -422,7 +440,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER_RESULT = 6;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER_RESULT = 7;
 
 	/**
 	 * The feature id for the '<em><b>Planner</b></em>' reference.
@@ -431,7 +449,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER = 7;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER = 8;
 
 	/**
 	 * The feature id for the '<em><b>Stateful Costs Map Entries</b></em>' map.
@@ -440,7 +458,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__STATEFUL_COSTS_MAP_ENTRIES = 8;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__STATEFUL_COSTS_MAP_ENTRIES = 9;
 
 	/**
 	 * The feature id for the '<em><b>Cost</b></em>' attribute.
@@ -449,7 +467,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__COST = 9;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__COST = 10;
 
 	/**
 	 * The feature id for the '<em><b>Cumulative Cost</b></em>' attribute.
@@ -458,7 +476,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__CUMULATIVE_COST = 10;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__CUMULATIVE_COST = 11;
 
 	/**
 	 * The feature id for the '<em><b>First Level Node</b></em>' reference.
@@ -467,7 +485,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__FIRST_LEVEL_NODE = 11;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__FIRST_LEVEL_NODE = 12;
 
 	/**
 	 * The feature id for the '<em><b>Level</b></em>' attribute.
@@ -476,7 +494,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__LEVEL = 12;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__LEVEL = 13;
 
 	/**
 	 * The feature id for the '<em><b>Solution Duration</b></em>' attribute.
@@ -485,7 +503,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__SOLUTION_DURATION = 13;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__SOLUTION_DURATION = 14;
 
 	/**
 	 * The feature id for the '<em><b>Pass Duration</b></em>' attribute.
@@ -494,7 +512,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__PASS_DURATION = 14;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__PASS_DURATION = 15;
 
 	/**
 	 * The feature id for the '<em><b>Total Passes Duration</b></em>' attribute.
@@ -503,7 +521,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE__TOTAL_PASSES_DURATION = 15;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE__TOTAL_PASSES_DURATION = 16;
 
 	/**
 	 * The number of structural features of the '<em>Observation Analysis Planner Node</em>' class.
@@ -512,7 +530,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE_FEATURE_COUNT = 16;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE_FEATURE_COUNT = 17;
 
 	/**
 	 * The number of operations of the '<em>Observation Analysis Planner Node</em>' class.
@@ -953,22 +971,13 @@
 	int COST_FUNCTION_STATE = 9;
 
 	/**
-	 * The feature id for the '<em><b>Previous Pass</b></em>' reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 * @ordered
-	 */
-	int COST_FUNCTION_STATE__PREVIOUS_PASS = 0;
-
-	/**
 	 * The number of structural features of the '<em>Cost Function State</em>' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int COST_FUNCTION_STATE_FEATURE_COUNT = 1;
+	int COST_FUNCTION_STATE_FEATURE_COUNT = 0;
 
 	/**
 	 * The number of operations of the '<em>Cost Function State</em>' class.
@@ -1374,7 +1383,7 @@
 	int STATEFUL_COST_FUNCTION_MAP_ENTRY__KEY = 0;
 
 	/**
-	 * The feature id for the '<em><b>Value</b></em>' attribute.
+	 * The feature id for the '<em><b>Value</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -1401,6 +1410,52 @@
 	int STATEFUL_COST_FUNCTION_MAP_ENTRY_OPERATION_COUNT = 0;
 
 	/**
+	 * The meta object id for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.StatefulCostFunctionMapEntryValueImpl <em>Stateful Cost Function Map Entry Value</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.StatefulCostFunctionMapEntryValueImpl
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getStatefulCostFunctionMapEntryValue()
+	 * @generated
+	 */
+	int STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE = 17;
+
+	/**
+	 * The feature id for the '<em><b>State</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE = 0;
+
+	/**
+	 * The feature id for the '<em><b>Cost</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__COST = 1;
+
+	/**
+	 * The number of structural features of the '<em>Stateful Cost Function Map Entry Value</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE_FEATURE_COUNT = 2;
+
+	/**
+	 * The number of operations of the '<em>Stateful Cost Function Map Entry Value</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE_OPERATION_COUNT = 0;
+
+	/**
 	 * The meta object id for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.EclipseCostFunctionImpl <em>Eclipse Cost Function</em>}' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -1408,7 +1463,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getEclipseCostFunction()
 	 * @generated
 	 */
-	int ECLIPSE_COST_FUNCTION = 17;
+	int ECLIPSE_COST_FUNCTION = 18;
 
 	/**
 	 * The feature id for the '<em><b>Name</b></em>' attribute.
@@ -1517,7 +1572,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getTimeIntervalCostFunction()
 	 * @generated
 	 */
-	int TIME_INTERVAL_COST_FUNCTION = 18;
+	int TIME_INTERVAL_COST_FUNCTION = 19;
 
 	/**
 	 * The feature id for the '<em><b>Name</b></em>' attribute.
@@ -1644,7 +1699,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getSimpleResourceCostFunction()
 	 * @generated
 	 */
-	int SIMPLE_RESOURCE_COST_FUNCTION = 19;
+	int SIMPLE_RESOURCE_COST_FUNCTION = 20;
 
 	/**
 	 * The feature id for the '<em><b>Name</b></em>' attribute.
@@ -1771,16 +1826,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getSimpleResourceCostFunctionState()
 	 * @generated
 	 */
-	int SIMPLE_RESOURCE_COST_FUNCTION_STATE = 20;
-
-	/**
-	 * The feature id for the '<em><b>Previous Pass</b></em>' reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 * @ordered
-	 */
-	int SIMPLE_RESOURCE_COST_FUNCTION_STATE__PREVIOUS_PASS = COST_FUNCTION_STATE__PREVIOUS_PASS;
+	int SIMPLE_RESOURCE_COST_FUNCTION_STATE = 21;
 
 	/**
 	 * The feature id for the '<em><b>Value</b></em>' attribute.
@@ -1817,7 +1863,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getMinimumTimeSpamCostFunction()
 	 * @generated
 	 */
-	int MINIMUM_TIME_SPAM_COST_FUNCTION = 21;
+	int MINIMUM_TIME_SPAM_COST_FUNCTION = 22;
 
 	/**
 	 * The feature id for the '<em><b>Name</b></em>' attribute.
@@ -1926,7 +1972,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getCrosstrackAngleCostFunction()
 	 * @generated
 	 */
-	int CROSSTRACK_ANGLE_COST_FUNCTION = 22;
+	int CROSSTRACK_ANGLE_COST_FUNCTION = 23;
 
 	/**
 	 * The feature id for the '<em><b>Name</b></em>' attribute.
@@ -2035,7 +2081,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getEclipsePeriod()
 	 * @generated
 	 */
-	int ECLIPSE_PERIOD = 23;
+	int ECLIPSE_PERIOD = 24;
 
 	/**
 	 * The meta object id for the '<em>Observation Plan</em>' data type.
@@ -2045,7 +2091,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getObservationPlan()
 	 * @generated
 	 */
-	int OBSERVATION_PLAN = 24;
+	int OBSERVATION_PLAN = 25;
 
 	/**
 	 * The meta object id for the '<em>Observation Analysis Planner Node List</em>' data type.
@@ -2055,7 +2101,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getObservationAnalysisPlannerNodeList()
 	 * @generated
 	 */
-	int OBSERVATION_ANALYSIS_PLANNER_NODE_LIST = 25;
+	int OBSERVATION_ANALYSIS_PLANNER_NODE_LIST = 26;
 
 	/**
 	 * The meta object id for the '<em>Visibility Passes List</em>' data type.
@@ -2065,7 +2111,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getVisibilityPassesList()
 	 * @generated
 	 */
-	int VISIBILITY_PASSES_LIST = 26;
+	int VISIBILITY_PASSES_LIST = 27;
 
 	/**
 	 * The meta object id for the '<em>IProgress Monitor</em>' data type.
@@ -2075,7 +2121,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getIProgressMonitor()
 	 * @generated
 	 */
-	int IPROGRESS_MONITOR = 27;
+	int IPROGRESS_MONITOR = 28;
 
 	/**
 	 * The meta object id for the '<em>Visibility Pass References List</em>' data type.
@@ -2085,7 +2131,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getVisibilityPassReferencesList()
 	 * @generated
 	 */
-	int VISIBILITY_PASS_REFERENCES_LIST = 28;
+	int VISIBILITY_PASS_REFERENCES_LIST = 29;
 
 	/**
 	 * The meta object id for the '<em>Exception</em>' data type.
@@ -2095,7 +2141,7 @@
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getException()
 	 * @generated
 	 */
-	int EXCEPTION = 29;
+	int EXCEPTION = 30;
 
 
 	/**
@@ -2169,34 +2215,44 @@
 	EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetVisibilityPasses__List();
 
 	/**
-	 * Returns the meta object for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getStatelessTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode) <em>Get Stateless Total Cost</em>}' operation.
+	 * Returns the meta object for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getNodeStatelessTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode) <em>Get Node Stateless Total Cost</em>}' operation.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return the meta object for the '<em>Get Stateless Total Cost</em>' operation.
-	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getStatelessTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode)
+	 * @return the meta object for the '<em>Get Node Stateless Total Cost</em>' operation.
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getNodeStatelessTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode)
 	 * @generated
 	 */
-	EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetStatelessTotalCost__ObservationAnalysisPlannerNode();
+	EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeStatelessTotalCost__ObservationAnalysisPlannerNode();
 
 	/**
-	 * Returns the meta object for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getStatefulTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode) <em>Get Stateful Total Cost</em>}' operation.
+	 * Returns the meta object for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getNodeStatefulTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode) <em>Get Node Stateful Total Cost</em>}' operation.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return the meta object for the '<em>Get Stateful Total Cost</em>' operation.
-	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getStatefulTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode)
+	 * @return the meta object for the '<em>Get Node Stateful Total Cost</em>' operation.
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getNodeStatefulTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode)
 	 * @generated
 	 */
-	EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetStatefulTotalCost__ObservationAnalysisPlannerNode();
+	EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeStatefulTotalCost__ObservationAnalysisPlannerNode();
 
 	/**
-	 * Returns the meta object for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode) <em>Get Total Cost</em>}' operation.
+	 * Returns the meta object for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getNodeTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode) <em>Get Node Total Cost</em>}' operation.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return the meta object for the '<em>Get Total Cost</em>' operation.
-	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode)
+	 * @return the meta object for the '<em>Get Node Total Cost</em>' operation.
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getNodeTotalCost(org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode)
 	 * @generated
 	 */
-	EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetTotalCost__ObservationAnalysisPlannerNode();
+	EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeTotalCost__ObservationAnalysisPlannerNode();
+
+	/**
+	 * Returns the meta object for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getSolutionTotalCost(org.eclipse.apogy.common.emf.EObjectReferencesList) <em>Get Solution Total Cost</em>}' operation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the '<em>Get Solution Total Cost</em>' operation.
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerFacade#getSolutionTotalCost(org.eclipse.apogy.common.emf.EObjectReferencesList)
+	 * @generated
+	 */
+	EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetSolutionTotalCost__EObjectReferencesList();
 
 	/**
 	 * Returns the meta object for class '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerTool <em>Observation Analysis Planner Tool</em>}'.
@@ -2372,6 +2428,17 @@
 	EReference getObservationAnalysisPlannerNode_Children();
 
 	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode#isRootNode <em>Root Node</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Root Node</em>'.
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode#isRootNode()
+	 * @see #getObservationAnalysisPlannerNode()
+	 * @generated
+	 */
+	EAttribute getObservationAnalysisPlannerNode_RootNode();
+
+	/**
 	 * Returns the meta object for the reference '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode#getPlannerRootNode <em>Planner Root Node</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -2618,17 +2685,6 @@
 	EClass getCostFunctionState();
 
 	/**
-	 * Returns the meta object for the reference '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState#getPreviousPass <em>Previous Pass</em>}'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return the meta object for the reference '<em>Previous Pass</em>'.
-	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState#getPreviousPass()
-	 * @see #getCostFunctionState()
-	 * @generated
-	 */
-	EReference getCostFunctionState_PreviousPass();
-
-	/**
 	 * Returns the meta object for class '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.AbstractStatelessCostFunction <em>Abstract Stateless Cost Function</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -2817,7 +2873,7 @@
 	 * @return the meta object for class '<em>Stateful Cost Function Map Entry</em>'.
 	 * @see java.util.Map.Entry
 	 * @model keyType="org.eclipse.apogy.core.environment.earth.orbit.planner.AbstractStatefulCostFunction&lt;org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState&gt;"
-	 *        valueUnique="false" valueDataType="org.eclipse.emf.ecore.EDoubleObject"
+	 *        valueType="org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue" valueContainment="true"
 	 * @generated
 	 */
 	EClass getStatefulCostFunctionMapEntry();
@@ -2834,15 +2890,47 @@
 	EReference getStatefulCostFunctionMapEntry_Key();
 
 	/**
-	 * Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Value</em>}'.
+	 * Returns the meta object for the containment reference '{@link java.util.Map.Entry <em>Value</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return the meta object for the attribute '<em>Value</em>'.
+	 * @return the meta object for the containment reference '<em>Value</em>'.
 	 * @see java.util.Map.Entry
 	 * @see #getStatefulCostFunctionMapEntry()
 	 * @generated
 	 */
-	EAttribute getStatefulCostFunctionMapEntry_Value();
+	EReference getStatefulCostFunctionMapEntry_Value();
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue <em>Stateful Cost Function Map Entry Value</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Stateful Cost Function Map Entry Value</em>'.
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue
+	 * @generated
+	 */
+	EClass getStatefulCostFunctionMapEntryValue();
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue#getState <em>State</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>State</em>'.
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue#getState()
+	 * @see #getStatefulCostFunctionMapEntryValue()
+	 * @generated
+	 */
+	EReference getStatefulCostFunctionMapEntryValue_State();
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue#getCost <em>Cost</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Cost</em>'.
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue#getCost()
+	 * @see #getStatefulCostFunctionMapEntryValue()
+	 * @generated
+	 */
+	EAttribute getStatefulCostFunctionMapEntryValue_Cost();
 
 	/**
 	 * Returns the meta object for class '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.EclipseCostFunction <em>Eclipse Cost Function</em>}'.
@@ -3172,28 +3260,36 @@
 		EOperation APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_VISIBILITY_PASSES__LIST = eINSTANCE.getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetVisibilityPasses__List();
 
 		/**
-		 * The meta object literal for the '<em><b>Get Stateless Total Cost</b></em>' operation.
+		 * The meta object literal for the '<em><b>Get Node Stateless Total Cost</b></em>' operation.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
 		 * @generated
 		 */
-		EOperation APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_STATELESS_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = eINSTANCE.getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetStatelessTotalCost__ObservationAnalysisPlannerNode();
+		EOperation APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_STATELESS_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = eINSTANCE.getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeStatelessTotalCost__ObservationAnalysisPlannerNode();
 
 		/**
-		 * The meta object literal for the '<em><b>Get Stateful Total Cost</b></em>' operation.
+		 * The meta object literal for the '<em><b>Get Node Stateful Total Cost</b></em>' operation.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
 		 * @generated
 		 */
-		EOperation APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_STATEFUL_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = eINSTANCE.getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetStatefulTotalCost__ObservationAnalysisPlannerNode();
+		EOperation APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_STATEFUL_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = eINSTANCE.getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeStatefulTotalCost__ObservationAnalysisPlannerNode();
 
 		/**
-		 * The meta object literal for the '<em><b>Get Total Cost</b></em>' operation.
+		 * The meta object literal for the '<em><b>Get Node Total Cost</b></em>' operation.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
 		 * @generated
 		 */
-		EOperation APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = eINSTANCE.getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetTotalCost__ObservationAnalysisPlannerNode();
+		EOperation APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE = eINSTANCE.getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeTotalCost__ObservationAnalysisPlannerNode();
+
+		/**
+		 * The meta object literal for the '<em><b>Get Solution Total Cost</b></em>' operation.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EOperation APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_SOLUTION_TOTAL_COST__EOBJECTREFERENCESLIST = eINSTANCE.getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetSolutionTotalCost__EObjectReferencesList();
 
 		/**
 		 * The meta object literal for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ObservationAnalysisPlannerToolImpl <em>Observation Analysis Planner Tool</em>}' class.
@@ -3330,6 +3426,14 @@
 		EReference OBSERVATION_ANALYSIS_PLANNER_NODE__CHILDREN = eINSTANCE.getObservationAnalysisPlannerNode_Children();
 
 		/**
+		 * The meta object literal for the '<em><b>Root Node</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute OBSERVATION_ANALYSIS_PLANNER_NODE__ROOT_NODE = eINSTANCE.getObservationAnalysisPlannerNode_RootNode();
+
+		/**
 		 * The meta object literal for the '<em><b>Planner Root Node</b></em>' reference feature.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
@@ -3526,14 +3630,6 @@
 		EClass COST_FUNCTION_STATE = eINSTANCE.getCostFunctionState();
 
 		/**
-		 * The meta object literal for the '<em><b>Previous Pass</b></em>' reference feature.
-		 * <!-- begin-user-doc -->
-		 * <!-- end-user-doc -->
-		 * @generated
-		 */
-		EReference COST_FUNCTION_STATE__PREVIOUS_PASS = eINSTANCE.getCostFunctionState_PreviousPass();
-
-		/**
 		 * The meta object literal for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.AbstractStatelessCostFunctionImpl <em>Abstract Stateless Cost Function</em>}' class.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
@@ -3700,12 +3796,38 @@
 		EReference STATEFUL_COST_FUNCTION_MAP_ENTRY__KEY = eINSTANCE.getStatefulCostFunctionMapEntry_Key();
 
 		/**
-		 * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+		 * The meta object literal for the '<em><b>Value</b></em>' containment reference feature.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
 		 * @generated
 		 */
-		EAttribute STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE = eINSTANCE.getStatefulCostFunctionMapEntry_Value();
+		EReference STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE = eINSTANCE.getStatefulCostFunctionMapEntry_Value();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.StatefulCostFunctionMapEntryValueImpl <em>Stateful Cost Function Map Entry Value</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.StatefulCostFunctionMapEntryValueImpl
+		 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl#getStatefulCostFunctionMapEntryValue()
+		 * @generated
+		 */
+		EClass STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE = eINSTANCE.getStatefulCostFunctionMapEntryValue();
+
+		/**
+		 * The meta object literal for the '<em><b>State</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE = eINSTANCE.getStatefulCostFunctionMapEntryValue_State();
+
+		/**
+		 * The meta object literal for the '<em><b>Cost</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__COST = eINSTANCE.getStatefulCostFunctionMapEntryValue_Cost();
 
 		/**
 		 * The meta object literal for the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.EclipseCostFunctionImpl <em>Eclipse Cost Function</em>}' class.
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/CostFunctionState.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/CostFunctionState.java
index d7196c3..2e73367 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/CostFunctionState.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/CostFunctionState.java
@@ -14,8 +14,6 @@
  */
 package org.eclipse.apogy.core.environment.earth.orbit.planner;
 
-import org.eclipse.apogy.core.environment.earth.orbit.VisibilityPass;
-
 import org.eclipse.emf.ecore.EObject;
 
 /**
@@ -23,43 +21,11 @@
  * A representation of the model object '<em><b>Cost Function State</b></em>'.
  * <!-- end-user-doc -->
  *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState#getPreviousPass <em>Previous Pass</em>}</li>
- * </ul>
  *
  * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage#getCostFunctionState()
  * @model
  * @generated
  */
 public interface CostFunctionState extends EObject {
-	/**
-	 * Returns the value of the '<em><b>Previous Pass</b></em>' reference.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Previous Pass</em>' reference isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Previous Pass</em>' reference.
-	 * @see #setPreviousPass(VisibilityPass)
-	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage#getCostFunctionState_PreviousPass()
-	 * @model
-	 * @generated
-	 */
-	VisibilityPass getPreviousPass();
-
-	/**
-	 * Sets the value of the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState#getPreviousPass <em>Previous Pass</em>}' reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @param value the new value of the '<em>Previous Pass</em>' reference.
-	 * @see #getPreviousPass()
-	 * @generated
-	 */
-	void setPreviousPass(VisibilityPass value);
-
 	
 } // CostFunctionState
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ObservationAnalysisPlannerNode.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ObservationAnalysisPlannerNode.java
index ee2d51d..3544019 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ObservationAnalysisPlannerNode.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/ObservationAnalysisPlannerNode.java
@@ -35,6 +35,7 @@
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode#getPass <em>Pass</em>}</li>
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode#getParent <em>Parent</em>}</li>
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode#getChildren <em>Children</em>}</li>
+ *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode#isRootNode <em>Root Node</em>}</li>
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode#getPlannerRootNode <em>Planner Root Node</em>}</li>
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode#getPlannerResult <em>Planner Result</em>}</li>
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode#getPlanner <em>Planner</em>}</li>
@@ -182,6 +183,21 @@
 	EList<ObservationAnalysisPlannerNode> getChildren();
 
 	/**
+	 * Returns the value of the '<em><b>Root Node</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Root Node</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Root Node</em>' attribute.
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage#getObservationAnalysisPlannerNode_RootNode()
+	 * @model unique="false" transient="true" changeable="false" volatile="true" derived="true"
+	 * @generated
+	 */
+	boolean isRootNode();
+
+	/**
 	 * Returns the value of the '<em><b>Planner Root Node</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <p>
@@ -229,7 +245,7 @@
 	/**
 	 * Returns the value of the '<em><b>Stateful Costs Map Entries</b></em>' map.
 	 * The key is of type {@link org.eclipse.apogy.core.environment.earth.orbit.planner.AbstractStatefulCostFunction<org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState>},
-	 * and the value is of type {@link java.lang.Double},
+	 * and the value is of type {@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue},
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * <!-- begin-model-doc -->
@@ -237,10 +253,10 @@
 	 * <!-- end-model-doc -->
 	 * @return the value of the '<em>Stateful Costs Map Entries</em>' map.
 	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage#getObservationAnalysisPlannerNode_StatefulCostsMapEntries()
-	 * @model mapType="org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntry&lt;org.eclipse.apogy.core.environment.earth.orbit.planner.AbstractStatefulCostFunction&lt;org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState&gt;, org.eclipse.emf.ecore.EDoubleObject&gt;"
+	 * @model mapType="org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntry&lt;org.eclipse.apogy.core.environment.earth.orbit.planner.AbstractStatefulCostFunction&lt;org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState&gt;, org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue&gt;"
 	 * @generated
 	 */
-	EMap<AbstractStatefulCostFunction<CostFunctionState>, Double> getStatefulCostsMapEntries();
+	EMap<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue> getStatefulCostsMapEntries();
 
 	/**
 	 * Returns the value of the '<em><b>Cost</b></em>' attribute.
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/StatefulCostFunctionMapEntryValue.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/StatefulCostFunctionMapEntryValue.java
new file mode 100644
index 0000000..b9a5e18
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/StatefulCostFunctionMapEntryValue.java
@@ -0,0 +1,90 @@
+/**
+ * *******************************************************************************
+ * Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *      Regent L'Archeveque - initial API and implementation
+ *         
+ * SPDX-License-Identifier: EPL-1.0    
+ * *******************************************************************************
+ */
+package org.eclipse.apogy.core.environment.earth.orbit.planner;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Stateful Cost Function Map Entry Value</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue#getState <em>State</em>}</li>
+ *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue#getCost <em>Cost</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage#getStatefulCostFunctionMapEntryValue()
+ * @model
+ * @generated
+ */
+public interface StatefulCostFunctionMapEntryValue extends EObject {
+	/**
+	 * Returns the value of the '<em><b>State</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>State</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>State</em>' containment reference.
+	 * @see #setState(CostFunctionState)
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage#getStatefulCostFunctionMapEntryValue_State()
+	 * @model containment="true"
+	 * @generated
+	 */
+	CostFunctionState getState();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue#getState <em>State</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>State</em>' containment reference.
+	 * @see #getState()
+	 * @generated
+	 */
+	void setState(CostFunctionState value);
+
+	/**
+	 * Returns the value of the '<em><b>Cost</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cost</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cost</em>' attribute.
+	 * @see #setCost(double)
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage#getStatefulCostFunctionMapEntryValue_Cost()
+	 * @model unique="false"
+	 * @generated
+	 */
+	double getCost();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue#getCost <em>Cost</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cost</em>' attribute.
+	 * @see #getCost()
+	 * @generated
+	 */
+	void setCost(double value);
+
+	
+} // StatefulCostFunctionMapEntryValue
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFacadeImpl.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFacadeImpl.java
index 50373a0..3f9c54c 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFacadeImpl.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFacadeImpl.java
@@ -134,7 +134,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public double getStatelessTotalCost(ObservationAnalysisPlannerNode plannerNode) {
+	public double getNodeStatelessTotalCost(ObservationAnalysisPlannerNode node) {
 		// TODO: implement this method
 		// Ensure that you remove @generated or mark it @generated NOT
 		throw new UnsupportedOperationException();
@@ -145,7 +145,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public double getStatefulTotalCost(ObservationAnalysisPlannerNode plannerNode) {
+	public double getNodeStatefulTotalCost(ObservationAnalysisPlannerNode node) {
 		// TODO: implement this method
 		// Ensure that you remove @generated or mark it @generated NOT
 		throw new UnsupportedOperationException();
@@ -156,7 +156,18 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public double getTotalCost(ObservationAnalysisPlannerNode plannerNode) {
+	public double getNodeTotalCost(ObservationAnalysisPlannerNode node) {
+		// TODO: implement this method
+		// Ensure that you remove @generated or mark it @generated NOT
+		throw new UnsupportedOperationException();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public double getSolutionTotalCost(EObjectReferencesList<ObservationAnalysisPlannerNode> plan) {
 		// TODO: implement this method
 		// Ensure that you remove @generated or mark it @generated NOT
 		throw new UnsupportedOperationException();
@@ -183,12 +194,14 @@
 				return getPlannerSolution((ObservationAnalysisPlannerNode)arguments.get(0));
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_VISIBILITY_PASSES__LIST:
 				return getVisibilityPasses((List<ObservationAnalysisPlannerNode>)arguments.get(0));
-			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_STATELESS_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE:
-				return getStatelessTotalCost((ObservationAnalysisPlannerNode)arguments.get(0));
-			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_STATEFUL_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE:
-				return getStatefulTotalCost((ObservationAnalysisPlannerNode)arguments.get(0));
-			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE:
-				return getTotalCost((ObservationAnalysisPlannerNode)arguments.get(0));
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_STATELESS_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE:
+				return getNodeStatelessTotalCost((ObservationAnalysisPlannerNode)arguments.get(0));
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_STATEFUL_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE:
+				return getNodeStatefulTotalCost((ObservationAnalysisPlannerNode)arguments.get(0));
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE:
+				return getNodeTotalCost((ObservationAnalysisPlannerNode)arguments.get(0));
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_SOLUTION_TOTAL_COST__EOBJECTREFERENCESLIST:
+				return getSolutionTotalCost((EObjectReferencesList<ObservationAnalysisPlannerNode>)arguments.get(0));
 		}
 		return super.eInvoke(operationID, arguments);
 	}
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFactoryImpl.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFactoryImpl.java
index 0058b85..aa6ae1c 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFactoryImpl.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerFactoryImpl.java
@@ -91,6 +91,7 @@
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATELESS_COST_FUNCTION_MAP: return createStatelessCostFunctionMap();
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATELESS_COST_FUNCTION_MAP_ENTRY: return (EObject)createStatelessCostFunctionMapEntry();
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY: return (EObject)createStatefulCostFunctionMapEntry();
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE: return createStatefulCostFunctionMapEntryValue();
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.ECLIPSE_COST_FUNCTION: return createEclipseCostFunction();
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.TIME_INTERVAL_COST_FUNCTION: return createTimeIntervalCostFunction();
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.SIMPLE_RESOURCE_COST_FUNCTION: return createSimpleResourceCostFunction();
@@ -281,7 +282,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, Double> createStatefulCostFunctionMapEntry() {
+	public Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue> createStatefulCostFunctionMapEntry() {
 		StatefulCostFunctionMapEntryImpl statefulCostFunctionMapEntry = new StatefulCostFunctionMapEntryImpl();
 		return statefulCostFunctionMapEntry;
 	}
@@ -291,6 +292,16 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public StatefulCostFunctionMapEntryValue createStatefulCostFunctionMapEntryValue() {
+		StatefulCostFunctionMapEntryValueImpl statefulCostFunctionMapEntryValue = new StatefulCostFunctionMapEntryValueImpl();
+		return statefulCostFunctionMapEntryValue;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public EclipseCostFunction createEclipseCostFunction() {
 		EclipseCostFunctionImpl eclipseCostFunction = new EclipseCostFunctionCustomImpl();
 		return eclipseCostFunction;
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl.java
index dcd788e..5378163 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ApogyCoreEnvironmentEarthOrbitPlannerPackageImpl.java
@@ -57,6 +57,7 @@
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerTool;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.SimpleResourceCostFunction;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.SimpleResourceCostFunctionState;
+import org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.StatelessCostFunctionMap;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.TimeIntervalCostFunction;
 
@@ -210,6 +211,13 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	private EClass statefulCostFunctionMapEntryValueEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	private EClass eclipseCostFunctionEClass = null;
 
 	/**
@@ -439,7 +447,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetStatelessTotalCost__ObservationAnalysisPlannerNode() {
+	public EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeStatelessTotalCost__ObservationAnalysisPlannerNode() {
 		return apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass.getEOperations().get(6);
 	}
 
@@ -448,7 +456,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetStatefulTotalCost__ObservationAnalysisPlannerNode() {
+	public EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeStatefulTotalCost__ObservationAnalysisPlannerNode() {
 		return apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass.getEOperations().get(7);
 	}
 
@@ -457,7 +465,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetTotalCost__ObservationAnalysisPlannerNode() {
+	public EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeTotalCost__ObservationAnalysisPlannerNode() {
 		return apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass.getEOperations().get(8);
 	}
 
@@ -466,6 +474,15 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public EOperation getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetSolutionTotalCost__EObjectReferencesList() {
+		return apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass.getEOperations().get(9);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public EClass getObservationAnalysisPlannerTool() {
 		return observationAnalysisPlannerToolEClass;
 	}
@@ -610,8 +627,8 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getObservationAnalysisPlannerNode_PlannerRootNode() {
-		return (EReference)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(5);
+	public EAttribute getObservationAnalysisPlannerNode_RootNode() {
+		return (EAttribute)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(5);
 	}
 
 	/**
@@ -619,7 +636,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getObservationAnalysisPlannerNode_PlannerResult() {
+	public EReference getObservationAnalysisPlannerNode_PlannerRootNode() {
 		return (EReference)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(6);
 	}
 
@@ -628,7 +645,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getObservationAnalysisPlannerNode_Planner() {
+	public EReference getObservationAnalysisPlannerNode_PlannerResult() {
 		return (EReference)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(7);
 	}
 
@@ -637,7 +654,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getObservationAnalysisPlannerNode_StatefulCostsMapEntries() {
+	public EReference getObservationAnalysisPlannerNode_Planner() {
 		return (EReference)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(8);
 	}
 
@@ -646,8 +663,8 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getObservationAnalysisPlannerNode_Cost() {
-		return (EAttribute)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(9);
+	public EReference getObservationAnalysisPlannerNode_StatefulCostsMapEntries() {
+		return (EReference)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(9);
 	}
 
 	/**
@@ -655,7 +672,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getObservationAnalysisPlannerNode_CumulativeCost() {
+	public EAttribute getObservationAnalysisPlannerNode_Cost() {
 		return (EAttribute)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(10);
 	}
 
@@ -664,8 +681,17 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public EAttribute getObservationAnalysisPlannerNode_CumulativeCost() {
+		return (EAttribute)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(11);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public EReference getObservationAnalysisPlannerNode_FirstLevelNode() {
-		return (EReference)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(11);
+		return (EReference)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(12);
 	}
 
 	/**
@@ -674,15 +700,6 @@
 	 * @generated
 	 */
 	public EAttribute getObservationAnalysisPlannerNode_Level() {
-		return (EAttribute)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(12);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EAttribute getObservationAnalysisPlannerNode_SolutionDuration() {
 		return (EAttribute)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(13);
 	}
 
@@ -691,7 +708,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getObservationAnalysisPlannerNode_PassDuration() {
+	public EAttribute getObservationAnalysisPlannerNode_SolutionDuration() {
 		return (EAttribute)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(14);
 	}
 
@@ -700,7 +717,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getObservationAnalysisPlannerNode_TotalPassesDuration() {
+	public EAttribute getObservationAnalysisPlannerNode_PassDuration() {
 		return (EAttribute)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(15);
 	}
 
@@ -709,6 +726,15 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public EAttribute getObservationAnalysisPlannerNode_TotalPassesDuration() {
+		return (EAttribute)observationAnalysisPlannerNodeEClass.getEStructuralFeatures().get(16);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public EClass getObservationAnalysisPlanGenerator() {
 		return observationAnalysisPlanGeneratorEClass;
 	}
@@ -817,15 +843,6 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getCostFunctionState_PreviousPass() {
-		return (EReference)costFunctionStateEClass.getEStructuralFeatures().get(0);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
 	public EClass getAbstractStatelessCostFunction() {
 		return abstractStatelessCostFunctionEClass;
 	}
@@ -997,8 +1014,35 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getStatefulCostFunctionMapEntry_Value() {
-		return (EAttribute)statefulCostFunctionMapEntryEClass.getEStructuralFeatures().get(1);
+	public EReference getStatefulCostFunctionMapEntry_Value() {
+		return (EReference)statefulCostFunctionMapEntryEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getStatefulCostFunctionMapEntryValue() {
+		return statefulCostFunctionMapEntryValueEClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getStatefulCostFunctionMapEntryValue_State() {
+		return (EReference)statefulCostFunctionMapEntryValueEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EAttribute getStatefulCostFunctionMapEntryValue_Cost() {
+		return (EAttribute)statefulCostFunctionMapEntryValueEClass.getEStructuralFeatures().get(1);
 	}
 
 	/**
@@ -1243,9 +1287,10 @@
 		createEOperation(apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass, APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_LEAFS__OBSERVATIONANALYSISPLANNERNODE);
 		createEOperation(apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass, APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_PLANNER_SOLUTION__OBSERVATIONANALYSISPLANNERNODE);
 		createEOperation(apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass, APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_VISIBILITY_PASSES__LIST);
-		createEOperation(apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass, APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_STATELESS_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE);
-		createEOperation(apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass, APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_STATEFUL_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE);
-		createEOperation(apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass, APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE);
+		createEOperation(apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass, APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_STATELESS_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE);
+		createEOperation(apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass, APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_STATEFUL_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE);
+		createEOperation(apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass, APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_NODE_TOTAL_COST__OBSERVATIONANALYSISPLANNERNODE);
+		createEOperation(apogyCoreEnvironmentEarthOrbitPlannerFacadeEClass, APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE___GET_SOLUTION_TOTAL_COST__EOBJECTREFERENCESLIST);
 
 		observationAnalysisPlannerToolEClass = createEClass(OBSERVATION_ANALYSIS_PLANNER_TOOL);
 		createEReference(observationAnalysisPlannerToolEClass, OBSERVATION_ANALYSIS_PLANNER_TOOL__PLANNERS);
@@ -1265,6 +1310,7 @@
 		createEReference(observationAnalysisPlannerNodeEClass, OBSERVATION_ANALYSIS_PLANNER_NODE__PASS);
 		createEReference(observationAnalysisPlannerNodeEClass, OBSERVATION_ANALYSIS_PLANNER_NODE__PARENT);
 		createEReference(observationAnalysisPlannerNodeEClass, OBSERVATION_ANALYSIS_PLANNER_NODE__CHILDREN);
+		createEAttribute(observationAnalysisPlannerNodeEClass, OBSERVATION_ANALYSIS_PLANNER_NODE__ROOT_NODE);
 		createEReference(observationAnalysisPlannerNodeEClass, OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER_ROOT_NODE);
 		createEReference(observationAnalysisPlannerNodeEClass, OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER_RESULT);
 		createEReference(observationAnalysisPlannerNodeEClass, OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER);
@@ -1294,7 +1340,6 @@
 		createEReference(abstractCostFunctionEClass, ABSTRACT_COST_FUNCTION__APPLICABLE_EARTH_OUTLOOKS);
 
 		costFunctionStateEClass = createEClass(COST_FUNCTION_STATE);
-		createEReference(costFunctionStateEClass, COST_FUNCTION_STATE__PREVIOUS_PASS);
 
 		abstractStatelessCostFunctionEClass = createEClass(ABSTRACT_STATELESS_COST_FUNCTION);
 		createEOperation(abstractStatelessCostFunctionEClass, ABSTRACT_STATELESS_COST_FUNCTION___COMPUTE_COST__VISIBILITYPASS);
@@ -1321,7 +1366,11 @@
 
 		statefulCostFunctionMapEntryEClass = createEClass(STATEFUL_COST_FUNCTION_MAP_ENTRY);
 		createEReference(statefulCostFunctionMapEntryEClass, STATEFUL_COST_FUNCTION_MAP_ENTRY__KEY);
-		createEAttribute(statefulCostFunctionMapEntryEClass, STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE);
+		createEReference(statefulCostFunctionMapEntryEClass, STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE);
+
+		statefulCostFunctionMapEntryValueEClass = createEClass(STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE);
+		createEReference(statefulCostFunctionMapEntryValueEClass, STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE);
+		createEAttribute(statefulCostFunctionMapEntryValueEClass, STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__COST);
 
 		eclipseCostFunctionEClass = createEClass(ECLIPSE_COST_FUNCTION);
 		createEAttribute(eclipseCostFunctionEClass, ECLIPSE_COST_FUNCTION__STATE);
@@ -1458,14 +1507,17 @@
 		op = initEOperation(getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetVisibilityPasses__List(), this.getVisibilityPassReferencesList(), "getVisibilityPasses", 0, 1, !IS_UNIQUE, IS_ORDERED);
 		addEParameter(op, this.getObservationAnalysisPlannerNodeList(), "nodesList", 0, 1, !IS_UNIQUE, IS_ORDERED);
 
-		op = initEOperation(getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetStatelessTotalCost__ObservationAnalysisPlannerNode(), theEcorePackage.getEDouble(), "getStatelessTotalCost", 0, 1, !IS_UNIQUE, IS_ORDERED);
-		addEParameter(op, this.getObservationAnalysisPlannerNode(), "plannerNode", 0, 1, !IS_UNIQUE, IS_ORDERED);
+		op = initEOperation(getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeStatelessTotalCost__ObservationAnalysisPlannerNode(), theEcorePackage.getEDouble(), "getNodeStatelessTotalCost", 0, 1, !IS_UNIQUE, IS_ORDERED);
+		addEParameter(op, this.getObservationAnalysisPlannerNode(), "node", 0, 1, !IS_UNIQUE, IS_ORDERED);
 
-		op = initEOperation(getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetStatefulTotalCost__ObservationAnalysisPlannerNode(), theEcorePackage.getEDouble(), "getStatefulTotalCost", 0, 1, !IS_UNIQUE, IS_ORDERED);
-		addEParameter(op, this.getObservationAnalysisPlannerNode(), "plannerNode", 0, 1, !IS_UNIQUE, IS_ORDERED);
+		op = initEOperation(getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeStatefulTotalCost__ObservationAnalysisPlannerNode(), theEcorePackage.getEDouble(), "getNodeStatefulTotalCost", 0, 1, !IS_UNIQUE, IS_ORDERED);
+		addEParameter(op, this.getObservationAnalysisPlannerNode(), "node", 0, 1, !IS_UNIQUE, IS_ORDERED);
 
-		op = initEOperation(getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetTotalCost__ObservationAnalysisPlannerNode(), theEcorePackage.getEDouble(), "getTotalCost", 0, 1, !IS_UNIQUE, IS_ORDERED);
-		addEParameter(op, this.getObservationAnalysisPlannerNode(), "plannerNode", 0, 1, !IS_UNIQUE, IS_ORDERED);
+		op = initEOperation(getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeTotalCost__ObservationAnalysisPlannerNode(), theEcorePackage.getEDouble(), "getNodeTotalCost", 0, 1, !IS_UNIQUE, IS_ORDERED);
+		addEParameter(op, this.getObservationAnalysisPlannerNode(), "node", 0, 1, !IS_UNIQUE, IS_ORDERED);
+
+		op = initEOperation(getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetSolutionTotalCost__EObjectReferencesList(), theEcorePackage.getEDouble(), "getSolutionTotalCost", 0, 1, !IS_UNIQUE, IS_ORDERED);
+		addEParameter(op, this.getObservationPlan(), "plan", 0, 1, !IS_UNIQUE, IS_ORDERED);
 
 		initEClass(observationAnalysisPlannerToolEClass, ObservationAnalysisPlannerTool.class, "ObservationAnalysisPlannerTool", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getObservationAnalysisPlannerTool_Planners(), this.getObservationAnalysisPlanner(), null, "planners", null, 0, -1, ObservationAnalysisPlannerTool.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -1488,6 +1540,7 @@
 		initEReference(getObservationAnalysisPlannerNode_Pass(), theApogyCoreEnvironmentEarthOrbitPackage.getVisibilityPass(), null, "pass", null, 0, 1, ObservationAnalysisPlannerNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getObservationAnalysisPlannerNode_Parent(), this.getObservationAnalysisPlannerNode(), this.getObservationAnalysisPlannerNode_Children(), "parent", null, 0, 1, ObservationAnalysisPlannerNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getObservationAnalysisPlannerNode_Children(), this.getObservationAnalysisPlannerNode(), this.getObservationAnalysisPlannerNode_Parent(), "children", null, 0, -1, ObservationAnalysisPlannerNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getObservationAnalysisPlannerNode_RootNode(), theEcorePackage.getEBoolean(), "rootNode", null, 0, 1, ObservationAnalysisPlannerNode.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED);
 		initEReference(getObservationAnalysisPlannerNode_PlannerRootNode(), this.getObservationAnalysisPlannerNode(), null, "plannerRootNode", null, 0, 1, ObservationAnalysisPlannerNode.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
 		initEReference(getObservationAnalysisPlannerNode_PlannerResult(), this.getObservationAnalysisPlannerResult(), null, "plannerResult", null, 0, 1, ObservationAnalysisPlannerNode.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
 		initEReference(getObservationAnalysisPlannerNode_Planner(), this.getObservationAnalysisPlanner(), null, "planner", null, 0, 1, ObservationAnalysisPlannerNode.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
@@ -1522,7 +1575,6 @@
 		initEReference(getAbstractCostFunction_ApplicableEarthOutlooks(), theApogyCoreEnvironmentEarthPackage.getEarthOutlook(), null, "applicableEarthOutlooks", null, 0, -1, AbstractCostFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(costFunctionStateEClass, CostFunctionState.class, "CostFunctionState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getCostFunctionState_PreviousPass(), theApogyCoreEnvironmentEarthOrbitPackage.getVisibilityPass(), null, "previousPass", null, 0, 1, CostFunctionState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(abstractStatelessCostFunctionEClass, AbstractStatelessCostFunction.class, "AbstractStatelessCostFunction", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 
@@ -1559,7 +1611,11 @@
 		g2 = createEGenericType(this.getCostFunctionState());
 		g1.getETypeArguments().add(g2);
 		initEReference(getStatefulCostFunctionMapEntry_Key(), g1, null, "key", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEAttribute(getStatefulCostFunctionMapEntry_Value(), theEcorePackage.getEDoubleObject(), "value", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getStatefulCostFunctionMapEntry_Value(), this.getStatefulCostFunctionMapEntryValue(), null, "value", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(statefulCostFunctionMapEntryValueEClass, StatefulCostFunctionMapEntryValue.class, "StatefulCostFunctionMapEntryValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getStatefulCostFunctionMapEntryValue_State(), this.getCostFunctionState(), null, "state", null, 0, 1, StatefulCostFunctionMapEntryValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getStatefulCostFunctionMapEntryValue_Cost(), theEcorePackage.getEDouble(), "cost", null, 0, 1, StatefulCostFunctionMapEntryValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(eclipseCostFunctionEClass, EclipseCostFunction.class, "EclipseCostFunction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getEclipseCostFunction_State(), this.getEclipsePeriod(), "state", "NOT_IN_ECLIPSE", 0, 1, EclipseCostFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -1675,22 +1731,28 @@
 			   "documentation", "Returns the list of {@link VisibilityPass} contains in the specified list of nodes.\n@param nodesList List of nodes.\n@return Refers the list of passes."
 		   });
 		addAnnotation
-		  (getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetStatelessTotalCost__ObservationAnalysisPlannerNode(),
+		  (getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeStatelessTotalCost__ObservationAnalysisPlannerNode(),
 		   source,
 		   new String[] {
-			   "documentation", "Returns the total cost of all the stateless cost functions applicable to the specified visibility pass.\n@param Refers the planner node.\n@return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}."
+			   "documentation", "Returns the total cost of all the stateless cost functions applicable to the specified visibility pass.\n@param node Refers the planner node.\n@return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}."
 		   });
 		addAnnotation
-		  (getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetStatefulTotalCost__ObservationAnalysisPlannerNode(),
+		  (getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeStatefulTotalCost__ObservationAnalysisPlannerNode(),
 		   source,
 		   new String[] {
-			   "documentation", "Returns the total cost of all the stateful cost functions applicable to the specified planner node.\n@param Refers the planner node.\n@return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}."
+			   "documentation", "Returns the total cost of all the stateful cost functions applicable to the specified planner node.\n@param node Refers the planner node.\n@return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}."
 		   });
 		addAnnotation
-		  (getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetTotalCost__ObservationAnalysisPlannerNode(),
+		  (getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetNodeTotalCost__ObservationAnalysisPlannerNode(),
 		   source,
 		   new String[] {
-			   "documentation", "Returns the total cost of all cost functions applicable to the specified planner node.\n@param Refers the planner node.\n@return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.\n@see #getStatelessCostFunctionTotalCost(VisibilityPass)\n@see #getStatefulCostFunctionTotalCost(ObservationAnalysisPlannerNode)"
+			   "documentation", "Returns the total cost of all cost functions applicable to the specified planner node.\n@param node Refers the planner node.\n@return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.\n@see #getStatelessCostFunctionTotalCost(VisibilityPass)\n@see #getStatefulCostFunctionTotalCost(ObservationAnalysisPlannerNode)"
+		   });
+		addAnnotation
+		  (getApogyCoreEnvironmentEarthOrbitPlannerFacade__GetSolutionTotalCost__EObjectReferencesList(),
+		   source,
+		   new String[] {
+			   "documentation", "Returns the total cost of the specified plan.\n@param plan Refers the plan.\n@return The total cost after the application of {@link AbstractCostFunction#getCoefficient()}.\n@see #getStatelessCostFunctionTotalCost(VisibilityPass)\n@see #getStatefulCostFunctionTotalCost(ObservationAnalysisPlannerNode)"
 		   });
 		addAnnotation
 		  (observationAnalysisPlannerToolEClass,
@@ -1744,6 +1806,12 @@
 			   "property", "None"
 		   });
 		addAnnotation
+		  (getObservationAnalysisPlannerNode_RootNode(),
+		   source,
+		   new String[] {
+			   "get", "<%org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode%> _parent = this.getParent();\nreturn (_parent == null);"
+		   });
+		addAnnotation
 		  (getObservationAnalysisPlannerNode_PlannerRootNode(),
 		   source,
 		   new String[] {
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/CostFunctionStateImpl.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/CostFunctionStateImpl.java
index f0a3487..71fcc46 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/CostFunctionStateImpl.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/CostFunctionStateImpl.java
@@ -14,44 +14,22 @@
  */
 package org.eclipse.apogy.core.environment.earth.orbit.planner.impl;
 
-import org.eclipse.apogy.core.environment.earth.orbit.VisibilityPass;
-
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState;
 
-import org.eclipse.emf.common.notify.Notification;
-
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
 
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
 
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Cost Function State</b></em>'.
  * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.CostFunctionStateImpl#getPreviousPass <em>Previous Pass</em>}</li>
- * </ul>
  *
  * @generated
  */
 public class CostFunctionStateImpl extends MinimalEObjectImpl.Container implements CostFunctionState {
 	/**
-	 * The cached value of the '{@link #getPreviousPass() <em>Previous Pass</em>}' reference.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getPreviousPass()
-	 * @generated
-	 * @ordered
-	 */
-	protected VisibilityPass previousPass;
-
-	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -70,101 +48,4 @@
 		return ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.COST_FUNCTION_STATE;
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public VisibilityPass getPreviousPass() {
-		if (previousPass != null && previousPass.eIsProxy()) {
-			InternalEObject oldPreviousPass = (InternalEObject)previousPass;
-			previousPass = (VisibilityPass)eResolveProxy(oldPreviousPass);
-			if (previousPass != oldPreviousPass) {
-				if (eNotificationRequired())
-					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ApogyCoreEnvironmentEarthOrbitPlannerPackage.COST_FUNCTION_STATE__PREVIOUS_PASS, oldPreviousPass, previousPass));
-			}
-		}
-		return previousPass;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public VisibilityPass basicGetPreviousPass() {
-		return previousPass;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public void setPreviousPass(VisibilityPass newPreviousPass) {
-		VisibilityPass oldPreviousPass = previousPass;
-		previousPass = newPreviousPass;
-		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, ApogyCoreEnvironmentEarthOrbitPlannerPackage.COST_FUNCTION_STATE__PREVIOUS_PASS, oldPreviousPass, previousPass));
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public Object eGet(int featureID, boolean resolve, boolean coreType) {
-		switch (featureID) {
-			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.COST_FUNCTION_STATE__PREVIOUS_PASS:
-				if (resolve) return getPreviousPass();
-				return basicGetPreviousPass();
-		}
-		return super.eGet(featureID, resolve, coreType);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public void eSet(int featureID, Object newValue) {
-		switch (featureID) {
-			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.COST_FUNCTION_STATE__PREVIOUS_PASS:
-				setPreviousPass((VisibilityPass)newValue);
-				return;
-		}
-		super.eSet(featureID, newValue);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public void eUnset(int featureID) {
-		switch (featureID) {
-			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.COST_FUNCTION_STATE__PREVIOUS_PASS:
-				setPreviousPass((VisibilityPass)null);
-				return;
-		}
-		super.eUnset(featureID);
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	@Override
-	public boolean eIsSet(int featureID) {
-		switch (featureID) {
-			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.COST_FUNCTION_STATE__PREVIOUS_PASS:
-				return previousPass != null;
-		}
-		return super.eIsSet(featureID);
-	}
-
 } //CostFunctionStateImpl
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ObservationAnalysisPlannerNodeImpl.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ObservationAnalysisPlannerNodeImpl.java
index 4405d71..8897719 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ObservationAnalysisPlannerNodeImpl.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/ObservationAnalysisPlannerNodeImpl.java
@@ -24,6 +24,7 @@
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlanner;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerNode;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ObservationAnalysisPlannerResult;
+import org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue;
 
 import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.notify.NotificationChain;
@@ -56,6 +57,7 @@
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ObservationAnalysisPlannerNodeImpl#getPass <em>Pass</em>}</li>
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ObservationAnalysisPlannerNodeImpl#getParent <em>Parent</em>}</li>
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ObservationAnalysisPlannerNodeImpl#getChildren <em>Children</em>}</li>
+ *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ObservationAnalysisPlannerNodeImpl#isRootNode <em>Root Node</em>}</li>
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ObservationAnalysisPlannerNodeImpl#getPlannerRootNode <em>Planner Root Node</em>}</li>
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ObservationAnalysisPlannerNodeImpl#getPlannerResult <em>Planner Result</em>}</li>
  *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.ObservationAnalysisPlannerNodeImpl#getPlanner <em>Planner</em>}</li>
@@ -113,6 +115,16 @@
 	protected EList<ObservationAnalysisPlannerNode> children;
 
 	/**
+	 * The default value of the '{@link #isRootNode() <em>Root Node</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isRootNode()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean ROOT_NODE_EDEFAULT = false;
+
+	/**
 	 * The cached value of the '{@link #getStatefulCostsMapEntries() <em>Stateful Costs Map Entries</em>}' map.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -120,7 +132,7 @@
 	 * @generated
 	 * @ordered
 	 */
-	protected EMap<AbstractStatefulCostFunction<CostFunctionState>, Double> statefulCostsMapEntries;
+	protected EMap<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue> statefulCostsMapEntries;
 
 	/**
 	 * The default value of the '{@link #getCost() <em>Cost</em>}' attribute.
@@ -379,6 +391,16 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public boolean isRootNode() {
+		ObservationAnalysisPlannerNode _parent = this.getParent();
+		return (_parent == null);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public ObservationAnalysisPlannerNode getPlannerRootNode() {
 		ObservationAnalysisPlannerNode _parent = this.getParent();
 		boolean _tripleEquals = (_parent == null);
@@ -427,9 +449,9 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EMap<AbstractStatefulCostFunction<CostFunctionState>, Double> getStatefulCostsMapEntries() {
+	public EMap<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue> getStatefulCostsMapEntries() {
 		if (statefulCostsMapEntries == null) {
-			statefulCostsMapEntries = new EcoreEMap<AbstractStatefulCostFunction<CostFunctionState>,Double>(ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.STATEFUL_COST_FUNCTION_MAP_ENTRY, StatefulCostFunctionMapEntryImpl.class, this, ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__STATEFUL_COSTS_MAP_ENTRIES);
+			statefulCostsMapEntries = new EcoreEMap<AbstractStatefulCostFunction<CostFunctionState>,StatefulCostFunctionMapEntryValue>(ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.STATEFUL_COST_FUNCTION_MAP_ENTRY, StatefulCostFunctionMapEntryImpl.class, this, ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__STATEFUL_COSTS_MAP_ENTRIES);
 		}
 		return statefulCostsMapEntries;
 	}
@@ -602,6 +624,8 @@
 				return basicGetParent();
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__CHILDREN:
 				return getChildren();
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__ROOT_NODE:
+				return isRootNode();
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER_ROOT_NODE:
 				return getPlannerRootNode();
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER_RESULT:
@@ -710,6 +734,8 @@
 				return basicGetParent() != null;
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__CHILDREN:
 				return children != null && !children.isEmpty();
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__ROOT_NODE:
+				return isRootNode() != ROOT_NODE_EDEFAULT;
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER_ROOT_NODE:
 				return getPlannerRootNode() != null;
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE__PLANNER_RESULT:
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/StatefulCostFunctionMapEntryImpl.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/StatefulCostFunctionMapEntryImpl.java
index 683d8a7..a51dea3 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/StatefulCostFunctionMapEntryImpl.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/StatefulCostFunctionMapEntryImpl.java
@@ -17,8 +17,10 @@
 import org.eclipse.apogy.core.environment.earth.orbit.planner.AbstractStatefulCostFunction;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage;
 import org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState;
+import org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue;
 
 import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
 
 import org.eclipse.emf.common.util.BasicEMap;
 import org.eclipse.emf.common.util.EMap;
@@ -44,7 +46,7 @@
  *
  * @generated
  */
-public class StatefulCostFunctionMapEntryImpl extends MinimalEObjectImpl.Container implements BasicEMap.Entry<AbstractStatefulCostFunction<CostFunctionState>,Double> {
+public class StatefulCostFunctionMapEntryImpl extends MinimalEObjectImpl.Container implements BasicEMap.Entry<AbstractStatefulCostFunction<CostFunctionState>,StatefulCostFunctionMapEntryValue> {
 	/**
 	 * The cached value of the '{@link #getTypedKey() <em>Key</em>}' reference.
 	 * <!-- begin-user-doc -->
@@ -56,24 +58,14 @@
 	protected AbstractStatefulCostFunction<CostFunctionState> key;
 
 	/**
-	 * The default value of the '{@link #getTypedValue() <em>Value</em>}' attribute.
+	 * The cached value of the '{@link #getTypedValue() <em>Value</em>}' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @see #getTypedValue()
 	 * @generated
 	 * @ordered
 	 */
-	protected static final Double VALUE_EDEFAULT = null;
-
-	/**
-	 * The cached value of the '{@link #getTypedValue() <em>Value</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getTypedValue()
-	 * @generated
-	 * @ordered
-	 */
-	protected Double value = VALUE_EDEFAULT;
+	protected StatefulCostFunctionMapEntryValue value;
 
 	/**
 	 * <!-- begin-user-doc -->
@@ -138,7 +130,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public Double getTypedValue() {
+	public StatefulCostFunctionMapEntryValue getTypedValue() {
 		return value;
 	}
 
@@ -147,11 +139,47 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void setTypedValue(Double newValue) {
-		Double oldValue = value;
+	public NotificationChain basicSetTypedValue(StatefulCostFunctionMapEntryValue newValue, NotificationChain msgs) {
+		StatefulCostFunctionMapEntryValue oldValue = value;
 		value = newValue;
-		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE, oldValue, value));
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE, oldValue, newValue);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setTypedValue(StatefulCostFunctionMapEntryValue newValue) {
+		if (newValue != value) {
+			NotificationChain msgs = null;
+			if (value != null)
+				msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE, null, msgs);
+			if (newValue != null)
+				msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE, null, msgs);
+			msgs = basicSetTypedValue(newValue, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE, newValue, newValue));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE:
+				return basicSetTypedValue(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
 
 	/**
@@ -184,7 +212,7 @@
 				setTypedKey((AbstractStatefulCostFunction<CostFunctionState>)newValue);
 				return;
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE:
-				setTypedValue((Double)newValue);
+				setTypedValue((StatefulCostFunctionMapEntryValue)newValue);
 				return;
 		}
 		super.eSet(featureID, newValue);
@@ -202,7 +230,7 @@
 				setTypedKey((AbstractStatefulCostFunction<CostFunctionState>)null);
 				return;
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE:
-				setTypedValue(VALUE_EDEFAULT);
+				setTypedValue((StatefulCostFunctionMapEntryValue)null);
 				return;
 		}
 		super.eUnset(featureID);
@@ -219,7 +247,7 @@
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__KEY:
 				return key != null;
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY__VALUE:
-				return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+				return value != null;
 		}
 		return super.eIsSet(featureID);
 	}
@@ -229,22 +257,6 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	@Override
-	public String toString() {
-		if (eIsProxy()) return super.toString();
-
-		StringBuilder result = new StringBuilder(super.toString());
-		result.append(" (value: ");
-		result.append(value);
-		result.append(')');
-		return result.toString();
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
 	protected int hash = -1;
 
 	/**
@@ -292,7 +304,7 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public Double getValue() {
+	public StatefulCostFunctionMapEntryValue getValue() {
 		return getTypedValue();
 	}
 
@@ -301,8 +313,8 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public Double setValue(Double value) {
-		Double oldValue = getValue();
+	public StatefulCostFunctionMapEntryValue setValue(StatefulCostFunctionMapEntryValue value) {
+		StatefulCostFunctionMapEntryValue oldValue = getValue();
 		setTypedValue(value);
 		return oldValue;
 	}
@@ -313,9 +325,9 @@
 	 * @generated
 	 */
 	@SuppressWarnings("unchecked")
-	public EMap<AbstractStatefulCostFunction<CostFunctionState>, Double> getEMap() {
+	public EMap<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue> getEMap() {
 		EObject container = eContainer();
-		return container == null ? null : (EMap<AbstractStatefulCostFunction<CostFunctionState>, Double>)container.eGet(eContainmentFeature());
+		return container == null ? null : (EMap<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue>)container.eGet(eContainmentFeature());
 	}
 
 } //StatefulCostFunctionMapEntryImpl
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/StatefulCostFunctionMapEntryValueImpl.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/StatefulCostFunctionMapEntryValueImpl.java
new file mode 100644
index 0000000..7edc358
--- /dev/null
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/impl/StatefulCostFunctionMapEntryValueImpl.java
@@ -0,0 +1,256 @@
+/**
+ * *******************************************************************************
+ * Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *      Regent L'Archeveque - initial API and implementation
+ *         
+ * SPDX-License-Identifier: EPL-1.0    
+ * *******************************************************************************
+ */
+package org.eclipse.apogy.core.environment.earth.orbit.planner.impl;
+
+import org.eclipse.apogy.core.environment.earth.orbit.planner.ApogyCoreEnvironmentEarthOrbitPlannerPackage;
+import org.eclipse.apogy.core.environment.earth.orbit.planner.CostFunctionState;
+import org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Stateful Cost Function Map Entry Value</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.StatefulCostFunctionMapEntryValueImpl#getState <em>State</em>}</li>
+ *   <li>{@link org.eclipse.apogy.core.environment.earth.orbit.planner.impl.StatefulCostFunctionMapEntryValueImpl#getCost <em>Cost</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class StatefulCostFunctionMapEntryValueImpl extends MinimalEObjectImpl.Container implements StatefulCostFunctionMapEntryValue {
+	/**
+	 * The cached value of the '{@link #getState() <em>State</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getState()
+	 * @generated
+	 * @ordered
+	 */
+	protected CostFunctionState state;
+
+	/**
+	 * The default value of the '{@link #getCost() <em>Cost</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCost()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final double COST_EDEFAULT = 0.0;
+
+	/**
+	 * The cached value of the '{@link #getCost() <em>Cost</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCost()
+	 * @generated
+	 * @ordered
+	 */
+	protected double cost = COST_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected StatefulCostFunctionMapEntryValueImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return ApogyCoreEnvironmentEarthOrbitPlannerPackage.Literals.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public CostFunctionState getState() {
+		return state;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetState(CostFunctionState newState, NotificationChain msgs) {
+		CostFunctionState oldState = state;
+		state = newState;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE, oldState, newState);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setState(CostFunctionState newState) {
+		if (newState != state) {
+			NotificationChain msgs = null;
+			if (state != null)
+				msgs = ((InternalEObject)state).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE, null, msgs);
+			if (newState != null)
+				msgs = ((InternalEObject)newState).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE, null, msgs);
+			msgs = basicSetState(newState, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE, newState, newState));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public double getCost() {
+		return cost;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setCost(double newCost) {
+		double oldCost = cost;
+		cost = newCost;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__COST, oldCost, cost));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE:
+				return basicSetState(null, 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 ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE:
+				return getState();
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__COST:
+				return getCost();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE:
+				setState((CostFunctionState)newValue);
+				return;
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__COST:
+				setCost((Double)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE:
+				setState((CostFunctionState)null);
+				return;
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__COST:
+				setCost(COST_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__STATE:
+				return state != null;
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE__COST:
+				return cost != COST_EDEFAULT;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString() {
+		if (eIsProxy()) return super.toString();
+
+		StringBuilder result = new StringBuilder(super.toString());
+		result.append(" (cost: ");
+		result.append(cost);
+		result.append(')');
+		return result.toString();
+	}
+
+} //StatefulCostFunctionMapEntryValueImpl
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/util/ApogyCoreEnvironmentEarthOrbitPlannerAdapterFactory.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/util/ApogyCoreEnvironmentEarthOrbitPlannerAdapterFactory.java
index 15b2906..3f6d233 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/util/ApogyCoreEnvironmentEarthOrbitPlannerAdapterFactory.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/util/ApogyCoreEnvironmentEarthOrbitPlannerAdapterFactory.java
@@ -157,10 +157,14 @@
 				return createStatelessCostFunctionMapEntryAdapter();
 			}
 			@Override
-			public Adapter caseStatefulCostFunctionMapEntry(Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, Double> object) {
+			public Adapter caseStatefulCostFunctionMapEntry(Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue> object) {
 				return createStatefulCostFunctionMapEntryAdapter();
 			}
 			@Override
+			public Adapter caseStatefulCostFunctionMapEntryValue(StatefulCostFunctionMapEntryValue object) {
+				return createStatefulCostFunctionMapEntryValueAdapter();
+			}
+			@Override
 			public Adapter caseEclipseCostFunction(EclipseCostFunction object) {
 				return createEclipseCostFunctionAdapter();
 			}
@@ -471,6 +475,20 @@
 	}
 
 	/**
+	 * Creates a new adapter for an object of class '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue <em>Stateful Cost Function Map Entry Value</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.eclipse.apogy.core.environment.earth.orbit.planner.StatefulCostFunctionMapEntryValue
+	 * @generated
+	 */
+	public Adapter createStatefulCostFunctionMapEntryValueAdapter() {
+		return null;
+	}
+
+	/**
 	 * Creates a new adapter for an object of class '{@link org.eclipse.apogy.core.environment.earth.orbit.planner.EclipseCostFunction <em>Eclipse Cost Function</em>}'.
 	 * <!-- begin-user-doc -->
 	 * This default implementation returns null so that we can easily ignore cases;
diff --git a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/util/ApogyCoreEnvironmentEarthOrbitPlannerSwitch.java b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/util/ApogyCoreEnvironmentEarthOrbitPlannerSwitch.java
index 41f9195..775518a 100644
--- a/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/util/ApogyCoreEnvironmentEarthOrbitPlannerSwitch.java
+++ b/bundles/core/org.eclipse.apogy.core.environment.earth.orbit.planner/src-gen/org/eclipse/apogy/core/environment/earth/orbit/planner/util/ApogyCoreEnvironmentEarthOrbitPlannerSwitch.java
@@ -223,11 +223,17 @@
 				return result;
 			}
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY: {
-				@SuppressWarnings("unchecked") Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, Double> statefulCostFunctionMapEntry = (Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, Double>)theEObject;
+				@SuppressWarnings("unchecked") Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue> statefulCostFunctionMapEntry = (Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue>)theEObject;
 				T result = caseStatefulCostFunctionMapEntry(statefulCostFunctionMapEntry);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
+			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE: {
+				StatefulCostFunctionMapEntryValue statefulCostFunctionMapEntryValue = (StatefulCostFunctionMapEntryValue)theEObject;
+				T result = caseStatefulCostFunctionMapEntryValue(statefulCostFunctionMapEntryValue);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
 			case ApogyCoreEnvironmentEarthOrbitPlannerPackage.ECLIPSE_COST_FUNCTION: {
 				EclipseCostFunction eclipseCostFunction = (EclipseCostFunction)theEObject;
 				T result = caseEclipseCostFunction(eclipseCostFunction);
@@ -546,7 +552,22 @@
 	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
 	 * @generated
 	 */
-	public T caseStatefulCostFunctionMapEntry(Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, Double> object) {
+	public T caseStatefulCostFunctionMapEntry(Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue> object) {
+		return null;
+	}
+
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Stateful Cost Function Map Entry Value</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Stateful Cost Function Map Entry Value</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseStatefulCostFunctionMapEntryValue(StatefulCostFunctionMapEntryValue object) {
 		return null;
 	}
 
diff --git a/releng/org.eclipse.apogy.setup.oomph/apogy.setup b/releng/org.eclipse.apogy.setup.oomph/apogy.setup
index 89d5a51..fff5cfd 100644
--- a/releng/org.eclipse.apogy.setup.oomph/apogy.setup
+++ b/releng/org.eclipse.apogy.setup.oomph/apogy.setup
@@ -33,6 +33,14 @@
     </setupTask>
     <setupTask
         xsi:type="setup:CompoundTask"
+        name="org.eclipse.emf.ecore.xcore.Xcore">
+      <setupTask
+          xsi:type="setup:PreferenceTask"
+          key="/instance/org.eclipse.emf.ecore.xcore.Xcore/outlet.DEFAULT_OUTPUT.derived"
+          value="false"/>
+    </setupTask>
+    <setupTask
+        xsi:type="setup:CompoundTask"
         name="org.eclipse.releng.tools">
       <setupTask
           xsi:type="setup:PreferenceTask"