Changeset 1740 for branches/autoquest-core-tasktrees-alignment/src/main
- Timestamp:
- 09/11/14 15:51:54 (10 years ago)
- Location:
- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ObjectDistanceSubstitionMatrix.java
r1734 r1740 49 49 50 50 /** The calculate non task instances. */ 51 private boolean calculateNon TaskInstances = true;51 private boolean calculateNonEventTaskInstances = false; 52 52 53 53 /** The first round max index. */ … … 70 70 etisOfTasks = new HashMap<Integer, LinkedList<IEventTaskInstance>>(); 71 71 this.gapPenalty = gapPenalty; 72 this.calculateNon TaskInstances = calculateNonTaskInstances;72 this.calculateNonEventTaskInstances = calculateNonTaskInstances; 73 73 74 74 } … … 152 152 private float distanceBetweenTaskAndInstance(ITask task1, 153 153 IEventTaskInstance eti1) { 154 if (this.calculateNon TaskInstances) {154 if (this.calculateNonEventTaskInstances) { 155 155 float tmpDistance = 0; 156 // System.out.println(etisOfTasks); 157 final LinkedList<IEventTaskInstance> eventTaskInstances = etisOfTasks 158 .get(task1.getId()); 156 final EventTaskInstancesListGenerator etlg = new EventTaskInstancesListGenerator(); 157 task1.accept(etlg); 158 final LinkedList<IEventTaskInstance> eventTaskInstances = etlg 159 .getEventlist(); 160 159 161 for (final Iterator<IEventTaskInstance> it = eventTaskInstances 160 162 .iterator(); it.hasNext();) { … … 184 186 */ 185 187 private float distanceBetweenTasks(ITask task1, ITask task2) { 186 if (this.calculateNonTaskInstances) { 187 final LinkedList<IEventTaskInstance> eventTaskInstances = etisOfTasks 188 .get(task1.getId()); 188 if (this.calculateNonEventTaskInstances) { 189 final EventTaskInstancesListGenerator etlg = new EventTaskInstancesListGenerator(); 190 task1.accept(etlg); 191 final LinkedList<IEventTaskInstance> eventTaskInstances = etlg 192 .getEventlist(); 193 189 194 float tmpDistance = 0; 190 195 for (final Iterator<IEventTaskInstance> it = eventTaskInstances … … 206 211 public void generate(HashSet<ITask> uniqueTasks) { 207 212 this.uniqueTasks = uniqueTasks; 208 if (this.calculateNon TaskInstances) {213 if (this.calculateNonEventTaskInstances) { 209 214 matrix = new DynamicTriangleMatrix(uniqueTasks.size() + 1); 210 215 Console.traceln(Level.INFO, "searching EventTasks in Tasks"); 211 searchEventTaskInstances();216 //searchEventTaskInstances(); 212 217 } else { 213 218 matrix = new StaticTriangleMatrix(uniqueTasks.size() + 1); … … 295 300 || (taskId2 == Constants.UNMATCHED_SYMBOL)) { 296 301 return 0; 297 } else if ((this.calculateNon TaskInstances == false)302 } else if ((this.calculateNonEventTaskInstances == false) 298 303 && ((taskId1 > this.firstRoundMaxIndex) || (taskId2 > this.firstRoundMaxIndex))) { 299 304 return 0; … … 347 352 public void update(LinkedList<ITask> newTasks) { 348 353 349 if (this.calculateNon TaskInstances) {354 if (this.calculateNonEventTaskInstances) { 350 355 try { 351 356 matrix.increaseSize(newTasks.size()); … … 356 361 Console.logException(e); 357 362 } 358 this.updateEventTaskInstances(newTasks);363 //this.updateEventTaskInstances(newTasks); 359 364 for (final Iterator<ITask> it = newTasks.iterator(); it.hasNext();) { 360 365 final ITask task1 = it.next(); -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java
r1738 r1740 385 385 appData.getStopWatch().stop("whole loop"); 386 386 appData.getStopWatch().dumpStatistics(System.out); 387 new TaskTreeValidator().validate(appData.getSessions());388 387 appData.getStopWatch().reset(); 389 388 … … 401 400 RuleApplicationStatus.FINISHED); 402 401 } 403 402 new TaskTreeValidator().validate(appData.getSessions()); 404 403 return appData.getResult(); 405 404 } … … 534 533 final int from = i; 535 534 final int to = i + interval+offset-1; 536 Console.traceln(Level.FINE , "Aligning: Creating thread for sessions " + from + " till " + to);535 Console.traceln(Level.FINER, "Aligning: Creating thread for sessions " + from + " till " + to); 537 536 final ParallelPairwiseAligner aligner = new ParallelPairwiseAligner( 538 537 appData, from, to); … … 764 763 taskBuilder.addChild(selection, subsequence2); 765 764 taskBuilder.addChild(sequence, selection); 766 // TODO: We run nottill the end!765 // TODO: We may not run till the end! 767 766 while ((i < (first.length - 1)) && selectionfound) { 768 767 selectionfound = false; … … 1024 1023 int rest = matchSeqSize % newThreads; 1025 1024 final ExecutorService executor = Executors.newFixedThreadPool(nThreads); 1026 Console.traceln(Level.FINE , "Interval: " + interval + " Rest: " + rest);1025 Console.traceln(Level.FINER, "Interval: " + interval + " Rest: " + rest); 1027 1026 for (int i = 0; i <= (matchSeqSize-interval); i += interval) { 1028 1027 int offset = 0; … … 1101 1100 final int size = to - from; 1102 1101 1103 for (int i = from; i < to; i++) {1102 for (int i = from; i <= to; i++) { 1104 1103 final Match pattern = appData.getMatchseqs().get(i); 1105 1104 count++; … … 1174 1173 final int size = to - from; 1175 1174 1176 for (int i = from; i < to; i++) {1175 for (int i = from; i <= to; i++) { 1177 1176 final NumberSequence ns1 = appData.getNumberSequences().get(i); 1178 1177 count++; -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskTreeValidator.java
r1738 r1740 99 99 if (taskInstance.getTask() instanceof ISequence) { 100 100 ISequence task = (ISequence) taskInstance.getTask(); 101 System.out.println("Task: " + task);101 //System.out.println("Task: " + task); 102 102 String instance="\n"; 103 103 String model="\n";
Note: See TracChangeset
for help on using the changeset viewer.