Examples of Shipment


Examples of jsprit.core.problem.job.Shipment

  @Test
  public void whenReadingJobs_pickupCoordShipment3IsReadCorrectly(){
    VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
    new VrpXMLReader(builder, null).read(inFileName);
    VehicleRoutingProblem vrp = builder.build();
    Shipment s = (Shipment) vrp.getJobs().get("3");
    assertEquals(10.0,s.getPickupCoord().getX(),0.01);
    assertEquals(10.0,s.getPickupCoord().getY(),0.01);
  }
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

  @Test
  public void whenReadingJobs_deliveryIdShipment3IsReadCorrectly(){
    VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
    new VrpXMLReader(builder, null).read(inFileName);
    VehicleRoutingProblem vrp = builder.build();
    Shipment s = (Shipment) vrp.getJobs().get("3");
    assertEquals("i(9,9)",s.getDeliveryLocationId());
  }
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

  @Test
  public void whenReadingJobs_pickupIdShipment3IsReadCorrectly(){
    VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
    new VrpXMLReader(builder, null).read(inFileName);
    VehicleRoutingProblem vrp = builder.build();
    Shipment s = (Shipment) vrp.getJobs().get("3");
    assertEquals("i(3,9)",s.getPickupLocationId());
  }
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

  @Test
  public void whenReadingJobs_pickupLocationIdShipment4IsReadCorrectly(){
    VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
    new VrpXMLReader(builder, null).read(inFileName);
    VehicleRoutingProblem vrp = builder.build();
    Shipment s = (Shipment) vrp.getJobs().get("4");
    assertEquals("[x=10.0][y=10.0]",s.getPickupLocationId());
  }
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

  @Test
  public void whenReadingJobs_deliveryLocationIdShipment4IsReadCorrectly(){
    VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
    new VrpXMLReader(builder, null).read(inFileName);
    VehicleRoutingProblem vrp = builder.build();
    Shipment s = (Shipment) vrp.getJobs().get("4");
    assertEquals("[x=10.0][y=0.0]",s.getDeliveryLocationId());
  }
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

  @Test
  public void whenReadingJobs_pickupServiceTimeOfShipment4IsReadCorrectly(){
    VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
    new VrpXMLReader(builder, null).read(inFileName);
    VehicleRoutingProblem vrp = builder.build();
    Shipment s = (Shipment) vrp.getJobs().get("4");
    assertEquals(0.0,s.getPickupServiceTime(),0.01);
  }
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

  @Test
  public void whenReadingJobs_deliveryServiceTimeOfShipment4IsReadCorrectly(){
    VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
    new VrpXMLReader(builder, null).read(inFileName);
    VehicleRoutingProblem vrp = builder.build();
    Shipment s = (Shipment) vrp.getJobs().get("4");
    assertEquals(100.0,s.getDeliveryServiceTime(),0.01);
  }
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

public class DefaultShipmentActivityFactoryTest {
 
  @Test
  public void whenCreatingPickupActivityWithShipment_itShouldReturnPickupShipment(){
    DefaultShipmentActivityFactory factory = new DefaultShipmentActivityFactory();
    Shipment shipment = Shipment.Builder.newInstance("s")
        .setPickupLocationId("pLoc").setDeliveryLocationId("dLoc").build();
    TourActivity act = factory.createPickup(shipment);
    assertNotNull(act);
    assertTrue(act instanceof PickupShipment);
  }
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

  }
 
  @Test
  public void whenCreatingDeliverActivityWithShipment_itShouldReturnDeliverShipment(){
    DefaultShipmentActivityFactory factory = new DefaultShipmentActivityFactory();
    Shipment shipment = Shipment.Builder.newInstance("s")
        .setPickupLocationId("pLoc").setDeliveryLocationId("dLoc").build();
    TourActivity act = factory.createDelivery(shipment);
    assertNotNull(act);
    assertTrue(act instanceof DeliverShipment);
  }
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

    private void addLocationToTentativeLocations(Job job) {
      if(job instanceof Service) {
        tentative_coordinates.put(((Service)job).getLocationId(), ((Service)job).getCoord());
      }
      else if(job instanceof Shipment){
        Shipment shipment = (Shipment)job;
        tentative_coordinates.put(shipment.getPickupLocationId(), shipment.getPickupCoord());
        tentative_coordinates.put(shipment.getDeliveryLocationId(), shipment.getDeliveryCoord());
      }
    }
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.