Package jsprit.core.problem.solution.route.activity

Examples of jsprit.core.problem.solution.route.activity.ServiceActivity


    assertEquals("loc",serviceActivity.getLocationId());
  }
 
  @Test
  public void whenCopyingStart_itShouldBeDoneCorrectly(){
    ServiceActivity copy = (ServiceActivity) serviceActivity.duplicate();
    assertEquals(1.,copy.getTheoreticalEarliestOperationStartTime(),0.01);
    assertEquals(2.,copy.getTheoreticalLatestOperationStartTime(),0.01);
    assertEquals("loc",copy.getLocationId());
    assertTrue(copy!=serviceActivity);
  }
View Full Code Here


  @Test
  public void whenTwoDeliveriesHaveTheSameUnderlyingJob_theyAreEqual(){
    Service s1 = Service.Builder.newInstance("s").setLocationId("loc").build();
    Service s2 = Service.Builder.newInstance("s").setLocationId("loc").build();
   
    ServiceActivity d1 = ServiceActivity.newInstance(s1);
    ServiceActivity d2 = ServiceActivity.newInstance(s2);
   
    assertTrue(d1.equals(d2));
  }
View Full Code Here

  @Test
  public void whenTwoDeliveriesHaveTheDifferentUnderlyingJob_theyAreNotEqual(){
    Service s1 = Service.Builder.newInstance("s").setLocationId("loc").build();
    Service s2 = Service.Builder.newInstance("s1").setLocationId("loc").build();
   
    ServiceActivity d1 = ServiceActivity.newInstance(s1);
    ServiceActivity d2 = ServiceActivity.newInstance(s2);
   
    assertFalse(d1.equals(d2));
  }
View Full Code Here

    static class ActFac implements JobActivityFactory{

        @Override
        public List<AbstractActivity> createActivities(Job job) {
            ServiceActivity act = mock(ServiceActivity.class);
            when(act.getIndex()).thenReturn(1);
            List<AbstractActivity> acts = new ArrayList<AbstractActivity>();
            acts.add(act);
            return acts;
        }
View Full Code Here

TOP

Related Classes of jsprit.core.problem.solution.route.activity.ServiceActivity

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.