Index: /vtcross/branches/nikhil/crossmodel2/src/cognitive_engines/CBR_CE/CBR_CE.h
===================================================================
--- /vtcross/branches/nikhil/crossmodel2/src/cognitive_engines/CBR_CE/CBR_CE.h	(revision 562)
+++ /vtcross/branches/nikhil/crossmodel2/src/cognitive_engines/CBR_CE/CBR_CE.h	(revision 563)
@@ -95,5 +95,4 @@
          * cognitive engine's functionality.
          */
-	void InitialSetting();
 
         void PerformUpdatePerformance();
@@ -106,23 +105,5 @@
         CBR *myCBR1;
 	CBR *myCBR2;
-/*
-    private:
 
-	float * Pweights;
-	float * Uweights;
-
-	float (*Status)[10];
-// this array stores the relationship between all parameters vs utilities.. 
-	float (*Trend)[10];
-
-	int * Slope;
-
-	float PoC;
-// this term represents percentage of change.. as in if this min PoC
-// is not detected its as good as no change..
-	int Ptune;
-// This is pointer to correspont to which parameter to tune.. 
-// AS OF NOW ONLY ONE AT A TIME PER CYCLE
-*/ 
 
 };
Index: /vtcross/branches/nikhil/crossmodel2/src/cognitive_engines/CBR_CE/CBR_CE.cpp
===================================================================
--- /vtcross/branches/nikhil/crossmodel2/src/cognitive_engines/CBR_CE/CBR_CE.cpp	(revision 562)
+++ /vtcross/branches/nikhil/crossmodel2/src/cognitive_engines/CBR_CE/CBR_CE.cpp	(revision 563)
@@ -27,5 +27,5 @@
 // ZERO is consider +1 sign
 inline int signof(int nos) { return ( (nos < 0) ? -1:1 ); }
-//inline int signof(int nos) { return (nos==0)?0:(nos<0?-1:1); }
+
 
 
@@ -43,8 +43,4 @@
 {
     LOG("Cognitive Engine:: Generating solution.\n");
-
-	std::cout << "Ptune value: " << optList->Ptune << std::endl;
-//	std::cout << "slope values: " << Slope[0] << std::endl;
-//	std::cout << "slope values: " << Slope[1] << std::endl;
 
     string searchNames[radioInfo->numUtilities];
@@ -99,15 +95,5 @@
 	
 	FineTune();
-/*
-        No need or random adaptation since it will get updated 
-        using update function call
-        if(returnValues[numberColumns-1] < 0) {
-            returnValues[2] = returnValues[2] - 15;
-            returnValues[3] = returnValues[3] - 2;
-        } else {
-            returnValues[2] = returnValues[2] + 15;
-            returnValues[3] = returnValues[3] + 2;
-        }
-*/
+
     } else if(rc == 31337) {
         LOG("Cognitive Engine:: Not Found.\n");
@@ -208,46 +194,6 @@
     string setList[setLen];
 
-/*
-    size_t columnObsIndex = 0;
-    for (size_t i = 0; i < radioInfo->numObservables; i++){
-        obsList[columnObsIndex] = observables[i].name;
-        columnObsIndex++;
-    }  
-    obsList[columnObsIndex] = "utility";
-
-    size_t columnIndex = 0;
-    for (size_t i = 0; i < radioInfo->numParameters; i++){
-        nameList[columnIndex] = parameters[i].name;
-        columnIndex++;
-    }   
-    for (size_t i = 0; i < radioInfo->numUtilities; i++){
-        nameList[columnIndex] = uList[i].name;
-        columnIndex++;
-    }   
-
-    size_t obsValueIndex = 0;
-    for(size_t i = 0; i < radioInfo->numObservables; i++) {
-        obsVals[obsValueIndex] = observables[i].value;
-        obsValueIndex++;
-    }
-
-///  Calculate Utility 
-   float newUtilityValue = 0;
-
-    for(size_t i = 0; i < radioInfo->numUtilities; i++) {
-        newUtilityValue = newUtilityValue + (uList[i].target - observables[i].value);
-    }
-    obsVals[obsValueIndex] = newUtilityValue;
-
-    size_t returnValueIndex = 0;
-    for(size_t i = 0; i < radioInfo->numParameters; i++) {
-        valList[returnValueIndex] = parameters[i].value;
-        returnValueIndex++;
-    }
-    for(size_t i = 0; i < radioInfo->numUtilities; i++) {
-        valList[returnValueIndex] = uList[i].target;
-        returnValueIndex++;
-    }
-*/
+
+// Calculating total weight
 	float TotalWeight = 0;
 	int Penalty = 10;
@@ -276,8 +222,9 @@
 	setList[returnValueIndex] = "TotalWeight";
 	setValue[returnValueIndex] = TotalWeight; 
+/////
 	
 myCBR1->Update(whereList,setList,whereValue,setValue,whereLen,setLen);
 
-// MAIN CODE HERE //
+// MAIN SELF LEARNING CODE HERE //
 
 int searchOps[radioInfo->numParameters];
@@ -368,5 +315,5 @@
     }
 
