Changeset 2166 for trunk/autoquest-ui-core/src/main/java/de
- Timestamp:
- 09/07/17 16:22:04 (7 years ago)
- Location:
- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/autoquest/commands
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/autoquest/commands/usability/CMDevaluateUsability.java
r2045 r2166 43 43 @Override 44 44 public String help() { 45 return "evaluateUsability <tasktree> {<maxCount>} {<evaluationResult>} ";45 return "evaluateUsability <tasktree> {<maxCount>} {<evaluationResult>} {-mostRepresentativeTasksOnly}"; 46 46 } 47 47 … … 56 56 String evaluationResult = null; 57 57 int maxCount = Integer.MAX_VALUE; 58 boolean onlyMostRepresentativeTasks = false; 59 58 60 try { 59 61 for (Object parameter : parameters) { 60 if (tasktreeName == null) { 62 if ("-mostRepresentativeTasksOnly".equals(parameter)) { 63 onlyMostRepresentativeTasks = true; 64 } 65 else if (tasktreeName == null) { 61 66 tasktreeName = (String) parameter; 62 67 } … … 96 101 ITaskModel taskTree = (ITaskModel) dataObject; 97 102 98 UsabilityEvaluationResult result = 99 new UsabilityEvaluationManager().evaluateUsability(taskTree, maxCount);103 UsabilityEvaluationResult result = new UsabilityEvaluationManager().evaluateUsability 104 (taskTree, maxCount, onlyMostRepresentativeTasks); 100 105 101 106 if (GlobalDataContainer.getInstance().addData(evaluationResult, result)) { -
trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/autoquest/commands/usability/CMDgetTaskModelCrossCoverage.java
r2034 r2166 1769 1769 Set<ISequence> sequences = getSequences(comparedModel); 1770 1770 this.allSequencesOfComparedModel = sequences.size(); 1771 this.eventsCoveredBySequencesOfComparedModel = getEventsCoveredBySequences(sequences); 1771 this.eventsCoveredBySequencesOfComparedModel = 1772 TaskTreeUtils.getNoOfEventsCoveredBySequences(sequences); 1772 1773 1773 1774 this.allEventsOfComparedWithModel = getAllEvents(comparedWithModel); … … 1775 1776 this.allSequencesOfComparedWithModel = sequences.size(); 1776 1777 this.eventsCoveredBySequencesOfComparedWithModel = 1777 getEventsCoveredBySequences(sequences);1778 TaskTreeUtils.getNoOfEventsCoveredBySequences(sequences); 1778 1779 } 1779 1780 … … 1946 1947 1947 1948 int eventsCoveredByAllSequences = 1948 getEventsCoveredBySequences(sequenceCoverage.keySet()); 1949 1950 int eventsCoveredByMostProminent = getEventsCoveredBySequences(mostProminentSequences); 1949 TaskTreeUtils.getNoOfEventsCoveredBySequences(sequenceCoverage.keySet()); 1950 1951 int eventsCoveredByMostProminent = 1952 TaskTreeUtils.getNoOfEventsCoveredBySequences(mostProminentSequences); 1951 1953 1952 1954 int recalledActions = getRecalledActions(); … … 2118 2120 * 2119 2121 */ 2120 private int getEventsCoveredBySequences(Set<ISequence> sequences) {2121 final Set<IEventTaskInstance> events = new HashSet<>();2122 2123 for (ISequence task : sequences) {2124 for (ITaskInstance instance : task.getInstances()) {2125 instance.accept(new DefaultTaskInstanceTraversingVisitor() {2126 @Override2127 public void visit(IEventTaskInstance eventTaskInstance) {2128 events.add(eventTaskInstance);2129 }2130 });2131 }2132 }2133 2134 return events.size();2135 }2136 2137 /**2138 *2139 */2140 2122 private String formatPerc(int part, int of) { 2141 2123 return (100 * part / of) + "% (" + part + "/" + of + ")"; -
trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/autoquest/commands/usability/CMDtaskTreeStatistics.java
r2032 r2166 149 149 TaskTreeUtils.getMostProminentTasks(taskModel, taskModel.getTasks()); 150 150 151 Set<IEventTaskInstance> mpCoveredEvents = new HashSet<IEventTaskInstance>(); 152 153 for (ITask task : mostProminent) { 154 getCoveredEvents(task, mpCoveredEvents); 155 } 151 152 int mpCoveredEvents = 153 TaskTreeUtils.getNoOfEventsCoveredBySequences(mostProminent); 156 154 157 155 Console.println(noOfSequences + " sequences cover " + … … 161 159 Console.println(mostProminent.size() + " of " + noOfSequences + " sequences (" + 162 160 formatPercent(mostProminent.size(), noOfSequences) + ") cover " + 163 mpCoveredEvents .size()+ " of " + allEvents + " recorded events (" +164 formatPercent(mpCoveredEvents .size(), allEvents) + ")");161 mpCoveredEvents + " of " + allEvents + " recorded events (" + 162 formatPercent(mpCoveredEvents, allEvents) + ")"); 165 163 166 164 Console.println("CSV: " + tasktreeName + ";" + noOfEventTasks + ";" + noOfSequences + ";" + … … 170 168 mostProminent.size() + ";" + 171 169 formatPercent(mostProminent.size(), noOfSequences) + ";" + 172 mpCoveredEvents.size() + ";" + 173 formatPercent(mpCoveredEvents.size(), allEvents)); 170 mpCoveredEvents + ";" + formatPercent(mpCoveredEvents, allEvents)); 174 171 } 175 172
Note: See TracChangeset
for help on using the changeset viewer.