Package rinde.sim.core

Examples of rinde.sim.core.TickListener


      simulator.register(new Customer(roadModel.getRandomPosition(rng),
          roadModel.getRandomPosition(rng), SERVICE_DURATION, SERVICE_DURATION,
          1 + rng.nextInt(3)));
    }

    simulator.addTickListener(new TickListener() {
      @Override
      public void tick(TimeLapse time) {
        if (time.getStartTime() > endTime) {
          simulator.stop();
        } else if (rng.nextDouble() < .007) {
View Full Code Here


    for (int i = 0; i < NUM_VECHICLES; i++) {
      simulator.register(new AGV(rng));
    }

    simulator.addTickListener(new TickListener() {
      @Override
      public void tick(TimeLapse time) {
        if (time.getStartTime() > endTime) {
          simulator.stop();
        }
View Full Code Here

  public void testRenderer() {
    final Simulator sim = new Simulator(new MersenneTwister(123),
        Measure.valueOf(1000L, SI.MILLI(SI.SECOND)));
    sim.register(new PlaneRoadModel(new Point(0, 0), new Point(10, 10), 50));
    sim.configure();
    sim.addTickListener(new TickListener() {
      @Override
      public void tick(TimeLapse timeLapse) {
        if (timeLapse.getTime() >= 10000) {
          sim.stop();
        }
View Full Code Here

    final Simulator sim = new Simulator(new MersenneTwister(123),
        Measure.valueOf(1000L, SI.MILLI(SI.SECOND)));
    sim.register(new PlaneRoadModel(new Point(0, 0), new Point(10, 10), 50));
    sim.register(new DefaultPDPModel());
    sim.configure();
    sim.addTickListener(new TickListener() {
      @Override
      public void tick(TimeLapse timeLapse) {
        if (timeLapse.getTime() >= 10000) {
          final Display disp = UITestTools.findDisplay();
          disp.syncExec(
View Full Code Here

      } else {
        shell.setSize(screenSize);
      }

      if (stopTime > 0) {
        simulator.addTickListener(new TickListener() {
          @Override
          public void tick(TimeLapse time) {}

          @Override
          public void afterTick(TimeLapse time) {
View Full Code Here

    controller = new ScenarioController(scen, simulator, handler, ticks);
    statsTracker = new StatsTracker(controller, simulator);

    stopCondition = scen.getStopCondition();

    simulator.addTickListener(new TickListener() {

      @Override
      public void tick(TimeLapse timeLapse) {}

      @Override
View Full Code Here

TOP

Related Classes of rinde.sim.core.TickListener

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.