-
+   std::cout << "Ptune " << optList->Ptune << std::endl;
    std::cout << "Status1 " << optList->Status[0][0] << std::endl;
    std::cout << "Status2 " << optList->Status[1][0] << std::endl;
@@ -375,5 +322,8 @@
    std::cout << "Trend1 " << optList->Trend[0][0] << std::endl;
    std::cout << "Trend2 " << optList->Trend[1][0] << std::endl;
+
  /// end of MAIN CODE //
+
+
 }
 
@@ -387,7 +337,7 @@
 	//// NEW SET OF VARIABLES ///
 
-//	float * Pweights = new float[radioInfo->numParameters];
 	optList->Uweights = new float[radioInfo->numUtilities];
 	optList->Pweights = new float[radioInfo->numParameters];
+	optList->Slope = new int[radioInfo->numParameters];
 
 ///// we have to assume 10 utilities maxxx!!!! VERY important
@@ -395,10 +345,11 @@
 	optList->Status = new float[radioInfo->numParameters][10];
 	optList->Trend = new float[radioInfo->numParameters][10];
-	optList->PoC = 0.01;
-	optList->Slope = new int[radioInfo->numParameters];	
-	optList->Ptune = 0;   // starting with most tunable parameter.. (widest range..)
-
-
-////////////initializing here since initialsetting giving wierd errors/////
+//////////////////////////////////////////////////////////////	
+
+
+////////////initializing Opt_List members here/////
+
+        optList->PoC = 0.01;
+	optList->Ptune = 0; // starting with most tunable parameter.. (widest range .. )
 
         for (int x = 0; x < radioInfo->numParameters; x++) {
@@ -428,7 +379,4 @@
     uint32_t numberColumns = radioInfo->numParameters + radioInfo->numUtilities \
                              + radioInfo->numObservables + 1;
-
-    uint32_t numberParameters = radioInfo->numParameters;
-    uint32_t numberUtilities = radioInfo->numUtilities;
 
     string cols[numberColumns];
@@ -613,31 +561,4 @@
 }
 
-void CBR_CE::InitialSetting()
-{
-
-	std::cout << "inside initilsetting method" << std::endl; 
-
-	for (int x = 0; x < radioInfo->numParameters; x++) {
-		std::cout << x << std::endl;
-		optList->Pweights[x] = 1/(pList[x].step);
-		optList->Slope[x] = 0;
-	}
-
-
-
-	for (size_t i = 0; i < radioInfo->numUtilities; i++) { 
-		optList->Uweights[i] = 1;
-	}
-
-
-	for (size_t i = 0; i < radioInfo->numParameters; i++) {
-		for (size_t k = 0; k < radioInfo->numUtilities; k++) {
-			optList->Status[i][k] = 0;
-			optList->Trend[i][k] = 0;
-		}
-	}
-
-}
-
 
 void
