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

Examples of jsprit.core.problem.solution.route.activity.TourActivities$ReverseActivityIterator


    /**
     * priority queue that stores insertion-data by insertion-costs in ascending order.
     */
    PriorityQueue<InsertionData> bestInsertionsQueue = new PriorityQueue<InsertionData>(Math.max(2, currentRoute.getTourActivities().getActivities().size()), getComparator());
   
    TourActivities tour = currentRoute.getTourActivities();
    double best_insertion_costs = best_known_insertion_costs;
    Service service = (Service)jobToInsert;

   
    /**
     * some inis
     */
    TourActivity serviceAct2Insert = activityFactory.createActivities(service).get(0);
    int best_insertion_index = InsertionData.NO_INDEX;
   
    initialiseStartAndEnd(newVehicle, newVehicleDepartureTime);
   
    TourActivity prevAct = start;
    int actIndex = 0;
    double sumOf_prevCosts_newVehicle = 0.0;
    double prevActDepTime_newVehicle = start.getEndTime();

        boolean loopBroken = false;
    /**
     * inserting serviceAct2Insert in route r={0,1,...,i-1,i,j,j+1,...,n(r),n(r)+1}
     * i=prevAct
     * j=nextAct
     * k=serviceAct2Insert
     */
    for(TourActivity nextAct : tour.getActivities()){
            ConstraintsStatus hardActivityConstraintsStatus = hardActivityLevelConstraint.fulfilled(insertionContext, prevAct, serviceAct2Insert, nextAct, prevActDepTime_newVehicle);
            if(hardActivityConstraintsStatus.equals(ConstraintsStatus.FULFILLED)){
                /**
                 * builds a path on this route forwardPath={i,k,j,j+1,j+2,...,j+nuOfActsForwardLooking}
                 */
 
View Full Code Here

TOP

Related Classes of jsprit.core.problem.solution.route.activity.TourActivities$ReverseActivityIterator

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.