Examples of JobInsertionContext


Examples of jsprit.core.problem.misc.JobInsertionContext

        assertEquals(60.,route.getEnd().getArrTime(),0.01);

        Service s4 = Service.Builder.newInstance("s4").setLocationId("40,0").build();
        PickupService serviceAct = new PickupService(s4);

        JobInsertionContext insertionContext = new JobInsertionContext(route,s4,v3,route.getDriver(),0.);

        HardActivityConstraint twConstraint = new VehicleDependentTimeWindowConstraints(stateManager,routingCosts);

        HardActivityConstraint.ConstraintsStatus status = twConstraint.fulfilled(insertionContext, route.getActivities().get(2), serviceAct, route.getEnd(), 30.);
        assertFalse(status.equals(HardActivityConstraint.ConstraintsStatus.FULFILLED));
View Full Code Here

Examples of jsprit.core.problem.misc.JobInsertionContext

        assertEquals(60.,route.getEnd().getArrTime(),0.01);

        Service s4 = Service.Builder.newInstance("s4").setLocationId("40,0").build();
        PickupService serviceAct = new PickupService(s4);

        JobInsertionContext insertionContext = new JobInsertionContext(route,s4,v4,route.getDriver(),0.);

        HardActivityConstraint twConstraint = new VehicleDependentTimeWindowConstraints(stateManager,routingCosts);

        HardActivityConstraint.ConstraintsStatus status = twConstraint.fulfilled(insertionContext, route.getActivities().get(2), serviceAct, route.getEnd(), 30.);
        assertFalse(status.equals(HardActivityConstraint.ConstraintsStatus.FULFILLED));
View Full Code Here

Examples of jsprit.core.problem.misc.JobInsertionContext

        assertEquals(60.,route.getEnd().getArrTime(),0.01);

        Service s4 = Service.Builder.newInstance("s4").setLocationId("40,0").build();
        PickupService serviceAct = new PickupService(s4);

        JobInsertionContext insertionContext = new JobInsertionContext(route,s4,v6,route.getDriver(),0.);

        HardActivityConstraint twConstraint = new VehicleDependentTimeWindowConstraints(stateManager,routingCosts);

        HardActivityConstraint.ConstraintsStatus status = twConstraint.fulfilled(insertionContext, route.getActivities().get(1), serviceAct, route.getActivities().get(2), 30.);
        assertFalse(status.equals(HardActivityConstraint.ConstraintsStatus.FULFILLED));
View Full Code Here

Examples of jsprit.core.problem.misc.JobInsertionContext

        assertEquals(60.,route.getEnd().getArrTime(),0.01);

        Service s4 = Service.Builder.newInstance("s4").setLocationId("40,0").build();
        PickupService serviceAct = new PickupService(s4);

        JobInsertionContext insertionContext = new JobInsertionContext(route,s4,v6,route.getDriver(),0.);

        HardActivityConstraint twConstraint = new VehicleDependentTimeWindowConstraints(stateManager,routingCosts);

        HardActivityConstraint.ConstraintsStatus status = twConstraint.fulfilled(insertionContext, route.getActivities().get(0), serviceAct, route.getActivities().get(1), 10.);
        assertFalse(status.equals(HardActivityConstraint.ConstraintsStatus.FULFILLED));
View Full Code Here

Examples of jsprit.core.problem.misc.JobInsertionContext

        assertEquals(60.,route.getEnd().getArrTime(),0.01);

        Service s4 = Service.Builder.newInstance("s4").setLocationId("40,0").build();
        PickupService serviceAct = new PickupService(s4);

        JobInsertionContext insertionContext = new JobInsertionContext(route,s4,v6,route.getDriver(),0.);

        HardActivityConstraint twConstraint = new VehicleDependentTimeWindowConstraints(stateManager,routingCosts);

        HardActivityConstraint.ConstraintsStatus status = twConstraint.fulfilled(insertionContext, route.getActivities().get(2), serviceAct, route.getEnd(), 30.);
        assertTrue(status.equals(HardActivityConstraint.ConstraintsStatus.FULFILLED));
View Full Code Here

Examples of jsprit.core.problem.misc.JobInsertionContext

        assertEquals(60.,route.getEnd().getArrTime(),0.01);

        Service s4 = Service.Builder.newInstance("s4").setLocationId("40,0").build();
        PickupService serviceAct = new PickupService(s4);

        JobInsertionContext insertionContext = new JobInsertionContext(route,s4,v5,route.getDriver(),60.);

        HardActivityConstraint twConstraint = new VehicleDependentTimeWindowConstraints(stateManager,routingCosts);

        HardActivityConstraint.ConstraintsStatus status = twConstraint.fulfilled(insertionContext, route.getActivities().get(2), serviceAct, route.getEnd(), 90.);
        assertFalse(status.equals(HardActivityConstraint.ConstraintsStatus.FULFILLED));
View Full Code Here

Examples of jsprit.core.problem.misc.JobInsertionContext

  @Override
  public InsertionData getInsertionData(final VehicleRoute currentRoute, final Job jobToInsert, final Vehicle newVehicle, double newVehicleDepartureTime, final Driver newDriver, final double best_known_insertion_costs) {
    if(jobToInsert == null) throw new IllegalStateException("job is null. cannot calculate the insertion of a null-job.");
    if(newVehicle == null || newVehicle instanceof NoVehicle) throw new IllegalStateException("no vehicle given. set para vehicle!");
   
    JobInsertionContext insertionContext = new JobInsertionContext(currentRoute, jobToInsert, newVehicle, newDriver, newVehicleDepartureTime);
    if(!hardRouteLevelConstraint.fulfilled(insertionContext)){
      return InsertionData.createEmptyInsertionData();
    }
   
    /**
 
View Full Code Here

Examples of jsprit.core.problem.misc.JobInsertionContext

        stateManager.informInsertionStarts(Arrays.asList(serviceRoute), Collections.<Job>emptyList());
        Service s = mock(Service.class);
        when(s.getSize()).thenReturn(Capacity.Builder.newInstance().addDimension(0,5).build());
        ServiceLoadRouteLevelConstraint loadconstraint = new ServiceLoadRouteLevelConstraint(stateManager);

        JobInsertionContext context = new JobInsertionContext(serviceRoute,s,serviceRoute.getVehicle(),null,0.);
        assertTrue(loadconstraint.fulfilled(context));
    }
View Full Code Here

Examples of jsprit.core.problem.misc.JobInsertionContext

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

        JobInsertionContext context = new JobInsertionContext(serviceRoute,s,serviceRoute.getVehicle(),null,0.);
        ServiceActivity newAct = mock(ServiceActivity.class);
        when(newAct.getSize()).thenReturn(newSize);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, serviceRoute.getStart(), newAct, serviceRoute.getActivities().get(0), 0.);
View Full Code Here

Examples of jsprit.core.problem.misc.JobInsertionContext

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

        JobInsertionContext context = new JobInsertionContext(serviceRoute,s,serviceRoute.getVehicle(),null,0.);
        ServiceActivity newAct = mock(ServiceActivity.class);
        when(newAct.getSize()).thenReturn(newSize);

        HardActivityConstraint.ConstraintsStatus status = loadConstraint.fulfilled(context, serviceRoute.getActivities().get(0), newAct, serviceRoute.getActivities().get(1), 0.);
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.