Changeset 2166


Ignore:
Timestamp:
09/07/17 16:22:04 (7 years ago)
Author:
pharms
Message:
  • changes for first VR oriented usability evaluation
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  
    4343    @Override 
    4444    public String help() { 
    45         return "evaluateUsability <tasktree> {<maxCount>} {<evaluationResult>}"; 
     45        return "evaluateUsability <tasktree> {<maxCount>} {<evaluationResult>} {-mostRepresentativeTasksOnly}"; 
    4646    } 
    4747 
     
    5656        String evaluationResult = null; 
    5757        int maxCount = Integer.MAX_VALUE; 
     58        boolean onlyMostRepresentativeTasks = false; 
     59         
    5860        try { 
    5961            for (Object parameter : parameters) { 
    60                 if (tasktreeName == null) { 
     62                if ("-mostRepresentativeTasksOnly".equals(parameter)) { 
     63                    onlyMostRepresentativeTasks = true; 
     64                } 
     65                else if (tasktreeName == null) { 
    6166                    tasktreeName = (String) parameter; 
    6267                } 
     
    96101        ITaskModel taskTree = (ITaskModel) dataObject; 
    97102         
    98         UsabilityEvaluationResult result = 
    99             new UsabilityEvaluationManager().evaluateUsability(taskTree, maxCount); 
     103        UsabilityEvaluationResult result = new UsabilityEvaluationManager().evaluateUsability 
     104            (taskTree, maxCount, onlyMostRepresentativeTasks); 
    100105         
    101106        if (GlobalDataContainer.getInstance().addData(evaluationResult, result)) { 
  • trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/autoquest/commands/usability/CMDgetTaskModelCrossCoverage.java

    r2034 r2166  
    17691769            Set<ISequence> sequences = getSequences(comparedModel); 
    17701770            this.allSequencesOfComparedModel = sequences.size(); 
    1771             this.eventsCoveredBySequencesOfComparedModel = getEventsCoveredBySequences(sequences); 
     1771            this.eventsCoveredBySequencesOfComparedModel = 
     1772                TaskTreeUtils.getNoOfEventsCoveredBySequences(sequences); 
    17721773             
    17731774            this.allEventsOfComparedWithModel = getAllEvents(comparedWithModel); 
     
    17751776            this.allSequencesOfComparedWithModel = sequences.size(); 
    17761777            this.eventsCoveredBySequencesOfComparedWithModel = 
    1777                 getEventsCoveredBySequences(sequences); 
     1778                TaskTreeUtils.getNoOfEventsCoveredBySequences(sequences); 
    17781779        } 
    17791780 
     
    19461947             
    19471948            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); 
    19511953             
    19521954            int recalledActions = getRecalledActions(); 
     
    21182120         * 
    21192121         */ 
    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                         @Override 
    2127                         public void visit(IEventTaskInstance eventTaskInstance) { 
    2128                             events.add(eventTaskInstance); 
    2129                         } 
    2130                     }); 
    2131                 } 
    2132             } 
    2133              
    2134             return events.size(); 
    2135         } 
    2136  
    2137         /** 
    2138          * 
    2139          */ 
    21402122        private String formatPerc(int part, int of) { 
    21412123            return (100 * part / of) + "% (" + part + "/" + of + ")"; 
  • trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/autoquest/commands/usability/CMDtaskTreeStatistics.java

    r2032 r2166  
    149149            TaskTreeUtils.getMostProminentTasks(taskModel, taskModel.getTasks()); 
    150150         
    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); 
    156154         
    157155        Console.println(noOfSequences + " sequences cover " + 
     
    161159        Console.println(mostProminent.size() + " of " + noOfSequences + " sequences (" + 
    162160                        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) + ")"); 
    165163         
    166164        Console.println("CSV: " + tasktreeName + ";" + noOfEventTasks + ";" + noOfSequences + ";" + 
     
    170168                        mostProminent.size() + ";" + 
    171169                        formatPercent(mostProminent.size(), noOfSequences) + ";" + 
    172                         mpCoveredEvents.size() + ";" + 
    173                         formatPercent(mpCoveredEvents.size(), allEvents)); 
     170                        mpCoveredEvents + ";" + formatPercent(mpCoveredEvents, allEvents)); 
    174171    } 
    175172 
Note: See TracChangeset for help on using the changeset viewer.