/** * Tell the condition system about a * new object in the state. * @param object The new object. */ public void addObject(Object id, OAVObjectType type, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { // if(type.getName().equals("goal")) // System.out.println("Value added: "+id+" "+type); // System.out.println("Value added: "+id+" "+type); state.getProfiler().start(IProfiler.TYPE_NODE, this); state.getProfiler().start(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTADDED); Set tns = getTypeNodes(type); if(tns!=null) { for(Iterator it=tns.iterator(); it.hasNext(); ) ((AlphaNode)it.next()).addObject(id, state, mem, agenda); assert !check || checkConsistency(mem); } // else // System.out.println("No typenode(s) available for: "+type); state.getProfiler().stop(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTADDED); state.getProfiler().stop(IProfiler.TYPE_NODE, this); }
/** * Tell the condition system about a * new object in the state. * @param object The new object. */ public void addObject(Object id, OAVObjectType type, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { // if(type.getName().equals("goal")) // System.out.println("Value added: "+id+" "+type); // System.out.println("Value added: "+id+" "+type); state.getProfiler().start(IProfiler.TYPE_NODE, this); state.getProfiler().start(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTADDED); Set tns = getTypeNodes(type); if(tns!=null) { for(Iterator it=tns.iterator(); it.hasNext(); ) ((AlphaNode)it.next()).addObject(id, state, mem, agenda); assert !check || checkConsistency(mem); } // else // System.out.println("No typenode(s) available for: "+type); state.getProfiler().stop(IProfiler.TYPE_NODEEVENT, IProfiler.NODEEVENT_OBJECTADDED); state.getProfiler().stop(IProfiler.TYPE_NODE, this); }
((AlphaNode)it.next()).removeObject(id, state, mem, agenda); assert !check || checkConsistency(mem);
((AlphaNode)it.next()).removeObject(id, state, mem, agenda); assert !check || checkConsistency(mem);
assert !check || checkConsistency(mem);
assert !check || checkConsistency(mem);