org.decisiondeck.jmcda.services.sorting
Class SortingFull

java.lang.Object
  extended by org.decisiondeck.jmcda.services.sorting.SortingFull

public class SortingFull
extends Object


Constructor Summary
SortingFull()
           
 
Method Summary
 IOrderedAssignmentsToMultipleRead assign(SortingMode mode, ISortingPreferences problem)
           Computes the assignment of the real alternatives contained in the data, using the given given data, into the given categories.
 IOrderedAssignmentsToMultiple both(ISortingPreferences data)
           Computes the pessimistic and optimistic assignment of the real alternatives contained in the data, using the given data, into the given categories.
 Double getSmallestSep()
          Retrieves the smallest difference, in absolute value, between the majority threshold and any outranking value.
 double getTolerance()
           
 boolean isSharpVetoes()
           
 IOrderedAssignments optimistic(ISortingPreferences data)
           Computes the optimistic assignment of the real alternatives contained in the data, using the given data, into the given categories.
 IOrderedAssignments pessimistic(ISortingPreferences problem)
           Computes the pessimistic assignment of the real alternatives contained in the data, using the given data, into the given categories.
 Map<DecisionMaker,IOrderedAssignments> pessimisticAll(IGroupSortingPreferences problem, Map<DecisionMaker,Set<Alternative>> alternatives)
           
static void pessimisticInto(Map<DecisionMaker,Set<Alternative>> alternatives, IGroupSortingResults results)
           
 void setSharpVetoes(boolean sharpVetoes)
           
 void setTolerance(double tolerance)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortingFull

public SortingFull()
Method Detail

isSharpVetoes

public boolean isSharpVetoes()

setSharpVetoes

public void setSharpVetoes(boolean sharpVetoes)

optimistic

public IOrderedAssignments optimistic(ISortingPreferences data)
                               throws InvalidInputException

Computes the optimistic assignment of the real alternatives contained in the data, using the given data, into the given categories. Each alternative is assigned to the lowest category such that the alternative does not outrank the up profile corresponding to that category and the profile outranks the alternative.

For the input to be valid, the weights must be all provided, all evaluations must be provided, all criteria must have preference directions, the set of criteria on which thresholds are defined must be in the set of criteria, the preference threshold must be greater or equal to the indifference threshold for each criteria, the veto thresholds must be strictly greater than the preference threshold for each criteria. Missing thresholds are accepted. Categories must be complete.

Parameters:
data - not null.
Returns:
not null.
Throws:
InvalidInputException - if the input is not valid.

both

public IOrderedAssignmentsToMultiple both(ISortingPreferences data)
                                   throws InvalidInputException

Computes the pessimistic and optimistic assignment of the real alternatives contained in the data, using the given data, into the given categories. Each alternative is assigned to all categories between its pessimistic assignment and optimistic assignment.

For the input to be valid, the weights must be all provided, all evaluations must be provided, all criteria must have preference directions, the set of criteria on which thresholds are defined must be in the set of criteria, the preference threshold must be greater or equal to the indifference threshold for each criteria, the veto thresholds must be strictly greater than the preference threshold for each criteria. Missing thresholds are accepted. Categories must be complete.

Parameters:
data - not null.
Returns:
not null.
Throws:
InvalidInputException - if the input is not valid.

pessimistic

public IOrderedAssignments pessimistic(ISortingPreferences problem)
                                throws InvalidInputException

Computes the pessimistic assignment of the real alternatives contained in the data, using the given data, into the given categories. Each alternative is assigned to the highest category such that the alternative outranks the profile corresponding to that category.

For the input to be valid, the weights must be all provided, all evaluations must be provided, all criteria must have preference directions, the set of criteria on which thresholds are defined must be in the set of criteria, the preference threshold must be greater or equal to the indifference threshold for each criteria, the veto thresholds must be strictly greater than the preference threshold for each criteria. Missing thresholds are accepted. Categories must be complete.

Parameters:
problem - not null.
Returns:
not null.
Throws:
InvalidInputException - if the input is not valid.

assign

public IOrderedAssignmentsToMultipleRead assign(SortingMode mode,
                                                ISortingPreferences problem)
                                         throws InvalidInputException

Computes the assignment of the real alternatives contained in the data, using the given given data, into the given categories.

For the input to be valid, the weights must be all provided, all evaluations must be provided, all criteria must have preference directions, the set of criteria on which thresholds are defined must be in the set of criteria, the preference threshold must be greater or equal to the indifference threshold for each criteria, the veto thresholds must be strictly greater than the preference threshold for each criteria. Missing thresholds are accepted. Categories must be complete.

If the sorting mode is BOTH, the returned object implements IOrderedAssignmentsToMultiple, otherwise, it implements IOrderedAssignments.

Parameters:
mode - not null.
problem - not null.
Returns:
not null.
Throws:
InvalidInputException - if the input is not valid.

getSmallestSep

public Double getSmallestSep()
Retrieves the smallest difference, in absolute value, between the majority threshold and any outranking value. Useful for sensitivity analysis or to check for possible numerical errors. The number is positive or nul. It represents the largest quantity that may be added or substracted from the majority threshold without changing the outranking relation (and thus the sorting results).

Returns:
null if no sorting computation has been asked or no values were found when asked for one (because of an empty set of alternatives).

getTolerance

public double getTolerance()

setTolerance

public void setTolerance(double tolerance)

pessimisticInto

public static void pessimisticInto(Map<DecisionMaker,Set<Alternative>> alternatives,
                                   IGroupSortingResults results)
                            throws InvalidInputException
Throws:
InvalidInputException

pessimisticAll

public Map<DecisionMaker,IOrderedAssignments> pessimisticAll(IGroupSortingPreferences problem,
                                                             Map<DecisionMaker,Set<Alternative>> alternatives)
                                                      throws InvalidInputException
Throws:
InvalidInputException


Copyright © 2011. All Rights Reserved.