Package rinde.sim.core.model.pdp

Examples of rinde.sim.core.model.pdp.DefaultPDPModel


    final Simulator simulator = new Simulator(rng, Measure.valueOf(1000L,
        SI.MILLI(SI.SECOND)));

    // use map of leuven
    final RoadModel roadModel = new GraphRoadModel(loadGraph(graphFile));
    final DefaultPDPModel pdpModel = new DefaultPDPModel();

    // configure simulator with models
    simulator.register(roadModel);
    simulator.register(pdpModel);
    simulator.configure();
View Full Code Here


    final Graph<?> g = createGrid(width, height, 1, VERTICAL_LINE_SPACING,
        SPACING);

    final RoadModel roadModel = new BlockingGraphRoadModel(g, SI.METER,
        NonSI.KILOMETERS_PER_HOUR);
    final PDPModel pdpModel = new DefaultPDPModel();
    simulator.register(roadModel);
    simulator.register(pdpModel);

    final List<Point> borderNodes = newArrayList(getBorderNodes(g));
    Collections.shuffle(borderNodes, new Random(123));
View Full Code Here

  @Test
  public void closeWindowWhilePlaying() {
    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) {
View Full Code Here

  @Before
  public void setUp() {
    rm = new PDPRoadModel(new PlaneRoadModel(new Point(0, 0),
        new Point(10, 10), SI.KILOMETER, Measure.valueOf(300d,
            NonSI.KILOMETERS_PER_HOUR)), false);
    pm = new DefaultPDPModel(new TardyAllowedPolicy());
    mp = new TestModelProvider(new ArrayList<Model<?>>(
        Arrays.<Model<?>> asList(rm, pm)));
    rm.registerModelProvider(mp);
    pm.registerModelProvider(mp);
View Full Code Here

        MAX_SPEED), allowDiversion);
  }

  @Override
  public PDPModel createPDPModel() {
    return new DefaultPDPModel(new TardyAllowedPolicy());
  }
View Full Code Here

  @Before
  public void setUp() {
    rm = new PDPRoadModel(new PlaneRoadModel(new Point(0, 0),
        new Point(10, 10), SI.KILOMETER, Measure.valueOf(0.1,
            NonSI.KILOMETERS_PER_HOUR)), allowDiversion);
    pm = new DefaultPDPModel(new TardyAllowedPolicy());
    final ModelProvider mp = new TestModelProvider(asList(pm, rm));
    rm.registerModelProvider(mp);
    pm.registerModelProvider(mp);

    dp1 = create(new Point(1, 0), new Point(0, 7));
View Full Code Here

    sim = new Simulator(new MersenneTwister(123), Measure.valueOf(1000L,
        SI.MILLI(SI.SECOND)));
    rm = new PDPRoadModel(new PlaneRoadModel(new Point(0, 0),
        new Point(10, 10), SI.KILOMETER, Measure.valueOf(300d,
            NonSI.KILOMETERS_PER_HOUR)), false);
    pm = new DefaultPDPModel(new TardyAllowedPolicy());

    depot = new DefaultDepot(new Point(5, 5));
    sim.register(rm);
    sim.register(pm);
    sim.configure();
View Full Code Here

      return new PlaneRoadModel(new Point(0, 0), new Point(10, 10), 1d);
    }

    @Override
    public PDPModel createPDPModel() {
      return new DefaultPDPModel(new TardyAllowedPolicy());
    }
View Full Code Here

   */
  protected void init(boolean register) {
    rm = new PDPRoadModel(new PlaneRoadModel(new Point(0, 0),
        new Point(10, 10), 30d), diversionIsAllowed);

    pm = new DefaultPDPModel(new TardyAllowedPolicy());
    @SuppressWarnings("unchecked")
    final ModelProvider mp = new TestModelProvider(new ArrayList<Model<?>>(
        asList(rm, pm)));
    rm.registerModelProvider(mp);
    pm.registerModelProvider(mp);
View Full Code Here

  public void testToInventoriesArrayWithDuplicatePositions() {

    final Simulator sim = new Simulator(new MersenneTwister(123),
        Measure.valueOf(1000L, SI.MILLI(SI.SECOND)));

    sim.register(new DefaultPDPModel());
    sim.register(new PDPRoadModel(new PlaneRoadModel(new Point(0, 0),
        new Point(10, 10), 50), false));
    sim.configure();

    final RouteFollowingVehicle rfv = new RouteFollowingVehicle(new VehicleDTO(
View Full Code Here

TOP

Related Classes of rinde.sim.core.model.pdp.DefaultPDPModel

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.