Package rinde.sim.event

Examples of rinde.sim.event.EventDispatcher


    containerCapacities = newLinkedHashMap();
    pendingVehicleActions = newLinkedHashMap();
    vehicleState = newLinkedHashMap();
    parcelState = CategoryMap.create();

    eventDispatcher = new EventDispatcher(PDPModelEventType.values());
    roadModel = Optional.absent();
  }
View Full Code Here


    toExternalSpeedConv = INTERNAL_SPEED_UNIT.getConverterTo(externalSpeedUnit);
    toInternalSpeedConv = externalSpeedUnit.getConverterTo(INTERNAL_SPEED_UNIT);

    objLocs = Collections.synchronizedMap(new LinkedHashMap<RoadUser, T>());
    objDestinations = newLinkedHashMap();
    eventDispatcher = new EventDispatcher(RoadEventType.MOVE);
  }
View Full Code Here

    // time lapse is reused in a Flyweight kind of style
    timeLapse = new TimeLapse(step.getUnit());

    modelManager = new ModelManager();

    dispatcher = new EventDispatcher(SimulatorEventType.values());
  }
View Full Code Here

    scenarioQueue = scenario.asQueue();

    final Set<Enum<?>> typeSet = newHashSet(scenario.getPossibleEventTypes());
    typeSet.addAll(asList(EventType.values()));
    disp = new EventDispatcher(typeSet);
    disp.addListener(new InternalTimedEventHandler(),
        scenario.getPossibleEventTypes());

    simulator.getEventAPI().addListener(new Listener() {
      @Override
View Full Code Here

  protected final boolean explicitRecursiveTransitions;

  StateMachine(State<E, C> start,
      ImmutableTable<State<E, C>, E, State<E, C>> table,
      boolean explRecurTrns) {
    eventDispatcher = new EventDispatcher(StateMachineEvent.values());
    startState = start;
    currentState = start;
    transitionTable = table;
    explicitRecursiveTransitions = explRecurTrns;
  }
View Full Code Here

  enum StatisticsEventType {
    PICKUP_TARDINESS, DELIVERY_TARDINESS, ALL_VEHICLES_AT_DEPOT;
  }

  StatsTracker(ScenarioController scenContr, Simulator sim) {
    eventDispatcher = new EventDispatcher(StatisticsEventType.values());
    theListener = new TheListener();
    simulator = sim;
    scenContr.getEventAPI().addListener(theListener, SCENARIO_STARTED,
        SCENARIO_FINISHED, ADD_DEPOT, ADD_PARCEL, ADD_VEHICLE, TIME_OUT);
    simulator.getEventAPI().addListener(theListener, STARTED, STOPPED);
View Full Code Here

TOP

Related Classes of rinde.sim.event.EventDispatcher

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.