Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package rinde.sim.pdptw.gendreau06;
  
  import java.util.Set;
  
 
 
The length of the scenario is a soft constraint. There is a pre defined length of the day (either 4 hours or 7.5 hours), vehicles are allowed to continue driving after the end of the day.

Once a vehicle is moving towards a Parcel it is obliged to service it. This means that diversion is not allowed.

Distance is expressed in km, time is expressed in ms (the original format is in seconds, however it allows fractions as such it was translated to ms), speed is expressed as km/h.

Author(s):
Rinde van Lon <rinde.vanlon@cs.kuleuven.be>
 
 public final class Gendreau06Scenario extends DynamicPDPTWScenario {
   private static final long serialVersionUID = 1386559671732721432L;
 
   private static final Point MIN = new Point(0, 0);
   private static final Point MAX = new Point(5, 5);
   private static final Measure<DoubleVelocityMAX_SPEED = Measure.valueOf(
       30d, .);
 
   private final long tickSize;
   private final GendreauProblemClass problemClass;
   private final int instanceNumber;
   private final boolean allowDiversion;
 
   Gendreau06Scenario(Collection<? extends TimedEventpEvents,
       Set<Enum<?>> pSupportedTypeslong tsGendreauProblemClass problemClass,
       int instanceNumberboolean diversion) {
     super(pEventspSupportedTypes);
      = ts;
     this. = problemClass;
     this. = instanceNumber;
      = diversion;
   }
 
   @Override
   public String toString() {
     return ToStringBuilder.reflectionToString(this,
         .);
   }
 
   @Override
   public TimeWindow getTimeWindow() {
     return .;
   }
 
   @Override
   public long getTickSize() {
     return ;
   }
 
   @Override
     return Specification.of(.)
         .and(.).build();
   }
 
   @Override
   public RoadModel createRoadModel() {
     return new PDPRoadModel(new PlaneRoadModel(getDistanceUnit(),
         ), );
   }
 
  public PDPModel createPDPModel() {
    return new DefaultPDPModel(new TardyAllowedPolicy());
  }
  public Unit<DurationgetTimeUnit() {
    return SI.MILLI(.);
  }
  public Unit<VelocitygetSpeedUnit() {
    return .;
  }
  public Unit<LengthgetDistanceUnit() {
    return .;
  }
    return ;
  }
    return Integer.toString();
  }
New to GrepCode? Check out our FAQ X