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) |
GraspPlanningState * | stateNeighbor (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:
-
Definition at line 58 of file simAnn.h.
Constructor & Destructor Documentation
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] |
int SimAnn::getCurrentStep |
( |
|
) |
[inline] |
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] |
double SimAnn::neighborInverse |
( |
double |
T, |
|
|
double |
y | |
|
) |
| | [private] |
double SimAnn::prob |
( |
double |
e_old, |
|
|
double |
e_new, |
|
|
double |
t | |
|
) |
| | [private] |
Computes the neighbor of one individual variable.
Definition at line 240 of file simAnn.cpp.
void SimAnn::writeResults |
( |
bool |
w |
) |
|
Member Data Documentation
Starting step.
Definition at line 77 of file simAnn.h.
Starting temperatue.
Definition at line 75 of file simAnn.h.
Adjust raw errors reported by states to be in the relevant range of the annealing schedule.
Definition at line 73 of file simAnn.h.
Annealing constant for error acceptance schedule.
Definition at line 65 of file simAnn.h.
Number of dimensions for error acceptance schedule.
Definition at line 69 of file simAnn.h.
The current step index, used by annealing schedule.
Definition at line 80 of file simAnn.h.
For writing results to file.
Definition at line 89 of file simAnn.h.
The temperature at the beginning of the annealing process.
Definition at line 82 of file simAnn.h.
Total steps since last reset (saved over re-anneals).
Definition at line 85 of file simAnn.h.
For writing results to file.
Definition at line 87 of file simAnn.h.
Adjust factor for neighbor generation schedule.
Definition at line 71 of file simAnn.h.
Annealing constant for neighbor generation schedule.
Definition at line 63 of file simAnn.h.
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:
- /opt/ros/diamondback/stacks/graspit_simulator/graspit/graspit_source/include/EGPlanner/simAnn.h
- /opt/ros/diamondback/stacks/graspit_simulator/graspit/graspit_source/src/EGPlanner/simAnn.cpp