Package rinde.sim.core.model.pdp

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


  }

  @Test(expected = IllegalArgumentException.class)
  public void testPickupFail5() {
    // wrong position
    final Vehicle truck = new TestVehicle(new Point(1, 1), 10.0, 1.0);
    rm.register(truck);
    model.register(truck);
    final Parcel pack1 = new TestParcel(new Point(2, 2), 0, 0, 2.0);
    rm.register(pack1);
    rm.addObjectAt(pack1, new Point(0, 0));
View Full Code Here


  }

  @Test(expected = IllegalArgumentException.class)
  public void testPickupFail6A() {
    // package does not fit in truck
    final Vehicle truck = new TestVehicle(new Point(1, 1), 1.0, 1.0);
    rm.register(truck);
    model.register(truck);
    final Parcel pack1 = new TestParcel(new Point(2, 2), 0, 0, 2.0);
    rm.register(pack1);
    model.register(pack1);
View Full Code Here

  }

  @Test
  public void testPickupFail6B() {
    // last package does not fit in truck
    final Vehicle truck = new TestVehicle(new Point(1, 1), 10.0, 1.0);
    rm.register(truck);
    model.register(truck);

    for (int i = 0; i < 9; i++) {
      final Parcel newPack = new TestParcel(new Point(2, 2), 0, 0, 1.0);
View Full Code Here

    assertTrue(fail);
  }

  @Test
  public void testDeliver() {
    final Vehicle truck = new TestVehicle(new Point(1, 1), 10.0, 1.0);
    rm.register(truck);
    model.register(truck);
    final Parcel pack1 = new TestParcel(new Point(2, 2), 10, 10, 2.0);
    rm.register(pack1);
    model.register(pack1);
View Full Code Here

        TimeLapseFactory.create(0, 1));
  }

  @Test(expected = IllegalArgumentException.class)
  public void testDeliverFail2() {
    final Vehicle truck = new TestVehicle(new Point(1, 1), 10.0, 1.0);
    rm.register(truck);
    model.register(truck);
    final Parcel pack1 = new TestParcel(new Point(2, 2), 10, 10, 2.0);
    rm.register(pack1);
    model.register(pack1);
View Full Code Here

    model.deliver(truck, pack1, TimeLapseFactory.create(0, 1));
  }

  @Test(expected = IllegalArgumentException.class)
  public void testDeliverFail3() {
    final Vehicle truck = new TestVehicle(new Point(1, 1), 10.0, 1.0);
    rm.register(truck);
    model.register(truck);
    final Parcel pack1 = new TestParcel(new Point(2, 2), 10, 10, 2.0);
    rm.register(pack1);
    model.register(pack1);
View Full Code Here

    model.deliver(truck, pack1, TimeLapseFactory.create(0, 1));
  }

  @Test(expected = IllegalArgumentException.class)
  public void testDeliverFail4() {
    final Vehicle truck = new TestVehicle(new Point(1, 1), 10.0, 1.0);
    rm.register(truck);
    model.register(truck);
    final Parcel pack1 = new TestParcel(new Point(2, 2), 10, 10, 2.0);
    rm.register(pack1);
    model.register(pack1);
View Full Code Here

TOP

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

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.