/** * Get the clock. * @return The clock. */ public IClockService getClock() { return (IClockService)interpreter.getClockService(); }
public void run() { longint = getInterpreter().getClockService().getTime(); } };
/** * Get the current time. * The time unit depends on the currently running clock implementation. * For the default system clock, the time value adheres to the time * representation as used by {@link System#currentTimeMillis()}, i.e., * the value of milliseconds passed since 0:00 'o clock, January 1st, 1970, UTC. * For custom simulation clocks, arbitrary representations can be used. * @return The current time. */ public long getTime() { if(getInterpreter().getComponentAdapter().isExternalThread()) { AgentInvocation invoc = new AgentInvocation() { public void run() { longint = getInterpreter().getClockService().getTime(); } }; return invoc.longint; } else { return getInterpreter().getClockService().getTime(); } }
state.setAttributeValue(ragent, OAVBDIRuntimeModel.agent_has_timer, interpreter.getClockService().createTimer(tt, new InterpreterTimedObject(BDIInterpreter.getInterpreter(state), new CheckedAction()
public void run() { Object exp = state.getAttributeValue(mparamset, OAVBDIMetaModel.parameterset_has_valuesexpression); try { Object values = AgentRules.evaluateExpression(state, exp, fet); BeliefRules.updateBeliefSet(state, rparamset, values, rcapa); } catch(Exception e) { String name = BDIInterpreter.getInterpreter(state).getAgentAdapter().getComponentIdentifier().getName(); BDIInterpreter.getInterpreter(state).getLogger(rcapa).severe("Could not evaluate parameterset expression: "+name+" "+state.getAttributeValue(exp, OAVBDIMetaModel.expression_has_parsed)); } // changed *.class to *.TYPE due to javaflow bug state.setAttributeValue(rparamset, OAVBDIRuntimeModel.typedelement_has_timer, BDIInterpreter.getInterpreter(state).getClockService().createTimer(update.longValue(), to[0])); } });
public void run() { Object exp = state.getAttributeValue(mparam, OAVBDIMetaModel.parameter_has_value); try { Object value = AgentRules.evaluateExpression(state, exp, fet); BeliefRules.setParameterValue(state, rparam, value); } catch(Exception e) { String name = BDIInterpreter.getInterpreter(state).getAgentAdapter().getComponentIdentifier().getName(); BDIInterpreter.getInterpreter(state).getLogger(rcapa).severe("Could not evaluate parameter expression: "+name +" "+state.getAttributeValue(exp, OAVBDIMetaModel.expression_has_parsed)); } // // changed *.class to *.TYPE due to javaflow bug state.setAttributeValue(rparam, OAVBDIRuntimeModel.typedelement_has_timer, BDIInterpreter.getInterpreter(state).getClockService().createTimer(update.longValue(), to[0])); }
BDIInterpreter.getInterpreter(state).getClockService().createTimer(update.longValue(), to[0]));
long time = bdiint.getClockService().getTime();
BDIInterpreter.getInterpreter(state).getClockService().createTimer(retrydelay, new InterpreterTimedObject(BDIInterpreter.getInterpreter(state), new CheckedAction()
ITimer timer = BDIInterpreter.getInterpreter(state).getClockService().createTimer(timeout, new InterpreterTimedObject(BDIInterpreter.getInterpreter(state), toa)); ITimer timer = BDIInterpreter.getInterpreter(state).getClockService().createTickTimer(new InterpreterTimedObject(BDIInterpreter.getInterpreter(state), toa));
BDIInterpreter.getInterpreter(state).getClockService().createTimer(recurdelay, new InterpreterTimedObject(BDIInterpreter.getInterpreter(state), new CheckedAction()
state.setAttributeValue(rbelset, OAVBDIRuntimeModel.typedelement_has_timer, BDIInterpreter.getInterpreter(state).getClockService().createTimer(update.longValue(), to[0]));
BDIInterpreter.getInterpreter(state).getClockService().createTimer(update.longValue(), to[0]));
BDIInterpreter.getInterpreter(state).getClockService().createTimer(update.longValue(), to[0]));