trips.add( new Trip( (Activity) planElements.get( originActivityIndex ),
plan.addActivity( act2 ); trips.add(new Trip(act1, Collections.<PlanElement>singletonList(leg1), act2)); plan.addActivity( act3 ); final Trip tripObject = new Trip( lastAct , trip , act3 ); trips.add( tripObject ); childrenSubtours.add( plan.addActivity( act4 ); trips.add(new Trip(lastAct, trip3, act4));
new Subtour( Arrays.asList( new Trip( act1 , trip1 , act2 ), new Trip( act2 , trip2 , act3 ), new Trip( act3 , trip3 , act4 ) ), true); final Subtour rootSubtour2 = new Subtour( Arrays.asList( new Trip( act4 , trip4 , act5 ), new Trip( act5 , trip5 , act6 ), new Trip( act6 , trip6 , act7 ), new Trip( act7 , trip7 , act8 )), true); new Subtour( Arrays.asList( new Trip( act5 , trip5 , act6 ), new Trip( act6 , trip6 , act7 )), true); childSubtour.parent = rootSubtour2;
new Subtour( Arrays.asList( new Trip( act1 , trip1 , act2 ), new Trip( act2 , trip2 , act3 ), new Trip( act3 , trip3 , act4 ), new Trip( act4 , trip4 , act5 ), new Trip( act5 , trip5 , act6 ) ), true); final Subtour childSubtour1 = new Subtour( Arrays.asList( new Trip( act2 , trip2 , act3 ) ), true); final Subtour childSubtour2 = new Subtour( Arrays.asList( new Trip( act4 , trip4 , act5 ) ), true); childSubtour1.parent = rootSubtour;
new Trip(home1, Collections.<PlanElement>singletonList(leg2), work), new Trip(work, Collections.<PlanElement>singletonList(leg3), home2), new Trip(home2, Collections.<PlanElement>singletonList(leg1), somewhereElse)), false); Subtour subtour2 = new Subtour(Arrays.asList( new Trip(home1, Collections.<PlanElement>singletonList(leg2), work), new Trip(work, Collections.<PlanElement>singletonList(leg3), home2)), true); subtour2.parent = subtour1; subtour1.children.add(subtour2);
Subtour subtour1 = new Subtour( Arrays.asList( new Trip(somewhereElse, Collections.<PlanElement>singletonList(leg1), home1), new Trip(home1, Collections.<PlanElement>singletonList(leg2), work), new Trip(work, Collections.<PlanElement>singletonList(leg3), home2)), false); Subtour subtour2 = new Subtour(Arrays.asList( new Trip(home1, Collections.<PlanElement>singletonList(leg2), work), new Trip(work, Collections.<PlanElement>singletonList(leg3), home2)), true); subtour2.parent = subtour1; subtour1.children.add(subtour2);