/** * Get an expression by name. * @name The expression name. * @return The expression. */ public IExpression createExpression(String exp) { return getExpressionbase().createExpression(exp); }
/** * Send a message and wait until it is sent. * @param me The message event. */ public IFuture<Void> sendMessage(IMessageEvent me) { return getEventbase().sendMessage(me); }
/** * Create a goal from a template goal. * To be processed, the goal has to be dispatched as subgoal * or adopted as top-level goal. * @param type The template goal name as specified in the ADF. * @return The created goal. */ public IGoal createGoal(String type) { return getGoalbase().createGoal(type); }
/** * */ public void body() { IMessageEvent msg = (IMessageEvent) getParameter("message").getValue(); IMessageEvent update = getEventbase().createReply(msg, "sp_inform"); update.getParameter(SFipa.CONTENT).setValue(getParameter("update").getValue()); sendMessage(update); } }
/** * When move to location or eat food finally failed, * add food to forbidden food. */ public void failed() { getBeliefbase().getBeliefSet("forbidden_food") .addFact(getParameter("food").getValue()); } }
/** * Dispatch a new top-level goal. * @param goal The new goal. * Note: plan step is interrupted after call. */ public void dispatchTopLevelGoal(IGoal goal) { getGoalbase().dispatchTopLevelGoal(goal); }
/** * Get an expression by name. * @name The expression name. * @return The expression. */ public IExpression getExpression(String name) { return getExpressionbase().getExpression(name); }
/** * Get the goal base. * @return The goal base. */ public IGoalbase getGoalbase() { return getScope().getGoalbase(); }
/** * Get the beliefbase. * @return The beliefbase. */ public IBeliefbase getBeliefbase() { return getScope().getBeliefbase(); }
/** * Get the belief base. * @return The belief base. */ public IBeliefbase getBeliefbase() { return scope!=null ? new BeliefbaseWrapper(capa.getBeliefbase(), scope+MElement.CAPABILITY_SEPARATOR) : capa.getBeliefbase(); }
/** * Get the goal base. * @return The goal base. */ public IGoalbase getGoalbase() { return scope!=null ? new RGoalbase(agent, scope) : capa.getGoalbase(); }
/** * Create a new message event. * @return The new message event. */ public IMessageEvent createMessageEvent(String type) { return getEventbase().createMessageEvent(type); }
/** * Create a new intenal event. * @return The new intenal event. */ public IInternalEvent createInternalEvent(String type) { return getEventbase().createInternalEvent(type); }
/** * Get the plan base. * @return The plan base. */ public IPlanbase getPlanbase() { return scope!=null ? new PlanbaseWrapper(capa.getPlanbase(), scope+MElement.CAPABILITY_SEPARATOR) : capa.getPlanbase(); }
/** * Get the expression base. * @return The expression base. */ public IExpressionbase getExpressionbase() { return getScope().getExpressionbase(); }
/** * Get the expression base. * @return The expression base. */ public IExpressionbase getExpressionbase() { return scope!=null ? new ExpressionbaseWrapper(capa.getExpressionbase(), scope+MElement.CAPABILITY_SEPARATOR) : capa.getExpressionbase(); }
/** * Dispatch an internal event. * @param event The event. * Note: plan step is interrupted after call. */ public void dispatchInternalEvent(IInternalEvent event) { getEventbase().dispatchInternalEvent(event); }
/** * Get the event base. * @return The event base. */ public IEventbase getEventbase() { return scope!=null ? new REventbase(agent, scope) : capa.getEventbase(); }
/** * Get the plan base. * @return The plan base. */ public IPlanbase getPlanbase() { return getScope().getPlanbase(); }
/** * Get the event base. * @return The event base. */ public IEventbase getEventbase() { return getScope().getEventbase(); }