Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSCAR::PerformanceCriteria Class Reference
[PerformanceCriteria]

PerformanceCriteria should be used to select a solution from a set of options for a manipulator. More...

#include <PerformanceCriteria.h>

Inheritance diagram for OSCAR::PerformanceCriteria:

Inheritance graph
[legend]
List of all members.

Public Types

enum  NormalizeScheme {
  LocalUnit, GlobalUnit, LocalAvg, GlobalAvg,
  None
}

Public Methods

 PerformanceCriteria ()
 PerformanceCriteria (const PerformanceCriteria &crit)
PerformanceCriteria & operator= (const PerformanceCriteria &crit)
void SetDirection (MinOrMax minOrMax)
MinOrMax GetDirection () const
void SetCriticalLimit (double criticalLimit)
double GetCriticalLimit () const
void SetWeight (double weight)
double GetWeight () const
void SetExponent (double exponent)
double GetExponent () const
void SetNormalizeScheme (NormalizeScheme normalizeScheme=LocalUnit)
NormalizeScheme GetNormalizeScheme (void) const
void SetNormalizeValues (double min, double max, double avg)
void GetNormalizeValues (double &min, double &max, double &avg)
virtual CriteriaPropertiesRepository
const * 
CalculateProperties (RepositoryList &repoList)
virtual bool PickSolution (Vector &solution, RepositoryList &repoList)
unsigned int GetNumOfPickedSolution (void)
virtual ~PerformanceCriteria ()
virtual bool GetGradient (const Vector &joints, Vector &gradient)

Protected Methods

virtual CriteriaPropertiesRepository
const * 
calculateProperties (RepositoryList &repoList)
bool globalUnitNormalize (RepositoryList &repoList)
bool localUnitNormalize (RepositoryList &repoList)
bool localAvgNormalize (RepositoryList &repoList)
bool globalAvgNormalize (RepositoryList &repoList)
virtual bool computeCriteria (RepositoryList &repoList)=0

Protected Attributes

double weight
double criticalLimit
double exponent
double normalizeMin
double normalizeMax
double normalizeAvg
MinOrMax minOrMax
String criteriaName
NormalizeScheme normalizeScheme
CriteriaPropertiesRepositorycriteriaPropertiesPtr
unsigned int solutionNum

Detailed Description

Author:
Mark Tisius and Chetan Kapoor
PerformanceCriteria is setup to be as general as possible to allow many different redundancy resolution techniques. It has a criticalLimit argument that can be used to mark a solution valid or invalid such as in a pass/fail scheme. Also using PCFilter a sequential filters scheme can be easily setup. Different fusion techniques can also be implemented by setting the weights and exponents in the individual criteria and then placing them in PCFusion. All criteria derive from this class so it contains the functionality to check validity of solutions, get criteria values for solutions, normalize criteria values, and pick the best solution based upon what decision-making scheme is set.

Todo:
PerformanceCriteria, when sent a set of joint solutions created by IKJGenerateOptions, currently calculates the properties of all joint solutions, regardless of the joint solutions validity. This is an efficiency issue. Also, it is possible for PickSolution to pick an invalid solution. This needs to be changed.


Member Enumeration Documentation

enum OSCAR::PerformanceCriteria::NormalizeScheme
 

Enumeration values:
LocalUnit 
GlobalUnit 
LocalAvg 
GlobalAvg 
None 


Constructor & Destructor Documentation

OSCAR::PerformanceCriteria::PerformanceCriteria  
 

Constructor for PerformanceCriteria Use this constructor to create a PerformanceCriteria object. This constructor gives default values normalizeScheme (none), normalizeMin (1000000), normalizeMax (0), nomalizeAvg (1), weight (1), exponent (1), and criticalLimit (1). This is done to prevent problems in specific performance criteria that inherit from PerformanceCriteria.

OSCAR::PerformanceCriteria::PerformanceCriteria const PerformanceCriteria &    crit
 

Copy Constructor for PerformanceCriteria Use this to create a PerformanceCriteria object whose default are set via the constructor argument. Note: The pointer to the criteria properties repository is copied so both criteria will use the same repository.

Parameters:
crit A PerformanceCriteria object that is used to create the new object

virtual OSCAR::PerformanceCriteria::~PerformanceCriteria   [virtual]
 

Destructor for PerformanceCriteria.


Member Function Documentation

virtual CriteriaPropertiesRepository const* OSCAR::PerformanceCriteria::calculateProperties RepositoryList   repoList [protected, virtual]
 

Reimplemented in OSCAR::PCFusion.

virtual CriteriaPropertiesRepository const* OSCAR::PerformanceCriteria::CalculateProperties RepositoryList   repoList [virtual]
 

