Show
Ignore:
Timestamp:
09/02/09 18:33:48 (15 years ago)
Author:
cdietric
Message:

updates for CROSS-OSSIE demo

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/OSSIE_CE.cpp

    r418 r457  
    2929 
    3030#define TXPOWER 1 
     31#define DECREMENTSCALE 5 
     32#define INCREMENTSCALE 5 
    3133 
    3234static cbr myCBR; 
     
    675677    } 
    676678 
     679    cbr_print(myCBR); 
     680 
    677681    /* CBR specific call */ 
    678682    uint32_t rc = cbr_search(myCBR, searchNames, searchOps, searchVals, 
     
    684688 
    685689        /* Should do a random adaptation.. */ 
    686         if(returnValues[numberColumns-1] < 0) { 
    687             returnValues[2] = returnValues[2] - 15; 
    688         } else { 
    689             returnValues[2] = returnValues[2] + 15; 
     690        if(returnValues[numberColumns-1] > (uList[0].target * 0.2)) { 
     691            returnValues[1] = returnValues[1] - DECREMENTSCALE*returnValues[numberColumns-1]; 
     692        } else if(returnValues[numberColumns-1] < -(uList[0].target * 0.2)) { 
     693            returnValues[1] = returnValues[1] + INCREMENTSCALE*returnValues[numberColumns-1]; 
    690694        } 
    691695    } else if(rc == 31337) { 
     
    693697        /* No rows in the CBR, pick default parameters */ 
    694698        /* Currently this is hard coded and implementation specific! */ 
    695         returnValues[2] = currentParameters[0].value + 5; 
     699        returnValues[1] = currentParameters[0].value + .25; 
    696700         
    697701    } else {