Package jsprit.core.problem.constraint

Examples of jsprit.core.problem.constraint.HardRouteConstraint


    /*
     * add a geographic constraint determining that vehicle1 cannot go to x>15 and vehicle2 cannot go to x<15
     *
     * switch off the geoConstraints to see the impact of this constraint on routes, or just exchange v1 and v2 to reverse the geo-constraint.
     */
        HardRouteConstraint geoClusterConstraint = new HardRouteConstraint() {

            @Override
            public boolean fulfilled(JobInsertionContext insertionContext) {
                Shipment shipment2insert = ((Shipment)insertionContext.getJob());
                if(insertionContext.getNewVehicle().getId().equals("v1")){
View Full Code Here


   
    /*
     *
     * wheelchair-bus can only pickup passenger where x<15
     */
    HardRouteConstraint wheelchair_bus_passenger_pickup_constraint = new HardRouteConstraint() {
     
      @Override
      public boolean fulfilled(JobInsertionContext insertionContext) {
        Shipment shipment2insert = ((Shipment)insertionContext.getJob());
        if(insertionContext.getNewVehicle().getId().equals("wheelchair_bus")){
View Full Code Here

TOP

Related Classes of jsprit.core.problem.constraint.HardRouteConstraint

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.