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

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


        /*
        generate new start and end for new vehicle
         */
    Start start = Start.newInstance(newVehicle.getStartLocationId(), newVehicle.getEarliestDeparture(), Double.MAX_VALUE);
    start.setEndTime(newVehicleDepartureTime);
    End end = End.newInstance(newVehicle.getEndLocationId(), 0.0, newVehicle.getLatestArrival());
   
    TourActivity prevAct = start;
    double prevActStartTime = newVehicleDepartureTime;
    int actIndex = 0;
    boolean loopBroken = false;
View Full Code Here


    int deliveryInsertionIndex = InsertionData.NO_INDEX;
   
    Start start = Start.newInstance(newVehicle.getStartLocationId(), newVehicle.getEarliestDeparture(), newVehicle.getLatestArrival());
    start.setEndTime(newVehicleDepartureTime);
   
    End end = End.newInstance(newVehicle.getEndLocationId(), 0.0, newVehicle.getLatestArrival());

        ActivityContext pickupContext = new ActivityContext();

    TourActivity prevAct = start;
    double prevActEndTime = newVehicleDepartureTime;
View Full Code Here

      prevActDepTime_newVehicle = depTime_nextAct_newVehicle;

      actIndex++;
    }
    if(!loopBroken){
      End nextAct = end;
            ConstraintsStatus hardActivityConstraintsStatus = hardActivityLevelConstraint.fulfilled(insertionContext, prevAct, serviceAct2Insert, nextAct, prevActDepTime_newVehicle);
            if(hardActivityConstraintsStatus.equals(ConstraintsStatus.FULFILLED)){
                double actInsertionCosts = activityInsertionCostsCalculator.getCosts(insertionContext, prevAct, nextAct, serviceAct2Insert, prevActDepTime_newVehicle);

                    /**
 
View Full Code Here

 
  @Test
  public void whenInsertingActBetweenLastActAndEnd_itCalcsMarginalTpCosts(){
    TourActivity prevAct = mock(TourActivity.class);
    when(prevAct.getLocationId()).thenReturn("i");
    End nextAct = End.newInstance("j", 0.0, 0.0);
    TourActivity newAct = mock(TourActivity.class);
    when(newAct.getLocationId()).thenReturn("k");
   
    when(vehicle.isReturnToDepot()).thenReturn(true);
   
View Full Code Here

 
  @Test
  public void whenInsertingActBetweenLastActAndEndAndRouteIsOpen_itCalculatesTpCostsFromPrevToNewAct(){
    TourActivity prevAct = mock(TourActivity.class);
    when(prevAct.getLocationId()).thenReturn("i");
    End nextAct = End.newInstance("j", 0.0, 0.0);
    TourActivity newAct = mock(TourActivity.class);
    when(newAct.getLocationId()).thenReturn("k");
   
    when(vehicle.isReturnToDepot()).thenReturn(false);
   
View Full Code Here

 
  @Test
  public void whenRouteIsClosed_itCalculatesCostUpToEnd_v2(){
    TourActivity prevAct = mock(TourActivity.class);
    when(prevAct.getLocationId()).thenReturn("i");
    End nextAct = End.newInstance("j", 0.0, 0.0);
    TourActivity newAct = mock(TourActivity.class);
    when(newAct.getLocationId()).thenReturn("k");
   
    when(vehicle.isReturnToDepot()).thenReturn(true);
   
View Full Code Here

 
  @Test
  public void whenRouteIsOpen_itCalculatesCostUpToEnd_v2(){
    TourActivity prevAct = mock(TourActivity.class);
    when(prevAct.getLocationId()).thenReturn("i");
    End nextAct = End.newInstance("j", 0.0, 0.0);
    TourActivity newAct = mock(TourActivity.class);
    when(newAct.getLocationId()).thenReturn("k");
   
    when(vehicle.isReturnToDepot()).thenReturn(false);
   
View Full Code Here

TOP

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

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.