SimAnn Class Reference

#include <simAnn.h>

List of all members.

Public Types

enum  Result { FAIL = 0, JUMP = 1, KEEP = 2 }
 

Possible return codes for an annealing step.

More...

Public Member Functions

int getCurrentStep ()
Result iterate (GraspPlanningState *currentState, SearchEnergy *energyCalculator, GraspPlanningState *targetState=NULL)
 The main interface to this class. Performs one annealing step.
void reset ()
void setParameters (AnnealingType type)
 SimAnn ()
void writeResults (bool w)
 ~SimAnn ()

Private Member Functions

double biasedNeighborDistribution (double T, double in, double conf)
 Generates neighbors according to a desired value, or "input", along each dimension.
double cooling (double t0, double c, int k, int d)
double neighborDistribution (double T)
double neighborInverse (double T, double y)
double prob (double e_old, double e_new, double t)
GraspPlanningStatestateNeighbor (GraspPlanningState *s, double T, GraspPlanningState *t=NULL)
 Computes a neighbor of a given HandObjectState.
void variableNeighbor (VariableSet *set, double T, VariableSet *target=NULL)
 Computes the neighbor of one individual variable.

Private Attributes

double DEF_K0
 Starting step.
double DEF_T0
 Starting temperatue.
double ERR_ADJ
 Adjust raw errors reported by states to be in the relevant range of the annealing schedule.
double HC
 Annealing constant for error acceptance schedule.
double HDIMS
 Number of dimensions for error acceptance schedule.
long int mCurrentStep
 The current step index, used by annealing schedule.
FILE * mFile
 For writing results to file.
double mT0
 The temperature at the beginning of the annealing process.
int mTotalSteps
 Total steps since last reset (saved over re-anneals).
bool mWriteResults
 For writing results to file.
double NBR_ADJ
 Adjust factor for neighbor generation schedule.
double YC
 Annealing constant for neighbor generation schedule.
double YDIMS
 Number of dimensions for neighbor generation schedule.

Detailed Description

This class performs simulated annealing on a collection of variables (a GraspPlanningState*). It has no idea of grasps, hands, etc. The cooling schedule is inspired from L. Ingber, "Very Fast Simulated Re-Annealing", J. Mathl. Comput. Modelling, vol. 12, no. 8, pp. 967–973, December 1989.

Definition at line 46 of file simAnn.h.


Member Enumeration Documentation

Possible return codes for an annealing step.

  • FAIL - no legal neighbor of the current state was found
  • KEEP - a legal neighbor was found, but the annealing procedure decided to keep the current state
  • JUMP - a jump was performed to a newly generated neighbor
Enumerator:
FAIL 
JUMP 
KEEP 

Definition at line 58 of file simAnn.h.


Constructor & Destructor Documentation

SimAnn::SimAnn (  ) 

Definition at line 38 of file simAnn.cpp.

SimAnn::~SimAnn (  ) 

Definition at line 51 of file simAnn.cpp.


Member Function Documentation

double SimAnn::biasedNeighborDistribution ( double  T,
double  in,
double  conf 
) [private]

Generates neighbors according to a desired value, or "input", along each dimension.

Definition at line 336 of file simAnn.cpp.

double SimAnn::cooling ( double  t0,
double  c,
int  k,
int  d 
) [private]

Definition at line 293 of file simAnn.cpp.

int SimAnn::getCurrentStep (  )  [inline]

Definition at line 110 of file simAnn.h.

SimAnn::Result SimAnn::iterate ( GraspPlanningState currentState,
SearchEnergy energyCalculator,
GraspPlanningState targetState = NULL 
)

The main interface to this class. Performs one annealing step.

The caller passes it a HandObjectState and a calculator that can be used to compute the quality (or in annealing terms "energy") of a HandObjectState. This function computes the next state in the annealing schedule.

See SimAnn::Result declaration for possible return values.

Definition at line 161 of file simAnn.cpp.

double SimAnn::neighborDistribution ( double  T  )  [private]

Definition at line 312 of file simAnn.cpp.

double SimAnn::neighborInverse ( double  T,
double  y 
) [private]

Definition at line 328 of file simAnn.cpp.

double SimAnn::prob ( double  e_old,
double  e_new,
double  t 
) [private]

Definition at line 305 of file simAnn.cpp.

void SimAnn::reset (  ) 

Definition at line 147 of file simAnn.cpp.

void SimAnn::setParameters ( AnnealingType  type  ) 

Definition at line 77 of file simAnn.cpp.

GraspPlanningState * SimAnn::stateNeighbor ( GraspPlanningState s,
double  T,
GraspPlanningState t = NULL 
) [private]

Computes a neighbor of a given HandObjectState.

Definition at line 226 of file simAnn.cpp.

void SimAnn::variableNeighbor ( VariableSet set,
double  T,
VariableSet target = NULL 
) [private]

Computes the neighbor of one individual variable.

Definition at line 240 of file simAnn.cpp.

void SimAnn::writeResults ( bool  w  ) 

Definition at line 57 of file simAnn.cpp.


Member Data Documentation

double SimAnn::DEF_K0 [private]

Starting step.

Definition at line 77 of file simAnn.h.

double SimAnn::DEF_T0 [private]

Starting temperatue.

Definition at line 75 of file simAnn.h.

double SimAnn::ERR_ADJ [private]

Adjust raw errors reported by states to be in the relevant range of the annealing schedule.

Definition at line 73 of file simAnn.h.

double SimAnn::HC [private]

Annealing constant for error acceptance schedule.

Definition at line 65 of file simAnn.h.

double SimAnn::HDIMS [private]

Number of dimensions for error acceptance schedule.

Definition at line 69 of file simAnn.h.

long int SimAnn::mCurrentStep [private]

The current step index, used by annealing schedule.

Definition at line 80 of file simAnn.h.

FILE* SimAnn::mFile [private]

For writing results to file.

Definition at line 89 of file simAnn.h.

double SimAnn::mT0 [private]

The temperature at the beginning of the annealing process.

Definition at line 82 of file simAnn.h.

int SimAnn::mTotalSteps [private]

Total steps since last reset (saved over re-anneals).

Definition at line 85 of file simAnn.h.

bool SimAnn::mWriteResults [private]

For writing results to file.

Definition at line 87 of file simAnn.h.

double SimAnn::NBR_ADJ [private]

Adjust factor for neighbor generation schedule.

Definition at line 71 of file simAnn.h.

double SimAnn::YC [private]

Annealing constant for neighbor generation schedule.

Definition at line 63 of file simAnn.h.

double SimAnn::YDIMS [private]

Number of dimensions for neighbor generation schedule.

Definition at line 67 of file simAnn.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


graspit
Author(s):
autogenerated on Wed Jan 25 11:00:24 2012