Package org.nlogo.agent

Examples of org.nlogo.agent.Agent.classDisplayName()


      }
    } else if (target instanceof Agent) {
      Agent agent = (Agent) target;
      if (agent.id == -1) {
        throw new EngineException(context, this,
          I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", agent.classDisplayName()));
      }
      agentset = new ArrayAgentSet(agent.getAgentClass(), 1, false, world);
      agentset.add(agent);
    } else {
      throw new ArgumentTypeException(context, this, 0, Syntax.AgentsetType() | Syntax.AgentType(), target);
View Full Code Here


    Object agentOrSet = args[1].report(context);
    if (agentOrSet instanceof Agent) {
      Agent agent = (Agent) agentOrSet;
      if (agent.id == -1) {
        throw new EngineException(context, this,
          I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", agent.classDisplayName()));
      }
      args[0].checkAgentClass(agent, context);
      return new Context(context, agent).evaluateReporter(agent, args[0]);
    } else if (agentOrSet instanceof AgentSet) {
      AgentSet sourceSet = (AgentSet) agentOrSet;
View Full Code Here

  public void perform(final org.nlogo.nvm.Context context)
      throws LogoException {
    Agent otherAgent = argEvalAgent(context, 0);
    if (otherAgent.id == -1) {
      throw new EngineException(context, this,
          I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", otherAgent.classDisplayName()));
    }
    if (otherAgent instanceof org.nlogo.agent.Link) {
      throw new EngineException(context, this, "you can't move-to a link");
    }
    try {
View Full Code Here

      throw new EngineException
          (context, this, I18N.errorsJ().get("org.nlogo.prim.etc.$common.expectedTurtleOrPatchButGotLink"));
    }
    if (agent.id == -1) {
      throw new EngineException(context, this,
        I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", agent.classDisplayName()));
    }
    try {
      return validDouble
          (world.protractor().towards
              (context.agent, agent, true)); // true = wrap
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.