Examples of updateLoadStates()


Examples of jsprit.core.algorithm.state.StateManager.updateLoadStates()

     */
    StateManager stateManager = new StateManager(vrp);
    /*
     * tells stateManager to update load states
     */
    stateManager.updateLoadStates();
    /*
     * tells stateManager to update time-window states
     */
    stateManager.updateTimeWindowStates();
    /*
 
View Full Code Here

Examples of jsprit.core.algorithm.state.StateManager.updateLoadStates()

                return vrp.copyAndGetActivities(job);
            }
        };

    StateManager stateManager = new StateManager(vrp);
    stateManager.updateLoadStates();
   
    ConstraintManager constraintManager = new ConstraintManager(vrp,stateManager);
    constraintManager.addLoadConstraint();
    stateManager.informInsertionStarts(Arrays.asList(route), null);
   
View Full Code Here

Examples of jsprit.core.algorithm.state.StateManager.updateLoadStates()

        new VrpXMLReader(builder).read("src/test/resources/pdp.xml");

        VehicleRoutingProblem vrp = builder.build();

        final StateManager stateManager = new StateManager(vrp);
        stateManager.updateLoadStates();
//        stateManager.updateTimeWindowStates();
        stateManager.addStateUpdater(new UpdateVariableCosts(vrp.getActivityCosts(), vrp.getTransportCosts(), stateManager));

        ConstraintManager constraintManager = new ConstraintManager(vrp,stateManager);
//        constraintManager.addTimeWindowConstraint();
View Full Code Here

Examples of jsprit.core.algorithm.state.StateManager.updateLoadStates()

    VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
    new VrpXMLReader(builder).read("src/test/resources/vrpnc1-jsprit.xml");
    vrp = builder.build();
   
    final StateManager stateManager = new StateManager(vrp);
    stateManager.updateLoadStates();
    stateManager.updateTimeWindowStates();
    stateManager.addStateUpdater(new UpdateVariableCosts(vrp.getActivityCosts(), vrp.getTransportCosts(), stateManager));


    ConstraintManager cManager = new ConstraintManager(vrp, stateManager);
View Full Code Here

Examples of jsprit.core.algorithm.state.StateManager.updateLoadStates()

    Inserter inserter = new Inserter(new InsertionListeners(), vrp);
    inserter.insertJob(shipment, new InsertionData(0,0,0,vehicle,null), route);
    inserter.insertJob(shipment2, new InsertionData(0,1,2,vehicle,null), route);

        StateManager stateManager = new StateManager(vrp);
    stateManager.updateLoadStates();   
    stateManager.informInsertionStarts(Arrays.asList(route), null);
   
    ConstraintManager constraintManager = new ConstraintManager(vrp,stateManager);
    constraintManager.addConstraint(new PickupAndDeliverShipmentLoadActivityLevelConstraint(stateManager),Priority.CRITICAL);
    constraintManager.addConstraint(new ShipmentPickupsFirstConstraint(),Priority.CRITICAL);
View Full Code Here

Examples of jsprit.core.algorithm.state.StateManager.updateLoadStates()

   
    inserter.insertJob(shipment, new InsertionData(0,0,0,vehicle,null), route);
    inserter.insertJob(shipment2, new InsertionData(0,1,2,vehicle,null), route);

    StateManager stateManager = new StateManager(vrp);
    stateManager.updateLoadStates();
    stateManager.informInsertionStarts(Arrays.asList(route), null);

    ConstraintManager constraintManager = new ConstraintManager(vrp,stateManager);
    constraintManager.addLoadConstraint();
   
View Full Code Here

Examples of jsprit.core.algorithm.state.StateManager.updateLoadStates()

     */
    StateManager stateManager = new StateManager(vrp);
    /*
     * tells stateManager to update load states
     */
    stateManager.updateLoadStates();
    /*
     * tells stateManager to update time-window states
     */
    stateManager.updateTimeWindowStates();
    /*
 
View Full Code Here

Examples of jsprit.core.algorithm.state.StateManager.updateLoadStates()

        StateManager stateManager = new StateManager(bicycleMessengerProblem);
        //create state
        StateId latest_act_arrival_time_stateId = stateManager.createStateId("latest-act-arrival-time");
        //and make sure you update the activity-state "latest-activity-start-time" the way it is defined above
        stateManager.addStateUpdater(new UpdateLatestActivityStartTimes(latest_act_arrival_time_stateId, stateManager, routingCosts, nearestMessengers));
        stateManager.updateLoadStates();

        ConstraintManager constraintManager = new ConstraintManager(bicycleMessengerProblem,stateManager);
        constraintManager.addLoadConstraint();
        constraintManager.addConstraint(new ThreeTimesLessThanBestDirectRouteConstraint(latest_act_arrival_time_stateId,nearestMessengers,routingCosts,stateManager), ConstraintManager.Priority.CRITICAL);
        constraintManager.addConstraint(new IgnoreMessengerThatCanNeverMeetTimeRequirements(nearestMessengers, routingCosts));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.