Gets the criteria properties for the entire solution set. Use this method to calculate the criteria properties for the solution set. Note: The validity is determined by the critical limit and the direction. If a local normalization scheme is chosen only valid solutions will be used to normalize. Global normalization is based on the values set by the user. GlobalUnit normalization values are updated if a valid solution has a greater/lower min/max. The nature of GlobalAvg does not allow automatic updates.

Returns:
CriteriaPropertiesRepository* Pointer to a properties repository where data for the criteria is stored.
Parameters:
repoList RepositoryList object that contains the solutions, information calculated by the criteria criteria, and the criteria values.
Exceptions:
noSolutionPassed Error if all solutions are invalid and a local normalization scheme is set.

Reimplemented in OSCAR::PCFilter, and OSCAR::PCFusion.

virtual bool OSCAR::PerformanceCriteria::computeCriteria RepositoryList   repoList [protected, pure virtual]
 

Implemented in OSCAR::PCAverageDistReciprocal, OSCAR::PCEEWrench, OSCAR::PCEEWrenchD1, OSCAR::PCJointTorque, OSCAR::PCLinkForce, OSCAR::PCSmallestMinDist, OSCAR::PCAccelerationLimitsAvoidance, OSCAR::PCDexterity, OSCAR::PCDirectionalEEFStiffness, OSCAR::PCEEFKineticEnergy, OSCAR::PCFilter, OSCAR::PCForceTransmissibility, OSCAR::PCFusion, OSCAR::PCGeneralizedDynamicEfficiency, OSCAR::PCGeneralizedInertialEfficiency, OSCAR::PCGeneralizedStiffness, OSCAR::PCGeneralizedTorqueMinimization, OSCAR::PCGeneralizedVelocityMinimization, OSCAR::PCInertialFrobeniusNorm, OSCAR::PCInverseMeasureOfTransmissibility, OSCAR::PCJacobianFrobeniusNorm, OSCAR::PCJointRangeAvailability, OSCAR::PCKineticEnergy, OSCAR::PCLoadTorqueMinimization, OSCAR::PCMagneticEEF, OSCAR::PCMeasureOfTransmissibility, OSCAR::PCPotentialEnergy, OSCAR::PCSingularityAvoidance, OSCAR::PCTorqueLimitsAvoidance, OSCAR::PCVelocityLimitsAvoidance, and OSCAR::PCVelocityTransmissibility.

double OSCAR::PerformanceCriteria::GetCriticalLimit   const
 

Gets the critical limit of the criteria. Use this method to get the critical limit of the PerformanceCriteria object. It will either be a maximum limit or a minimum limit depending on the optimization direction. It is also used to normalize the criteria value.

Returns:
double Value of the critical limit.

MinOrMax OSCAR::PerformanceCriteria::GetDirection   const
 

Gets the direction which the criteria is being optimized. Use this method to get the optimization direction for a PerformanceCriteria object.

Returns:
MinOrMax The optimzation direction, either Minimize or Maximize

double OSCAR::PerformanceCriteria::GetExponent   const
 

Gets the exponent of the criteria. Use this method to get the exponent of the PerformanceCriteria object. The exponent is used to keep criteria values low until the critical limit is being approached.

Returns:
double Exponent value

virtual bool OSCAR::PerformanceCriteria::GetGradient const Vector   joints,
Vector   gradient
[virtual]
 

Get the gradient of the performance criterion.

Parameters:
joints The current configuration at which the gradients will be determined.
gradients A vector containing the gradient upon return.
Returns:
True if successful. False if the criterion does not have a gradient.

Reimplemented in OSCAR::PCFusion, and OSCAR::PCJointRangeAvailability.

NormalizeScheme OSCAR::PerformanceCriteria::GetNormalizeScheme void    const
 

Get the normalization scheme for the criterion.

Returns:
NormalizeScheme Enum representing the type of normalization.

void OSCAR::PerformanceCriteria::GetNormalizeValues double &    min,
double &    max,
double &    avg
 

Gets the values used for global normalization.

Returns:
void
Parameters:
min The minimum criteria value. Gets updated during motion.
max The maximum criteria value. Gets updated during motion.
avg The average criteria value.

unsigned int OSCAR::PerformanceCriteria::GetNumOfPickedSolution void   
 

double OSCAR::PerformanceCriteria::GetWeight   const
 

Gets the weight of the criteria. Use this method to get the weight of the PerformanceCriteria object. The weight is used to rank importance when multiple criteria are used in a fusion object. Weight has no effect unless multiple criteria are utilized.

Returns:
double Value for the weight.

bool OSCAR::PerformanceCriteria::globalAvgNormalize RepositoryList   repoList [protected]
 

bool OSCAR::PerformanceCriteria::globalUnitNormalize RepositoryList   repoList [protected]
 

bool OSCAR::PerformanceCriteria::localAvgNormalize RepositoryList   repoList [protected]
 

bool OSCAR::PerformanceCriteria::localUnitNormalize RepositoryList   repoList [protected]
 

