Package jsprit.core.problem.job

Examples of jsprit.core.problem.job.Service


    assertTrue(constraint.fulfilled(iContext));
  }
 
  @Test
  public void whenLoadPlusDeliverySizeExceedsVehicleCapacityInAllDimension_itShouldReturnFalse(){
    Service service = mock(Delivery.class);
    when(service.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0, 3).addDimension(1, 3).addDimension(2, 3).build());
   
    JobInsertionContext iContext = mock(JobInsertionContext.class);
    when(iContext.getJob()).thenReturn(service);
    when(iContext.getRoute()).thenReturn(route);
    when(iContext.getNewVehicle()).thenReturn(vehicle);
View Full Code Here


    assertFalse(constraint.fulfilled(iContext));
  }
 
  @Test
  public void whenLoadPlusDeliverySizeExceedsVehicleCapacityInOneDimension_itShouldReturnFalse(){
    Service service = mock(Delivery.class);
    when(service.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 1).addDimension(2, 3).build());
   
    JobInsertionContext iContext = mock(JobInsertionContext.class);
    when(iContext.getJob()).thenReturn(service);
    when(iContext.getRoute()).thenReturn(route);
    when(iContext.getNewVehicle()).thenReturn(vehicle);
View Full Code Here

    assertFalse(constraint.fulfilled(iContext));
  }
 
  @Test
  public void whenLoadPlusDeliverySizeJustFitIntoVehicle_itShouldReturnTrue(){
    Service service = mock(Delivery.class);
    when(service.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 2).addDimension(2, 2).build());
   
    JobInsertionContext iContext = mock(JobInsertionContext.class);
    when(iContext.getJob()).thenReturn(service);
    when(iContext.getRoute()).thenReturn(route);
    when(iContext.getNewVehicle()).thenReturn(vehicle);
View Full Code Here

    assertTrue(constraint.fulfilled(iContext));
  }

  @Test
  public void whenLoadPlusPickupSizeDoesNotExceedsVehicleCapacity_itShouldReturnTrue(){
    Service service = mock(Pickup.class);
    when(service.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 1).addDimension(2, 1).build());
   
    JobInsertionContext iContext = mock(JobInsertionContext.class);
    when(iContext.getJob()).thenReturn(service);
    when(iContext.getRoute()).thenReturn(route);
    when(iContext.getNewVehicle()).thenReturn(vehicle);
View Full Code Here

    assertTrue(constraint.fulfilled(iContext));
  }
 
  @Test
  public void whenLoadPlusPickupSizeExceedsVehicleCapacityInAllDimension_itShouldReturnFalse(){
    Service service = mock(Pickup.class);
    when(service.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0, 3).addDimension(1, 3).addDimension(2, 3).build());
   
    JobInsertionContext iContext = mock(JobInsertionContext.class);
    when(iContext.getJob()).thenReturn(service);
    when(iContext.getRoute()).thenReturn(route);
    when(iContext.getNewVehicle()).thenReturn(vehicle);
View Full Code Here

    assertFalse(constraint.fulfilled(iContext));
  }
 
  @Test
  public void whenLoadPlusPickupSizeExceedsVehicleCapacityInOneDimension_itShouldReturnFalse(){
    Service service = mock(Pickup.class);
    when(service.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 1).addDimension(2, 3).build());
   
    JobInsertionContext iContext = mock(JobInsertionContext.class);
    when(iContext.getJob()).thenReturn(service);
    when(iContext.getRoute()).thenReturn(route);
    when(iContext.getNewVehicle()).thenReturn(vehicle);
View Full Code Here

    assertFalse(constraint.fulfilled(iContext));
  }
 
  @Test
  public void whenLoadPlusPickupSizeJustFitIntoVehicle_itShouldReturnTrue(){
    Service service = mock(Pickup.class);
    when(service.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0, 2).addDimension(1, 2).addDimension(2, 2).build());
   
    JobInsertionContext iContext = mock(JobInsertionContext.class);
    when(iContext.getJob()).thenReturn(service);
    when(iContext.getRoute()).thenReturn(route);
    when(iContext.getNewVehicle()).thenReturn(vehicle);
View Full Code Here

    assertTrue(constraint.fulfilled(iContext));
  }
 
  @Test
  public void whenLoadPlusServiceSizeDoesNotExceedsVehicleCapacity_itShouldReturnTrue(){
    Service service = mock(Service.class);
    when(service.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 1).addDimension(2, 1).build());
   
    JobInsertionContext iContext = mock(JobInsertionContext.class);
    when(iContext.getJob()).thenReturn(service);
    when(iContext.getRoute()).thenReturn(route);
    when(iContext.getNewVehicle()).thenReturn(vehicle);
View Full Code Here

    assertTrue(constraint.fulfilled(iContext));
  }
 
  @Test
  public void whenLoadPlusServiceSizeExceedsVehicleCapacityInAllDimension_itShouldReturnFalse(){
    Service service = mock(Service.class);
    when(service.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0, 3).addDimension(1, 3).addDimension(2, 3).build());
   
    JobInsertionContext iContext = mock(JobInsertionContext.class);
    when(iContext.getJob()).thenReturn(service);
    when(iContext.getRoute()).thenReturn(route);
    when(iContext.getNewVehicle()).thenReturn(vehicle);
View Full Code Here

    assertFalse(constraint.fulfilled(iContext));
  }
 
  @Test
  public void whenLoadPlusServiceSizeExceedsVehicleCapacityInOneDimension_itShouldReturnFalse(){
    Service service = mock(Service.class);
    when(service.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0, 1).addDimension(1, 1).addDimension(2, 3).build());
   
    JobInsertionContext iContext = mock(JobInsertionContext.class);
    when(iContext.getJob()).thenReturn(service);
    when(iContext.getRoute()).thenReturn(route);
    when(iContext.getNewVehicle()).thenReturn(vehicle);
View Full Code Here

TOP

Related Classes of jsprit.core.problem.job.Service

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.