Package jsprit.core.problem.vehicle

Examples of jsprit.core.problem.vehicle.Vehicle


    assertTrue(vRoute.getEnd().getLocationId().equals("start"));
  }
 
  @Test
  public void whenBuildingRouteWithVehicleThatHasSameStartAndEndLocation_routeMustHaveCorrectStartLocationV2(){
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setStartLocationId("start").setEndLocationId("start").build();
    VehicleRoute vRoute = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).build();
    assertTrue(vRoute.getStart().getLocationId().equals("start"));
  }
View Full Code Here


    assertTrue(vRoute.getStart().getLocationId().equals("start"));
  }
 
  @Test
  public void whenBuildingRouteWithVehicleThatHasSameStartAndEndLocation_routeMustHaveCorrectEndLocationV2(){
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setStartLocationId("start").setEndLocationId("start").build();
    VehicleRoute vRoute = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).build();
    assertTrue(vRoute.getEnd().getLocationId().equals("start"));
  }
View Full Code Here

    assertTrue(vRoute.getEnd().getLocationId().equals("start"));
  }
 
  @Test
  public void whenBuildingRouteWithVehicleThatHasDifferentStartAndEndLocation_routeMustHaveCorrectDepartureTime(){
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setEarliestStart(100).setStartLocationId("start").setEndLocationId("end").build();
    VehicleRoute vRoute = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).build();
    assertEquals(vRoute.getDepartureTime(),100.0,0.01);
    assertEquals(vRoute.getStart().getEndTime(),100.0,0.01);
  }
View Full Code Here

    assertEquals(vRoute.getStart().getEndTime(),100.0,0.01);
  }
 
  @Test
  public void whenBuildingRouteWithVehicleThatHasDifferentStartAndEndLocation_routeMustHaveCorrectEndTime(){
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setEarliestStart(100).setLatestArrival(200).setStartLocationId("start").setEndLocationId("end").build();
    VehicleRoute vRoute = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).build();
    assertEquals(200.0,vRoute.getEnd().getTheoreticalLatestOperationStartTime(),0.01);
  }
View Full Code Here

    assertEquals(200.0,vRoute.getEnd().getTheoreticalLatestOperationStartTime(),0.01);
  }
 
  @Test
  public void whenSettingDepartureTimeInBetweenEarliestStartAndLatestArr_routeMustHaveCorrectDepartureTime(){
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setEarliestStart(100).setLatestArrival(200).setStartLocationId("start").setEndLocationId("end").build();
    VehicleRoute vRoute = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).build();
    vRoute.setVehicleAndDepartureTime(vehicle, 150.0);
    assertEquals(vRoute.getStart().getEndTime(),150.0,0.01);
    assertEquals(vRoute.getDepartureTime(),150.0,0.01);
  }
View Full Code Here

    assertEquals(vRoute.getDepartureTime(),150.0,0.01);
  }
 
  @Test
  public void whenSettingDepartureEarlierThanEarliestStart_routeMustHaveEarliestDepTimeAsDepTime(){
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setEarliestStart(100).setLatestArrival(200).setStartLocationId("start").setEndLocationId("end").build();
    VehicleRoute vRoute = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).build();
    vRoute.setVehicleAndDepartureTime(vehicle, 50.0);
    assertEquals(vRoute.getStart().getEndTime(),100.0,0.01);
    assertEquals(vRoute.getDepartureTime(),100.0,0.01);
  }
View Full Code Here

    assertEquals(vRoute.getDepartureTime(),100.0,0.01);
  }
 
  @Test
  public void whenSettingDepartureTimeLaterThanLatestArrival_routeMustHaveThisDepTime(){
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setEarliestStart(100).setLatestArrival(200).setStartLocationId("start").setEndLocationId("end").build();
    VehicleRoute vRoute = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).build();
    vRoute.setVehicleAndDepartureTime(vehicle, 50.0);
    assertEquals(vRoute.getStart().getEndTime(),100.0,0.01);
    assertEquals(vRoute.getDepartureTime(),100.0,0.01);
  }
View Full Code Here

    assertTrue(true);
  }
 
  @Test
  public void whenIniRouteWithNewVehicle_startLocationMustBeCorrect(){
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setEarliestStart(100).setLatestArrival(200).setStartLocationId("start").setEndLocationId("end").build();
    Vehicle new_vehicle = VehicleImpl.Builder.newInstance("new_v").setEarliestStart(1000).setLatestArrival(2000).setStartLocationId("new_start").setEndLocationId("new_end").build();
    VehicleRoute vRoute = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).build();
    vRoute.setVehicleAndDepartureTime(new_vehicle, 50.0);
    assertEquals("new_start",vRoute.getStart().getLocationId());
  }
View Full Code Here

    assertEquals("new_start",vRoute.getStart().getLocationId());
  }
 
  @Test
  public void whenIniRouteWithNewVehicle_endLocationMustBeCorrect(){
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setEarliestStart(100).setLatestArrival(200).setStartLocationId("start").setEndLocationId("end").build();
    Vehicle new_vehicle = VehicleImpl.Builder.newInstance("new_v").setEarliestStart(1000).setLatestArrival(2000).setStartLocationId("new_start").setEndLocationId("new_end").build();
    VehicleRoute vRoute = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).build();
    vRoute.setVehicleAndDepartureTime(new_vehicle, 50.0);
    assertEquals("new_end",vRoute.getEnd().getLocationId());
  }
View Full Code Here

    assertEquals("new_end",vRoute.getEnd().getLocationId());
  }

  @Test
  public void whenIniRouteWithNewVehicle_depTimeMustBeEarliestDepTimeOfNewVehicle(){
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setEarliestStart(100).setLatestArrival(200).setStartLocationId("start").setEndLocationId("end").build();
    Vehicle new_vehicle = VehicleImpl.Builder.newInstance("new_v").setEarliestStart(1000).setLatestArrival(2000).setStartLocationId("new_start").setEndLocationId("new_end").build();
    VehicleRoute vRoute = VehicleRoute.Builder.newInstance(vehicle, DriverImpl.noDriver()).build();
    vRoute.setVehicleAndDepartureTime(new_vehicle, 50.0);
    assertEquals(1000.0,vRoute.getDepartureTime(),0.01);
  }
View Full Code Here

TOP

Related Classes of jsprit.core.problem.vehicle.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.