PerformanceCriteria& OSCAR::PerformanceCriteria::operator= const PerformanceCriteria &    crit
 

Copy operator for PerformanceCriteria Use this to copy one PerformanceCriteria object into another. Note: The pointer to the criteria properties repository is copied so both criteria will use the same repository.

Returns:
A reference to itself
Parameters:
crit A PerformanceCriteria object that is copied into the calling object.

virtual bool OSCAR::PerformanceCriteria::PickSolution Vector   solution,
RepositoryList   repoList
[virtual]
 

Picks the optimal solution based upon the decision method set by the operator.

Returns:
bool True if successful, False if no solution passes critical limit. The Vector solution parameter will not get overwritten. Call GetError for error information.
Parameters:
repoList RepositoryList object that contains the solutions, intermediate calculations, and the calculated criteria values.
bestSolution Vector containing the joint angles in radians of the optimal solution for the given criterion and direction.
Exceptions:
noSolutionPassed All solutions violated the critical limit set for the criteria. Try reseting the critical limit.

Reimplemented in OSCAR::PCFilter, and OSCAR::PCFusion.

void OSCAR::PerformanceCriteria::SetCriticalLimit double    criticalLimit
 

Set the critical limit for the criteria. Use this method to set the critical limit for a PerformanceCriteria object. It will either be a maximum limit or a minimum limit depending on the optimization direction. It is also used to normalize the criteria value if a fusion scheme is chosen. Set to -1 if limit checking is not desired.

Returns:
void
Parameters:
criticalLimit Value for the critical limit which also is the normalizing factor.

void OSCAR::PerformanceCriteria::SetDirection MinOrMax    minOrMax
 

Set the direction which the criteria should be optimized. Use this method to set the direction for opitimization of a PerformanceCriteria object.

Returns:
void
Parameters:
minOrMax The directions to optimize. Choose either Minimize if you want the criteria values minimized and Maximize if you want the criteria values maximized. This depends on each individual criteria formulation

void OSCAR::PerformanceCriteria::SetExponent double    exponent
 

Set the exponent for the criteria. Use this method to set the exponent for a PerformanceCriteria object. The exponent will be used to keep criteria values low until the critical limit is being approached.

Returns:
void
Parameters:
exponent Exponent value.

void OSCAR::PerformanceCriteria::SetNormalizeScheme NormalizeScheme    normalizeScheme = LocalUnit
 

Set the normalization scheme for the criterion. If this method is not called no normalization will occur. Use this method to set the normalization type for a PerformanceCriteria object. The different types are: LocalUnit-Normalizes between 0 and 1 based on the range of the solution set. Only solutions which do not violate the critical limit are used in normalization. GlobalUnit-Normalizes between 0 and 1 based on the range set by the user - call SetNormalizeValues to set these. Note: New min and max are set if a criteria value is found to be larger/smaller as long as it is valid. LocalAverage-Scales by the average of the solution set. Only solutions which are valid are used to compute the local average. GlobalAverage-Scales by the average set by the user - call SetNormalizeValues to set this value.

Returns:
void
Parameters:
normalizeScheme Enum used to specify the type of normalization scheme. The default is GlobalUnit.

void OSCAR::PerformanceCriteria::SetNormalizeValues double    min,
double    max,
double    avg
 

Set the values used for global normalization. Note: If GlobalUnit is set then avg will not be used, and for GlobalAvg min and max will not be used. Note: GlobalUnit will update these values during motion if different valid minimums or maximums are found.

Returns:
void
Parameters:
min The minimum criteria value.
max The maximum criteria value.
avg The average criteria value.

void OSCAR::PerformanceCriteria::SetWeight double    weight
 

Set the weight for the criteria. Use this method to set the weight for a PerformanceCriteria object. The weight will be used to rank importance when multiple criteria used in decision making. Weight has no effect unless multiple criteria are utilized.

Returns:
void
Parameters:
weight Value for the weight.


Member Data Documentation

String OSCAR::PerformanceCriteria::criteriaName [protected]
 

CriteriaPropertiesRepository* OSCAR::PerformanceCriteria::criteriaPropertiesPtr [protected]
 

double OSCAR::PerformanceCriteria::criticalLimit [protected]
 

double OSCAR::PerformanceCriteria::exponent [protected]
 

MinOrMax OSCAR::PerformanceCriteria::minOrMax [protected]
 

double OSCAR::PerformanceCriteria::normalizeAvg [protected]
 

double OSCAR::PerformanceCriteria::normalizeMax [protected]
 

double OSCAR::PerformanceCriteria::normalizeMin [protected]
 

NormalizeScheme OSCAR::PerformanceCriteria::normalizeScheme [protected]
 

unsigned int OSCAR::PerformanceCriteria::solutionNum [protected]
 

double OSCAR::PerformanceCriteria::weight [protected]
 


The documentation for this class was generated from the following file:
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations