Changeset 358
- Timestamp:
- 04/12/2010 05:12:21 PM (11 years ago)
- Location:
- AgentMind/trunk/AgentMind/FAtiMA/src/FAtiMA/memory/semanticMemory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
AgentMind/trunk/AgentMind/FAtiMA/src/FAtiMA/memory/semanticMemory/SemanticMemory.java
r326 r358 80 80 else 81 81 { 82 _stm.RearrangeWorkingMemory(property );82 _stm.RearrangeWorkingMemory(property,prop); 83 83 } 84 84 return prop.getValue(); -
AgentMind/trunk/AgentMind/FAtiMA/src/FAtiMA/memory/semanticMemory/WorkingMemory.java
r326 r358 142 142 public ArrayList<KnowledgeSlot> GetNewFacts() 143 143 { 144 return this._newFacts; 144 ArrayList<KnowledgeSlot> aux = this._newFacts; 145 this._newFacts = new ArrayList<KnowledgeSlot>(); 146 return aux; 145 147 } 146 148 … … 159 161 * Rearrange the working memory entries so that the most current accessed entry comes last 160 162 */ 161 public void RearrangeWorkingMemory(Name predicate )163 public void RearrangeWorkingMemory(Name predicate, KnowledgeSlot newKs) 162 164 { 163 165 KnowledgeSlot ks; … … 171 173 { 172 174 _factList.remove(ks); 173 _factList.add( ks);174 if(!_changeList.contains( ks))175 _changeList.add( ks);175 _factList.add(newKs); 176 if(!_changeList.contains(newKs)) 177 _changeList.add(newKs); 176 178 return; 177 179 } … … 288 290 else 289 291 { 290 this.RearrangeWorkingMemory(property); 292 293 this.RearrangeWorkingMemory(property,aux); 291 294 } 292 295
Note: See TracChangeset
for help on using the changeset viewer.