Examples of VehicleStateObject


Examples of rinde.sim.pdptw.central.GlobalStateObject.VehicleStateObject

   * Parcel 2 occurs in two different routes.
   */
  @Test(expected = IllegalArgumentException.class)
  public void validateInvalidCurrentRoute2() {
    final Point p = new Point(0, 0);
    final VehicleStateObject vs1 = new VehicleStateObject(vdto(), p,
        ImmutableSet.<ParcelDTO> of(), 0, p1, ImmutableList.of(p1, p2, p1, p2));
    final VehicleStateObject vs2 = new VehicleStateObject(vdto(), p,
        ImmutableSet.<ParcelDTO> of(), 0, null, ImmutableList.of(p2, p2));
    final ImmutableSet<ParcelDTO> available = ImmutableSet.of(p1, p2);
    final GlobalStateObject state = new GlobalStateObject(available,
        ImmutableList.of(vs1, vs2), 0, SI.SECOND, SI.METERS_PER_SECOND,
        SI.METER);
View Full Code Here

Examples of rinde.sim.pdptw.central.GlobalStateObject.VehicleStateObject

   * Vehicle doesn't have its cargo in its route.
   */
  @Test(expected = IllegalArgumentException.class)
  public void validateInvalidCurrentRoute3() {
    final Point p = new Point(0, 0);
    final VehicleStateObject vs1 = new VehicleStateObject(vdto(), p,
        ImmutableSet.of(p1), 0, p1, ImmutableList.of(p3));
    final ImmutableSet<ParcelDTO> available = ImmutableSet.of(p3);
    final GlobalStateObject state = new GlobalStateObject(available,
        ImmutableList.of(vs1), 0, SI.SECOND, SI.METERS_PER_SECOND, SI.METER);
    SolverValidator.validateInputs(state);
View Full Code Here

Examples of rinde.sim.pdptw.central.GlobalStateObject.VehicleStateObject

   * In this test it is another parcel.
   */
  @Test(expected = IllegalArgumentException.class)
  public void validateInvalidCurrentRoute4a() {
    final Point p = new Point(0, 0);
    final VehicleStateObject vs1 = new VehicleStateObject(vdto(), p,
        ImmutableSet.of(p1), 0, p1, ImmutableList.of(p3, p1, p3));
    final ImmutableSet<ParcelDTO> available = ImmutableSet.of(p3);
    final GlobalStateObject state = new GlobalStateObject(available,
        ImmutableList.of(vs1), 0, SI.SECOND, SI.METERS_PER_SECOND, SI.METER);
    SolverValidator.validateInputs(state);
View Full Code Here

Examples of rinde.sim.pdptw.central.GlobalStateObject.VehicleStateObject

   * In this test the route is empty.
   */
  @Test(expected = IllegalArgumentException.class)
  public void validateInvalidCurrentRoute4b() {
    final Point p = new Point(0, 0);
    final VehicleStateObject vs1 = new VehicleStateObject(vdto(), p,
        ImmutableSet.<ParcelDTO> of(), 0, p1, ImmutableList.<ParcelDTO> of());
    final ImmutableSet<ParcelDTO> available = ImmutableSet.of(p1);
    final GlobalStateObject state = new GlobalStateObject(available,
        ImmutableList.of(vs1), 0, SI.SECOND, SI.METERS_PER_SECOND, SI.METER);
    SolverValidator.validateInputs(state);
View Full Code Here

Examples of rinde.sim.pdptw.central.GlobalStateObject.VehicleStateObject

   * Duplicate in route.
   */
  @Test(expected = IllegalArgumentException.class)
  public void validateInvalidCurrentRoute5() {
    final Point p = new Point(0, 0);
    final VehicleStateObject vs1 = new VehicleStateObject(vdto(), p,
        ImmutableSet.of(p1), 0, p1, ImmutableList.of(p1, p1, p3));
    final ImmutableSet<ParcelDTO> available = ImmutableSet.of(p3);
    final GlobalStateObject state = new GlobalStateObject(available,
        ImmutableList.of(vs1), 0, SI.SECOND, SI.METERS_PER_SECOND, SI.METER);
    SolverValidator.validateInputs(state);
View Full Code Here

Examples of rinde.sim.pdptw.central.GlobalStateObject.VehicleStateObject

   * Only once occurence of available parcel, should occur twice.
   */
  @Test(expected = IllegalArgumentException.class)
  public void validateInvalidCurrentRoute6a() {
    final Point p = new Point(0, 0);
    final VehicleStateObject vs1 = new VehicleStateObject(vdto(), p,
        ImmutableSet.of(p1), 0, p1, ImmutableList.of(p1, p2));
    final ImmutableSet<ParcelDTO> available = ImmutableSet.of(p2);
    final GlobalStateObject state = new GlobalStateObject(available,
        ImmutableList.of(vs1), 0, SI.SECOND, SI.METERS_PER_SECOND, SI.METER);
    SolverValidator.validateInputs(state);
View Full Code Here

Examples of rinde.sim.pdptw.central.GlobalStateObject.VehicleStateObject

   * Too many occurences of available parcel, should occur twice.
   */
  @Test(expected = IllegalArgumentException.class)
  public void validateInvalidCurrentRoute6b() {
    final Point p = new Point(0, 0);
    final VehicleStateObject vs1 = new VehicleStateObject(vdto(), p,
        ImmutableSet.of(p1), 0, p1, ImmutableList.of(p1, p2, p2, p2));
    final ImmutableSet<ParcelDTO> available = ImmutableSet.of(p2);
    final GlobalStateObject state = new GlobalStateObject(available,
        ImmutableList.of(vs1), 0, SI.SECOND, SI.METERS_PER_SECOND, SI.METER);
    SolverValidator.validateInputs(state);
View Full Code Here

Examples of rinde.sim.pdptw.central.GlobalStateObject.VehicleStateObject

   * Valid routes.
   */
  @Test
  public void validateValidCurrentRoutes() {
    final ImmutableSet<ParcelDTO> empty = ImmutableSet.of();
    final VehicleStateObject vs1 = new VehicleStateObject(vdto(), null,
        ImmutableSet.of(p1), 0, p1, ImmutableList.of(p1));
    final VehicleStateObject vs2 = new VehicleStateObject(vdto(), null,
        ImmutableSet.of(p2), 0, null, ImmutableList.of(p2));
    final VehicleStateObject vs3 = new VehicleStateObject(vdto(), null, empty,
        0, p3, ImmutableList.<ParcelDTO> of(p3, p3));
    final ImmutableSet<ParcelDTO> available = ImmutableSet.of(p3);
    final GlobalStateObject state = new GlobalStateObject(available,
        ImmutableList.of(vs1, vs2, vs3), 0, null, null, null);
    SolverValidator.validateInputs(state);
View Full Code Here

Examples of rinde.sim.pdptw.central.GlobalStateObject.VehicleStateObject

  @SuppressWarnings("null")
  @Test
  public void validateCorrectInputs() {
    final ImmutableSet<ParcelDTO> empty = ImmutableSet.of();
    final VehicleStateObject vs1 = new VehicleStateObject(vdto(), null,
        ImmutableSet.of(p1), 0, p1, null);
    final VehicleStateObject vs2 = new VehicleStateObject(vdto(), null,
        ImmutableSet.of(p2), 0, null, null);
    final VehicleStateObject vs3 = new VehicleStateObject(vdto(), null, empty,
        0, p3, null);
    final ImmutableSet<ParcelDTO> available = ImmutableSet.of(p3);
    final GlobalStateObject state = new GlobalStateObject(available,
        ImmutableList.of(vs1, vs2, vs3), 0, null, null, null);
    SolverValidator.validateInputs(state);
View Full Code Here

Examples of rinde.sim.pdptw.central.GlobalStateObject.VehicleStateObject

  }

  @SuppressWarnings("null")
  @Test(expected = IllegalArgumentException.class)
  public void validateInvalidNumberOfRoutes() {
    final VehicleStateObject vs1 = new VehicleStateObject(vdto(), new Point(0,
        0), null, 0, null, null);
    final ImmutableList<ImmutableList<ParcelDTO>> routes = ImmutableList.of();
    final GlobalStateObject state = new GlobalStateObject(null,
        ImmutableList.of(vs1), 0, null, null, null);
    SolverValidator.validateOutputs(routes, state);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.