Ignore:
Timestamp:
01/11/2011 02:55:31 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

    r770 r801  
    1919import FAtiMA.Core.deliberativeLayer.IOptionsStrategy; 
    2020import FAtiMA.Core.deliberativeLayer.IUtilityStrategy; 
     21import FAtiMA.Core.deliberativeLayer.Intention; 
    2122import FAtiMA.Core.deliberativeLayer.goals.ActivePursuitGoal; 
    2223import FAtiMA.Core.emotionalState.AppraisalFrame; 
     
    6869         
    6970        @Override 
    70         public void startAppraisal(AgentModel am, Event e, AppraisalFrame af) 
     71        public void appraisal(AgentModel am, Event e, AppraisalFrame af) 
    7172        { 
    7273                float desirabilityForOther = 0; 
     
    273274                 
    274275        } 
    275  
    276         @Override 
    277         public float getExpectedUtility(AgentModel am, ActivePursuitGoal g) { 
    278                  
    279                  
    280                  
    281                 float probability = am.getDeliberativeLayer().getProbabilityStrategy().getProbability(am, g); 
    282                  
     276         
     277        private float culturalEU(AgentModel am, ActivePursuitGoal g, float probability) 
     278        { 
    283279                IUtilityStrategy str =  am.getDeliberativeLayer().getUtilityStrategy(); 
    284280                 
     
    300296 
    301297        @Override 
    302         public void updateCycle(AgentModel am,long time) { 
     298        public float getExpectedUtility(AgentModel am, ActivePursuitGoal g) { 
     299                 
     300                float probability = am.getDeliberativeLayer().getProbabilityStrategy().getProbability(am, g); 
     301                return culturalEU(am,g,probability); 
     302        } 
     303         
     304        @Override 
     305        public float getExpectedUtility(AgentModel am, Intention i) { 
     306                 
     307                float probability = am.getDeliberativeLayer().getProbabilityStrategy().getProbability(am, i); 
     308                 
     309                return culturalEU(am,i.getGoal(),probability); 
     310        } 
     311 
     312        @Override 
     313        public void update(AgentModel am,long time) { 
    303314                // TODO Auto-generated method stub 
    304                  
     315        } 
     316         
     317        @Override 
     318        public void update(AgentModel am,Event e) { 
     319                // TODO Auto-generated method stub 
    305320        } 
    306321 
     
    311326 
    312327        @Override 
    313         public void continueAppraisal(AgentModel am) { 
    314                 // TODO Auto-generated method stub 
    315                  
     328        public void reappraisal(AgentModel am) { 
     329                // TODO Auto-generated method stub       
    316330        } 
    317331 
Note: See TracChangeset for help on using the changeset viewer.