Examples of TimeWindow


Examples of com.espertech.esper.collection.TimeWindow

        this.externallyTimedWindowViewFactory = externallyTimedWindowViewFactory;
        this.timestampExpression = timestampExpression;
        this.timestampExpressionEval = timestampExpressionEval;
        this.millisecondsBeforeExpiry = msecBeforeExpiry;
        this.viewUpdatedCollection = viewUpdatedCollection;
        this.timeWindow = new TimeWindow(agentInstanceViewFactoryContext.isRemoveStream());
        this.agentInstanceViewFactoryContext = agentInstanceViewFactoryContext;
    }
View Full Code Here

Examples of com.espertech.esper.collection.TimeWindow

        this.agentInstanceContext = agentInstanceContext;
        this.timeWindowViewFactory = timeWindowViewFactory;
        this.millisecondsBeforeExpiry = millisecondsBeforeExpiry;
        this.viewUpdatedCollection = viewUpdatedCollection;
        this.scheduleSlot = agentInstanceContext.getStatementContext().getScheduleBucket().allocateSlot();
        this.timeWindow = new TimeWindow(agentInstanceContext.isRemoveStream());

        ScheduleHandleCallback callback = new ScheduleHandleCallback() {
            public void scheduledTrigger(ExtensionServicesContext extensionServicesContext)
            {
                if (InstrumentationHelper.ENABLED) { InstrumentationHelper.get().qViewScheduledEval(TimeWindowView.this, TimeWindowView.this.timeWindowViewFactory.getViewName());}
View Full Code Here

Examples of com.espertech.esper.collection.TimeWindow

        this.agentInstanceContext = agentInstanceContext;
        this.timeWindowViewFactory = timeWindowViewFactory;
        this.millisecondsBeforeExpiry = millisecondsBeforeExpiry;
        this.viewUpdatedCollection = viewUpdatedCollection;
        this.scheduleSlot = agentInstanceContext.getStatementContext().getScheduleBucket().allocateSlot();
        this.timeWindow = new TimeWindow(agentInstanceContext.isRemoveStream());

        ScheduleHandleCallback callback = new ScheduleHandleCallback() {
            public void scheduledTrigger(ExtensionServicesContext extensionServicesContext)
            {
                TimeWindowView.this.expire();
View Full Code Here

Examples of com.espertech.esper.collection.TimeWindow

        this.externallyTimedWindowViewFactory = externallyTimedWindowViewFactory;
        this.timestampExpression = timestampExpression;
        this.timestampExpressionEval = timestampExpressionEval;
        this.millisecondsBeforeExpiry = msecBeforeExpiry;
        this.viewUpdatedCollection = viewUpdatedCollection;
        this.timeWindow = new TimeWindow(agentInstanceViewFactoryContext.isRemoveStream());
        this.agentInstanceViewFactoryContext = agentInstanceViewFactoryContext;
    }
View Full Code Here

Examples of jsprit.core.problem.solution.route.activity.TimeWindow

     
      //pickup-tw
      String pickupTWStart = shipmentConfig.getString("pickup.timeWindows.timeWindow(0).start");
      String pickupTWEnd = shipmentConfig.getString("pickup.timeWindows.timeWindow(0).end");
      if(pickupTWStart != null && pickupTWEnd != null){
        TimeWindow pickupTW = TimeWindow.newInstance(Double.parseDouble(pickupTWStart), Double.parseDouble(pickupTWEnd));
        builder.setPickupTimeWindow(pickupTW);
      }

      //delivery-locationId
      String deliveryLocationId = shipmentConfig.getString("delivery.locationId");
      if(deliveryLocationId != null){
        builder.setDeliveryLocationId(deliveryLocationId);
      }
     
      //delivery-coord
      Coordinate deliveryCoord = getCoord(shipmentConfig,"delivery.");
      if(deliveryCoord != null){
        builder.setDeliveryCoord(deliveryCoord);
        if(deliveryLocationId != null){
//          vrpBuilder.addLocation(deliveryLocationId,deliveryCoord);
        }
        else{
//          vrpBuilder.addLocation(deliveryCoord.toString(),deliveryCoord);
          builder.setDeliveryLocationId(deliveryCoord.toString());
        }
      }

      //delivery-serviceTime
      String deliveryServiceTime = shipmentConfig.getString("delivery.duration");
      if(deliveryServiceTime != null) builder.setDeliveryServiceTime(Double.parseDouble(deliveryServiceTime));
     
      //delivery-tw
      String delTWStart = shipmentConfig.getString("delivery.timeWindows.timeWindow(0).start");
      String delTWEnd = shipmentConfig.getString("delivery.timeWindows.timeWindow(0).end");
      if(delTWStart != null && delTWEnd != null){
        TimeWindow delTW = TimeWindow.newInstance(Double.parseDouble(delTWStart), Double.parseDouble(delTWEnd));
        builder.setDeliveryTimeWindow(delTW);
      }

            //read skills
            String skillString = shipmentConfig.getString("requiredSkills");
View Full Code Here

Examples of jsprit.core.problem.solution.route.activity.TimeWindow

@Ignore
public class TestDepartureTimeOpt {
 
  @Test
  public void whenSettingOneCustWithTWAnd_NO_DepTimeChoice_totalCostsShouldBe50(){
    TimeWindow timeWindow = TimeWindow.newInstance(40, 45);
    Service service = Service.Builder.newInstance("s").setLocationId("servLoc").setCoord(Coordinate.newInstance(0, 10)).setTimeWindow(timeWindow).build();
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setStartLocationId("vehLoc").setStartLocationCoordinate(Coordinate.newInstance(0, 0))
        .setType(VehicleTypeImpl.Builder.newInstance("vType").build()).build();
   
    Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
View Full Code Here

Examples of jsprit.core.problem.solution.route.activity.TimeWindow

   
  }
 
  @Test
  public void whenSettingOneCustWithTWAnd_NO_DepTimeChoice_depTimeShouldBe0(){
    TimeWindow timeWindow = TimeWindow.newInstance(40, 45);
    Service service = Service.Builder.newInstance("s").setLocationId("servLoc").setCoord(Coordinate.newInstance(0, 10)).setTimeWindow(timeWindow).build();
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setStartLocationId("vehLoc").setStartLocationCoordinate(Coordinate.newInstance(0, 0))
        .setType(VehicleTypeImpl.Builder.newInstance("vType").build()).build();
   
    Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
View Full Code Here

Examples of jsprit.core.problem.solution.route.activity.TimeWindow

   
  }
 
  @Test
  public void whenSettingOneCustWithTWAndDepTimeChoice_totalCostsShouldBe50(){
    TimeWindow timeWindow = TimeWindow.newInstance(40, 45);
    Service service = Service.Builder.newInstance("s").setLocationId("servLoc").setCoord(Coordinate.newInstance(0, 10)).setTimeWindow(timeWindow).build();
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setStartLocationId("vehLoc").setStartLocationCoordinate(Coordinate.newInstance(0, 0))
        .setType(VehicleTypeImpl.Builder.newInstance("vType").build()).build();
   
    Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
View Full Code Here

Examples of jsprit.core.problem.solution.route.activity.TimeWindow

   
  }
 
  @Test
  public void whenSettingOneCustWithTWAndDepTimeChoice_depTimeShouldBe0(){
    TimeWindow timeWindow = TimeWindow.newInstance(40, 45);
    Service service = Service.Builder.newInstance("s").setLocationId("servLoc").setCoord(Coordinate.newInstance(0, 10)).setTimeWindow(timeWindow).build();
    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setStartLocationId("vehLoc").setStartLocationCoordinate(Coordinate.newInstance(0, 0))
        .setType(VehicleTypeImpl.Builder.newInstance("vType").build()).build();
   
    Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
View Full Code Here

Examples of jsprit.core.problem.solution.route.activity.TimeWindow

   
  }
 
  @Test
  public void whenSettingTwoCustWithTWAndDepTimeChoice_totalCostsShouldBe50(){
    TimeWindow timeWindow = TimeWindow.newInstance(40, 45);
    Service service = Service.Builder.newInstance("s").setLocationId("servLoc").setCoord(Coordinate.newInstance(0, 10)).setTimeWindow(timeWindow).build();
   
    Service service2 = Service.Builder.newInstance("s2").setLocationId("servLoc2").setCoord(Coordinate.newInstance(0, 20)).
        setTimeWindow(TimeWindow.newInstance(30, 40)).build();
   
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.