Package org.janusproject.kernel.agent

Examples of org.janusproject.kernel.agent.Kernel


    assert(environment!=null);
    if (environmentSingleton==null) {
      environmentSingleton = environment;
      uiSingleton = gui;
      if (gui!=null) environment.addEnvironmentListener(gui);
      Kernel k = Kernels.create(new SimulationScheduler(environment, waitDuration));
      k.addKernelListener(new KernelAdapter(){
        /**
         * {@inheritDoc}
         */
        @SuppressWarnings("synthetic-access")
        @Override
 
View Full Code Here


   * @param animat
   */
  public static void launchAgent(Animat<?> animat) {
    if (environmentSingleton==null) throw new IllegalStateException();
   
    Kernel k = Kernels.get();
    if (k==null) throw new IllegalStateException();
   
    environmentSingleton.spawnAgentBody(animat);
   
    k.submitLightAgent(animat);
  }
View Full Code Here

  }
 
  /** Start the simulation right now.
   */
  public static void startSimulation() {
    Kernel k = Kernels.get();
    if (k==null) throw new IllegalStateException();
    k.launchDifferedExecutionAgents();
    if (uiSingleton!=null) uiSingleton.setVisible(true);
  }
View Full Code Here

TOP

Related Classes of org.janusproject.kernel.agent.Kernel

Copyright © 2018 www.massapicom. 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.