private Plan buildPlan2(){
  Plan plan=PopulationUtils.createPlan();
  Activity a=PopulationUtils.createActivityFromCoord("a",CoordUtils.createCoord(0.0,0.0));
  a.setEndTime(Time.parseTime("16:00:00"));
  plan.addActivity(a);
  plan.addLeg(PopulationUtils.createLeg("truck"));
  double travelTime=Time.parseTime("07:00:00");
  double distance=Math.round((travelTime * ChainChopper.AVERAGE_SPEED) / ChainChopper.CROWFLY_FACTOR);
  Activity b=PopulationUtils.createActivityFromCoord("b",CoordUtils.createCoord(distance,1.0));
  b.setMaximumDuration(Time.parseTime("02:00:00"));
  plan.addActivity(b);
  plan.addLeg(PopulationUtils.createLeg("truck"));
  Activity c=PopulationUtils.createActivityFromCoord("c",CoordUtils.createCoord(2 * distance,2.0));
  plan.addActivity(c);
  return plan;
}

private Plan buildPlan2 ( ) { Plan plan = PopulationUtils . createPlan ( ) ; Activity a = PopulationUtils . createActivityFromCoord ( "a" , CoordUtils . createCoord ( 0.0 , 0.0 ) ) ; a . setEndTime ( Time . parseTime ( "16:00:00" ) ) ; plan . addActivity ( a ) ; plan . addLeg ( PopulationUtils . createLeg ( "truck" ) ) ; double travelTime = Time . parseTime ( "07:00:00" ) ; double distance = Math . round ( ( travelTime * ChainChopper . AVERAGE_SPEED ) / ChainChopper . CROWFLY_FACTOR ) ; Activity b = PopulationUtils . createActivityFromCoord ( "b" , CoordUtils . createCoord ( distance , 1.0 ) ) ; b . setMaximumDuration ( Time . parseTime ( "02:00:00" ) ) ; plan . addActivity ( b ) ; plan . addLeg ( PopulationUtils . createLeg ( "truck" ) ) ; Activity c = PopulationUtils . createActivityFromCoord ( "c" , CoordUtils . createCoord ( 2 * distance , 2.0 ) ) ; plan . addActivity ( c ) ; return plan ; }
a test plan for which the 24 - hour cut is over an activity in the middle of the activity chain . | 16 : 00 23 : 00 - 01 : 00 a - - - - - - - > b - - - - - - - > c | 24 : 00
