Ignore:
Timestamp:
12/10/2010 01:19:12 PM (10 years ago)
Author:
joao.dias
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.culture/src/FAtiMA/culture/CulturalDimensionsComponent.java

    r742 r758  
    1111 
    1212import FAtiMA.Core.AgentModel; 
    13 import FAtiMA.Core.IComponent; 
     13import FAtiMA.Core.IAppraisalComponent; 
    1414import FAtiMA.Core.Display.AgentDisplayPanel; 
     15import FAtiMA.Core.OCCAffectDerivation.OCCComponent; 
    1516import FAtiMA.Core.conditions.Condition; 
    1617import FAtiMA.Core.deliberativeLayer.IExpectedUtilityStrategy; 
     
    1920import FAtiMA.Core.deliberativeLayer.IUtilityStrategy; 
    2021import FAtiMA.Core.deliberativeLayer.goals.ActivePursuitGoal; 
    21 import FAtiMA.Core.emotionalState.AppraisalStructure; 
     22import FAtiMA.Core.emotionalState.AppraisalFrame; 
    2223import FAtiMA.Core.sensorEffector.Event; 
    2324import FAtiMA.Core.util.AgentLogger; 
     
    2930 
    3031 
    31 public class CulturalDimensionsComponent implements IComponent, IOptionsStrategy, IExpectedUtilityStrategy { 
     32public class CulturalDimensionsComponent implements IAppraisalComponent, IOptionsStrategy, IExpectedUtilityStrategy { 
    3233        final String NAME = "CulturalDimensionsComponent"; 
    3334         
     
    6768         
    6869        @Override 
    69         public void appraisal(AgentModel am, Event e, AppraisalStructure as) 
     70        public void startAppraisal(AgentModel am, Event e, AppraisalFrame af) 
    7071        { 
    7172                float desirabilityForOther = 0; 
    72                 AppraisalStructure appraisalOfOther; 
    73                 float desirability = as.getAppraisalVariable(AppraisalStructure.DESIRABILITY); 
    74                 for(String other : as.getOthers()) 
     73                float desirability = af.getAppraisalVariable(OCCComponent.DESIRABILITY); 
     74                 
     75                 
     76                for(String variable : af.getAppraisalVariables()) 
    7577                { 
    76                         appraisalOfOther = as.getAppraisalOfOther(other); 
    77                         desirabilityForOther += appraisalOfOther.getAppraisalVariable(AppraisalStructure.DESIRABILITY); 
     78                        if(variable.startsWith(OCCComponent.DESFOROTHER)) 
     79                        { 
     80                                desirabilityForOther += af.getAppraisalVariable(variable); 
     81                        } 
    7882                } 
    7983                         
     
    8286                                desirabilityForOther); 
    8387                 
    84                 as.SetAppraisalVariable(NAME, (short)4, AppraisalStructure.PRAISEWORTHINESS, praiseWorthiness);  
     88                af.SetAppraisalVariable(NAME, (short)4, OCCComponent.PRAISEWORTHINESS, praiseWorthiness);        
    8589                 
    8690        } 
     
    304308        public AgentDisplayPanel createDisplayPanel(AgentModel am) { 
    305309                return null; 
     310        } 
     311 
     312        @Override 
     313        public void continueAppraisal(AgentModel am) { 
     314                // TODO Auto-generated method stub 
     315                 
    306316        }        
    307317} 
Note: See TracChangeset for help on using the changeset viewer.