Package jsprit.core.algorithm.ruin.RuinRadial

Examples of jsprit.core.algorithm.ruin.RuinRadial.JobNeighborhoodsImpl


    assertEquals(4,services.size());
  }
 
  @Test
  public void whenRequestingMoreNeighborsThanExisting_itShouldReturnMaxNeighbors(){
    JobNeighborhoodsImpl jn = new JobNeighborhoodsImpl(vrp, jobDistance);
    jn.initialise();
    Iterator<Job> iter = jn.getNearestNeighborsIterator(100, target);
    List<Service> services = new ArrayList<Service>();
    while(iter.hasNext()){
      services.add((Service) iter.next());
    }
    assertEquals(6,services.size());
View Full Code Here


    jobDistance = new EuclideanServiceDistance();
  }
 
  @Test
  public void whenRequestingNeighborhoodOfTargetJob_nNeighborsShouldBeTwo(){
    JobNeighborhoodsImpl jn = new JobNeighborhoodsImpl(vrp, jobDistance);
    jn.initialise();
    Iterator<Job> iter = jn.getNearestNeighborsIterator(2, target);
    List<Service> services = new ArrayList<Service>();
    while(iter.hasNext()){
      services.add((Service) iter.next());
    }
    assertEquals(2,services.size());
View Full Code Here

    assertEquals(2,services.size());
  }
 
  @Test
  public void whenRequestingNeighborhoodOfTargetJob_s2ShouldBeNeighbor(){
    JobNeighborhoodsImpl jn = new JobNeighborhoodsImpl(vrp, jobDistance);
    jn.initialise();
    Iterator<Job> iter = jn.getNearestNeighborsIterator(2, target);
    List<Service> services = new ArrayList<Service>();
    while(iter.hasNext()){
      services.add((Service) iter.next());
    }
    assertTrue(services.contains(s2));
View Full Code Here

    assertTrue(services.contains(s2));
  }
 
  @Test
  public void whenRequestingNeighborhoodOfTargetJob_s4ShouldBeNeighbor(){
    JobNeighborhoodsImpl jn = new JobNeighborhoodsImpl(vrp, jobDistance);
    jn.initialise();
    Iterator<Job> iter = jn.getNearestNeighborsIterator(2, target);
    List<Service> services = new ArrayList<Service>();
    while(iter.hasNext()){
      services.add((Service) iter.next());
    }
    assertTrue(services.contains(s5));
View Full Code Here

    assertTrue(services.contains(s5));
  }
 
  @Test
  public void whenRequestingNeighborhoodOfTargetJob_sizeShouldBe4(){
    JobNeighborhoodsImpl jn = new JobNeighborhoodsImpl(vrp, jobDistance);
    jn.initialise();
    Iterator<Job> iter = jn.getNearestNeighborsIterator(4, target);
    List<Service> services = new ArrayList<Service>();
    while(iter.hasNext()){
      services.add((Service) iter.next());
    }
    assertEquals(4,services.size());
View Full Code Here

TOP

Related Classes of jsprit.core.algorithm.ruin.RuinRadial.JobNeighborhoodsImpl

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.