Package jsprit.core.problem.misc

Examples of jsprit.core.problem.misc.JobInsertionContext


        Pickup s = mock(Pickup.class);
        Capacity newSize = Capacity.Builder.newInstance().addDimension(0, 5).build();
        when(s.getSize()).thenReturn(newSize);
        ServiceLoadActivityLevelConstraint loadConstraint = new ServiceLoadActivityLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(pickup_delivery_route,s,pickup_delivery_route.getVehicle(),null,0.);
        PickupService newAct = new PickupService(s);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, pickup_delivery_route.getActivities().get(0), newAct, pickup_delivery_route.getActivities().get(1), 0.);

        assertEquals(HardActivityConstraint.ConstraintsStatus.FULFILLED,status);
View Full Code Here


        Pickup s = mock(Pickup.class);
        Capacity newSize = Capacity.Builder.newInstance().addDimension(0, 10).build();
        when(s.getSize()).thenReturn(newSize);
        ServiceLoadActivityLevelConstraint loadConstraint = new ServiceLoadActivityLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(pickup_delivery_route,s,pickup_delivery_route.getVehicle(),null,0.);
        PickupService newAct = new PickupService(s);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, pickup_delivery_route.getActivities().get(1), newAct, pickup_delivery_route.getEnd(), 0.);

        assertEquals(HardActivityConstraint.ConstraintsStatus.FULFILLED,status);
View Full Code Here

        Pickup s = mock(Pickup.class);
        Capacity newSize = Capacity.Builder.newInstance().addDimension(0, 6).build();
        when(s.getSize()).thenReturn(newSize);
        ServiceLoadActivityLevelConstraint loadConstraint = new ServiceLoadActivityLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(pickup_delivery_route,s,pickup_delivery_route.getVehicle(),null,0.);
        PickupService newAct = new PickupService(s);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, pickup_delivery_route.getStart(), newAct, pickup_delivery_route.getActivities().get(0), 0.);

        assertEquals(HardActivityConstraint.ConstraintsStatus.NOT_FULFILLED,status);
View Full Code Here

        Pickup s = mock(Pickup.class);
        Capacity newSize = Capacity.Builder.newInstance().addDimension(0, 6).build();
        when(s.getSize()).thenReturn(newSize);
        ServiceLoadActivityLevelConstraint loadConstraint = new ServiceLoadActivityLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(pickup_delivery_route,s,pickup_delivery_route.getVehicle(),null,0.);
        PickupService newAct = new PickupService(s);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, pickup_delivery_route.getActivities().get(0), newAct, pickup_delivery_route.getActivities().get(1), 0.);

        assertEquals(HardActivityConstraint.ConstraintsStatus.NOT_FULFILLED,status);
View Full Code Here

        Pickup s = mock(Pickup.class);
        Capacity newSize = Capacity.Builder.newInstance().addDimension(0, 11).build();
        when(s.getSize()).thenReturn(newSize);
        ServiceLoadActivityLevelConstraint loadConstraint = new ServiceLoadActivityLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(pickup_delivery_route,s,pickup_delivery_route.getVehicle(),null,0.);
        PickupService newAct = new PickupService(s);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, pickup_delivery_route.getActivities().get(1), newAct, pickup_delivery_route.getEnd(), 0.);

        assertEquals(HardActivityConstraint.ConstraintsStatus.NOT_FULFILLED,status);
View Full Code Here

        Delivery s = mock(Delivery.class);
        Capacity newSize = Capacity.Builder.newInstance().addDimension(0, 15).build();
        when(s.getSize()).thenReturn(newSize);
        ServiceLoadActivityLevelConstraint loadConstraint = new ServiceLoadActivityLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(pickup_delivery_route,s,pickup_delivery_route.getVehicle(),null,0.);
        DeliverService newAct = new DeliverService(s);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, pickup_delivery_route.getStart(), newAct, pickup_delivery_route.getActivities().get(0), 0.);

        assertEquals(HardActivityConstraint.ConstraintsStatus.FULFILLED,status);
View Full Code Here

        Delivery s = mock(Delivery.class);
        Capacity newSize = Capacity.Builder.newInstance().addDimension(0, 16).build();
        when(s.getSize()).thenReturn(newSize);
        ServiceLoadActivityLevelConstraint loadConstraint = new ServiceLoadActivityLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(pickup_delivery_route,s,pickup_delivery_route.getVehicle(),null,0.);
        DeliverService newAct = new DeliverService(s);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, pickup_delivery_route.getStart(), newAct, pickup_delivery_route.getActivities().get(0), 0.);

        assertEquals(HardActivityConstraint.ConstraintsStatus.NOT_FULFILLED_BREAK,status);
View Full Code Here

        Delivery s = mock(Delivery.class);
        Capacity newSize = Capacity.Builder.newInstance().addDimension(0, 5).build();
        when(s.getSize()).thenReturn(newSize);
        ServiceLoadActivityLevelConstraint loadConstraint = new ServiceLoadActivityLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(pickup_delivery_route,s,pickup_delivery_route.getVehicle(),null,0.);
        DeliverService newAct = new DeliverService(s);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, pickup_delivery_route.getActivities().get(0), newAct, pickup_delivery_route.getActivities().get(1), 0.);

        assertEquals(HardActivityConstraint.ConstraintsStatus.FULFILLED,status);
View Full Code Here

        Delivery s = mock(Delivery.class);
        Capacity newSize = Capacity.Builder.newInstance().addDimension(0, 6).build();
        when(s.getSize()).thenReturn(newSize);
        ServiceLoadActivityLevelConstraint loadConstraint = new ServiceLoadActivityLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(pickup_delivery_route,s,pickup_delivery_route.getVehicle(),null,0.);
        DeliverService newAct = new DeliverService(s);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, pickup_delivery_route.getActivities().get(0), newAct, pickup_delivery_route.getActivities().get(1), 0.);

        assertEquals(HardActivityConstraint.ConstraintsStatus.NOT_FULFILLED_BREAK,status);
View Full Code Here

        Delivery s = mock(Delivery.class);
        Capacity newSize = Capacity.Builder.newInstance().addDimension(0, 5).build();
        when(s.getSize()).thenReturn(newSize);
        ServiceLoadActivityLevelConstraint loadConstraint = new ServiceLoadActivityLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(pickup_delivery_route,s,pickup_delivery_route.getVehicle(),null,0.);
        DeliverService newAct = new DeliverService(s);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, pickup_delivery_route.getActivities().get(1), newAct, pickup_delivery_route.getEnd(), 0.);

        assertEquals(HardActivityConstraint.ConstraintsStatus.FULFILLED,status);
View Full Code Here

TOP

Related Classes of jsprit.core.problem.misc.JobInsertionContext

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.