00001 /*************************************************************************** 00002 * Copyright (C) 2005-2011 LpzRobots development team * 00003 * Georg Martius <georg dot martius at web dot de> * 00004 * Frank Guettler <guettler at informatik dot uni-leipzig dot de * 00005 * Frank Hesse <frank at nld dot ds dot mpg dot de> * 00006 * Ralf Der <ralfder at mis dot mpg dot de> * 00007 * * 00008 * This program is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU General Public License as published by * 00010 * the Free Software Foundation; either version 2 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This program is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU General Public License * 00019 * along with this program; if not, write to the * 00020 * Free Software Foundation, Inc., * 00021 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00022 * * 00023 ***************************************************************************/ 00024 #ifndef _MEASUREMODES_H 00025 #define _MEASUREMODES_H 00026 00027 /** 00028 * usage of the statistictools with different measure modes (examples): 00029 * 00030 * adds following measure: the force of the nimm2, ID = the force itself, 00031 * 3 = has no effect? 00032 * stats->addMeasure(myNimm2->getForce(), "force", ID, 3); 00033 * 00034 * next: the average of the observed value (force), AVG = average, 00035 * 50 = average over 50 timesteps (stepspan=50) 00036 * stats->addMeasure(myNimm2->getForce(), "forceAvg50", AVG, 50); 00037 * 00038 * next: the medium of the oserved value (force), MED = medium, 00039 * 3 = medium over 3 timesteps (stepspan=3) 00040 * stats->addMeasure(myNimm2->getForce(), "forceMed3", MED, 3); 00041 * 00042 * next: the peak of the observed value above a given threshold 00043 * stats->addMeasure(myNimm2->getForce(), "forcePeak1", PEAK, 0, 1.0); 00044 * 00045 * 00046 */ 00047 00048 00049 /** measure modes of statistical types. If you add a measure mode, you have 00050 * naturally to implement this measuremode in statisticmeasure.cpp - 00051 * see method StatisticMeasure::step() ! 00052 */ 00053 enum MeasureMode { 00054 /// returns the value to observe itself 00055 ID, 00056 /// returns the average value 00057 AVG, 00058 /// returns the moving average value 00059 MOVAVG, 00060 /// returns the median value 00061 MED, 00062 /// returns the minimum value 00063 MIN, 00064 /// returns the maximum value 00065 MAX, 00066 /// returns only values above defined limit 00067 PEAK, 00068 /// returns the sum of the value generated over time (or stepSpan) 00069 SUM, 00070 /// returns 1 if convergence is reached, otherwise 0 00071 /// convergence criteria (epsilon) is given by addMeasure, the convergence 00072 /// is reached if value is falling below the criteria of the measure time (stepSpan) 00073 CONV, 00074 /// returns the difference between two successive steps 00075 STEPDIFF, 00076 /// returns the difference between two successive steps, normalized with number of steps 00077 NORMSTEPDIFF 00078 }; 00079 00080 #endif