Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > e7618febbb9cbed15bb79e326774c050 > files > 135

ompl-devel-0.9.5-1.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8"/>
<title>OMPL: src/ompl/tools/benchmark/Benchmark.h Source File</title>
<meta name="author" content="Ioan A. Șucan, Mark Moll, Lydia E. Kavraki">
<link rel="stylesheet" href="../css/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="../css/print.css" type="text/css" media="print">
<!--[if lt IE 7]>
<script type="text/javascript" src="../js/jquery/jquery.js"></script>
<script type="text/javascript" src="../js/jquery/jquery.dropdown.js"></script>
<![endif]-->
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-9156598-2']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search API');
--></script>
<div class="navigation" id="top">
  <div class="tabs" id="ompltitle">
    <ul class="tablist">
      <li>The Open Motion Planning Library</li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search API" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>

  <ul id="nav" class="dropdown">
    <li class="first"><a href="index.html">Home</a></li>
    <li><a href="download.html">Download</a></li>
    <li><a href="documentation.html">Documentation</a></li>
    <li><span class="dir">Code API</span>
      <ul>
        <li><a href="api_overview.html">API Overview</a></li>
        <li><a href="namespaces.html">Namespaces</a></li>
        <li><a href="annotated.html">Classes</a></li>
        <li><a href="files.html">Files</a></li>
        <li><a href="dirs.html">Directories</a></li>
      </ul>
    </li>
    <li><span class="dir">Community</span>
      <ul>
        <li><a href="developers.html">Developers</a></li>
        <li><a href="thirdparty.html">Contributions</a></li>
        <li><a href="education.html">Education</a></li>
        <li><a href="gallery.html">Gallery</a></li>
      </ul>
    </li>
    <li><span class="dir">About</span>
      <ul>
        <li><a href="license.html">License</a></li>
        <li><a href="citations.html">Citations</a></li>
        <li><a href="acknowledgements.html">Acknowledgments</a></li>
        <li><a href="contact.html">Contact Us</a></li>
      </ul>
    </li>
  </ul>
</div>

<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
  onmouseover="return searchBox.OnSearchSelectShow()"
  onmouseout="return searchBox.OnSearchSelectHide()"
  onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
  <iframe src="" frameborder="0"name="MSearchResults" id="MSearchResults"></iframe>
</div>

<div class="container">
  <div class="span-22 push-2 first last">
  <div>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_f5421e52a658cd938113ed6044324834.html">src</a>      </li>
      <li class="navelem"><a class="el" href="dir_ae92c2ff78847f0cb49b545f9089bbbc.html">ompl</a>      </li>
      <li class="navelem"><a class="el" href="dir_5e8650903f98ceacc72eaf4a07632c23.html">tools</a>      </li>
      <li class="navelem"><a class="el" href="dir_d20d0c1680ab4a8f976eb8b99870b40a.html">benchmark</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">Benchmark.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*********************************************************************</span>
<a name="l00002"></a>00002 <span class="comment">* Software License Agreement (BSD License)</span>
<a name="l00003"></a>00003 <span class="comment">*</span>
<a name="l00004"></a>00004 <span class="comment">*  Copyright (c) 2010, Rice University</span>
<a name="l00005"></a>00005 <span class="comment">*  All rights reserved.</span>
<a name="l00006"></a>00006 <span class="comment">*</span>
<a name="l00007"></a>00007 <span class="comment">*  Redistribution and use in source and binary forms, with or without</span>
<a name="l00008"></a>00008 <span class="comment">*  modification, are permitted provided that the following conditions</span>
<a name="l00009"></a>00009 <span class="comment">*  are met:</span>
<a name="l00010"></a>00010 <span class="comment">*</span>
<a name="l00011"></a>00011 <span class="comment">*   * Redistributions of source code must retain the above copyright</span>
<a name="l00012"></a>00012 <span class="comment">*     notice, this list of conditions and the following disclaimer.</span>
<a name="l00013"></a>00013 <span class="comment">*   * Redistributions in binary form must reproduce the above</span>
<a name="l00014"></a>00014 <span class="comment">*     copyright notice, this list of conditions and the following</span>
<a name="l00015"></a>00015 <span class="comment">*     disclaimer in the documentation and/or other materials provided</span>
<a name="l00016"></a>00016 <span class="comment">*     with the distribution.</span>
<a name="l00017"></a>00017 <span class="comment">*   * Neither the name of the Rice University nor the names of its</span>
<a name="l00018"></a>00018 <span class="comment">*     contributors may be used to endorse or promote products derived</span>
<a name="l00019"></a>00019 <span class="comment">*     from this software without specific prior written permission.</span>
<a name="l00020"></a>00020 <span class="comment">*</span>
<a name="l00021"></a>00021 <span class="comment">*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</span>
<a name="l00022"></a>00022 <span class="comment">*  &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span>
<a name="l00023"></a>00023 <span class="comment">*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS</span>
<a name="l00024"></a>00024 <span class="comment">*  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE</span>
<a name="l00025"></a>00025 <span class="comment">*  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,</span>
<a name="l00026"></a>00026 <span class="comment">*  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,</span>
<a name="l00027"></a>00027 <span class="comment">*  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span>
<a name="l00028"></a>00028 <span class="comment">*  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span>
<a name="l00029"></a>00029 <span class="comment">*  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span>
<a name="l00030"></a>00030 <span class="comment">*  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN</span>
<a name="l00031"></a>00031 <span class="comment">*  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span>
<a name="l00032"></a>00032 <span class="comment">*  POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00033"></a>00033 <span class="comment">*********************************************************************/</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="comment">/* Author: Ioan Sucan */</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="preprocessor">#ifndef OMPL_TOOLS_BENCHMARK_BENCHMARK_</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define OMPL_TOOLS_BENCHMARK_BENCHMARK_</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00040"></a>00040 <span class="preprocessor">#include &quot;ompl/geometric/SimpleSetup.h&quot;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &quot;ompl/control/SimpleSetup.h&quot;</span>
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">namespace </span>ompl
<a name="l00044"></a>00044 {
<a name="l00045"></a>00045 
<a name="l00047"></a><a class="code" href="classompl_1_1Benchmark.html">00047</a>     <span class="keyword">class </span><a class="code" href="classompl_1_1Benchmark.html" title="Benchmark a set of planners on a problem instance.">Benchmark</a>
<a name="l00048"></a>00048     {
<a name="l00049"></a>00049     <span class="keyword">public</span>:
<a name="l00050"></a>00050 
<a name="l00055"></a><a class="code" href="structompl_1_1Benchmark_1_1Status.html">00055</a>         <span class="keyword">struct </span><a class="code" href="structompl_1_1Benchmark_1_1Status.html" title="This structure contains information about the activity of a benchmark instance. If the instance is ru...">Status</a>
<a name="l00056"></a>00056         {
<a name="l00057"></a>00057             <a class="code" href="structompl_1_1Benchmark_1_1Status.html" title="This structure contains information about the activity of a benchmark instance. If the instance is ru...">Status</a>(<span class="keywordtype">void</span>)
<a name="l00058"></a>00058             {
<a name="l00059"></a>00059                 <a class="code" href="structompl_1_1Benchmark_1_1Status.html#a16a7e0cd6fe9c8ba1f83476c8dadc935" title="Flag indicating whether benchmarking is running.">running</a> = <span class="keyword">false</span>;
<a name="l00060"></a>00060                 <a class="code" href="structompl_1_1Benchmark_1_1Status.html#afba635c79593d3614aaa1ea2d07957a2" title="The number of the run currently being executed.">activeRun</a> = 0;
<a name="l00061"></a>00061                 <a class="code" href="structompl_1_1Benchmark_1_1Status.html#a7eda04e79317eab6821eb075d8706e77" title="Total progress (0 to 100)">progressPercentage</a> = 0.0;
<a name="l00062"></a>00062             }
<a name="l00063"></a>00063 
<a name="l00065"></a><a class="code" href="structompl_1_1Benchmark_1_1Status.html#a16a7e0cd6fe9c8ba1f83476c8dadc935">00065</a>             <span class="keywordtype">bool</span>         <a class="code" href="structompl_1_1Benchmark_1_1Status.html#a16a7e0cd6fe9c8ba1f83476c8dadc935" title="Flag indicating whether benchmarking is running.">running</a>;
<a name="l00066"></a>00066 
<a name="l00068"></a><a class="code" href="structompl_1_1Benchmark_1_1Status.html#a3502deae57beffd7aa12cee95b07b92c">00068</a>             std::string  <a class="code" href="structompl_1_1Benchmark_1_1Status.html#a3502deae57beffd7aa12cee95b07b92c" title="The name of the planner currently being tested.">activePlanner</a>;
<a name="l00069"></a>00069 
<a name="l00071"></a><a class="code" href="structompl_1_1Benchmark_1_1Status.html#afba635c79593d3614aaa1ea2d07957a2">00071</a>             <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structompl_1_1Benchmark_1_1Status.html#afba635c79593d3614aaa1ea2d07957a2" title="The number of the run currently being executed.">activeRun</a>;
<a name="l00072"></a>00072 
<a name="l00074"></a><a class="code" href="structompl_1_1Benchmark_1_1Status.html#a7eda04e79317eab6821eb075d8706e77">00074</a>             <span class="keywordtype">double</span>       <a class="code" href="structompl_1_1Benchmark_1_1Status.html#a7eda04e79317eab6821eb075d8706e77" title="Total progress (0 to 100)">progressPercentage</a>;
<a name="l00075"></a>00075         };
<a name="l00076"></a>00076 
<a name="l00079"></a><a class="code" href="classompl_1_1Benchmark.html#a5140cf758234fc69a8d9f828f5ef2e04">00079</a>         <span class="keyword">typedef</span> std::map&lt;std::string, std::string&gt; <a class="code" href="classompl_1_1Benchmark.html#a5140cf758234fc69a8d9f828f5ef2e04" title="The data collected from a run of a planner is stored as key-value pairs.">RunProperties</a>;
<a name="l00080"></a>00080 
<a name="l00082"></a><a class="code" href="classompl_1_1Benchmark.html#ae7070c3ab312a47276e2e45de7742cfa">00082</a>         <span class="keyword">typedef</span> boost::function1&lt;void, const base::PlannerPtr&amp;&gt; <a class="code" href="classompl_1_1Benchmark.html#ae7070c3ab312a47276e2e45de7742cfa" title="Signature of function that can be called before a planner execution is started.">PreSetupEvent</a>;
<a name="l00083"></a>00083 
<a name="l00085"></a><a class="code" href="classompl_1_1Benchmark.html#ab1a0f51e75e4fc432caad4849bf28026">00085</a>         <span class="keyword">typedef</span> boost::function2&lt;void, const base::PlannerPtr&amp;, RunProperties&amp;&gt; <a class="code" href="classompl_1_1Benchmark.html#ab1a0f51e75e4fc432caad4849bf28026" title="Signature of function that can be called after a planner execution is completed.">PostSetupEvent</a>;
<a name="l00086"></a>00086 
<a name="l00088"></a><a class="code" href="structompl_1_1Benchmark_1_1PlannerExperiment.html">00088</a>         <span class="keyword">struct </span><a class="code" href="structompl_1_1Benchmark_1_1PlannerExperiment.html" title="The data collected after running a planner multiple times.">PlannerExperiment</a>
<a name="l00089"></a>00089         {
<a name="l00091"></a><a class="code" href="structompl_1_1Benchmark_1_1PlannerExperiment.html#a679875c67875ef5fac4154dda2ca448e">00091</a>             std::string                <a class="code" href="structompl_1_1Benchmark_1_1PlannerExperiment.html#a679875c67875ef5fac4154dda2ca448e" title="The name of the planner.">name</a>;
<a name="l00092"></a>00092 
<a name="l00094"></a><a class="code" href="structompl_1_1Benchmark_1_1PlannerExperiment.html#a0a56a15644661cf88020a0b4d4e78fc4">00094</a>             std::vector&lt;RunProperties&gt; <a class="code" href="structompl_1_1Benchmark_1_1PlannerExperiment.html#a0a56a15644661cf88020a0b4d4e78fc4" title="Data collected for each run.">runs</a>;
<a name="l00095"></a>00095 
<a name="l00097"></a><a class="code" href="structompl_1_1Benchmark_1_1PlannerExperiment.html#ae56913480883ffc1292e0d2ce8a16403">00097</a>             <a class="code" href="classompl_1_1Benchmark.html#a5140cf758234fc69a8d9f828f5ef2e04" title="The data collected from a run of a planner is stored as key-value pairs.">RunProperties</a>              <a class="code" href="structompl_1_1Benchmark_1_1PlannerExperiment.html#ae56913480883ffc1292e0d2ce8a16403" title="Some common properties for all the runs.">common</a>;
<a name="l00098"></a>00098         };
<a name="l00099"></a>00099 
<a name="l00101"></a><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html">00101</a>         <span class="keyword">struct </span><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html" title="This structure holds experimental data for a set of planners.">CompleteExperiment</a>
<a name="l00102"></a>00102         {
<a name="l00104"></a><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#af259d4ec153ce9982713d81109e678ae">00104</a>             std::string                    <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#af259d4ec153ce9982713d81109e678ae" title="The name of the experiment.">name</a>;
<a name="l00105"></a>00105 
<a name="l00107"></a><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#a5857729d9d13aee0dc94953d4512a4ed">00107</a>             std::vector&lt;PlannerExperiment&gt; <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#a5857729d9d13aee0dc94953d4512a4ed" title="The collected experimental data; each element of the array (an experiment) corresponds to a planner...">planners</a>;
<a name="l00108"></a>00108 
<a name="l00110"></a><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#aa02186a75918287ddc6be7294f95b89e">00110</a>             <span class="keywordtype">double</span>                         <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#aa02186a75918287ddc6be7294f95b89e" title="The maximum allowed time for planner computation during the experiment (seconds)">maxTime</a>;
<a name="l00111"></a>00111 
<a name="l00113"></a><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#ac46037ec4d9200b679ca5a2318cca2cb">00113</a>             <span class="keywordtype">double</span>                         <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#ac46037ec4d9200b679ca5a2318cca2cb" title="The maximum allowed memory for planner computation during the experiment (MB)">maxMem</a>;
<a name="l00114"></a>00114 
<a name="l00116"></a><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#a0b157a32f7b3a2d1f06bab8e703f837c">00116</a>             <a class="code" href="namespaceompl_1_1time.html#a9f28e947d7e95cfa5f0790ccdb7f0953" title="Representation of a point in time.">time::point</a>                    <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#a0b157a32f7b3a2d1f06bab8e703f837c" title="The point in time when the experiment was started.">startTime</a>;
<a name="l00117"></a>00117 
<a name="l00119"></a><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#a9e0f5aba984640f904ecedc2802fba38">00119</a>             <span class="keywordtype">double</span>                         <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#a9e0f5aba984640f904ecedc2802fba38" title="The amount of time spent to collect the information in this structure (seconds)">totalDuration</a>;
<a name="l00120"></a>00120 
<a name="l00122"></a><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#a7a2cb466da0711deac5aebccaa2bad12">00122</a>             std::string                    <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#a7a2cb466da0711deac5aebccaa2bad12" title="The output of SimpleSetup::print() before the experiment was started.">setupInfo</a>;
<a name="l00123"></a>00123 
<a name="l00125"></a><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#aa5534125efb2a3a52d658b41aa732ecd">00125</a>             boost::uint32_t                <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#aa5534125efb2a3a52d658b41aa732ecd" title="The random seed that was used at the start of the benchmark program.">seed</a>;
<a name="l00126"></a>00126 
<a name="l00128"></a><a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#ad4f08327b24fbdb1171e4a07276e99b5">00128</a>             std::string                    <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#ad4f08327b24fbdb1171e4a07276e99b5" title="Hostname that identifies the machine the benchmark ran on.">host</a>;
<a name="l00129"></a>00129         };
<a name="l00130"></a>00130 
<a name="l00132"></a><a class="code" href="classompl_1_1Benchmark.html#a8fa4b606116d36a9fa190692b72b24fc">00132</a>         <a class="code" href="classompl_1_1Benchmark.html#a8fa4b606116d36a9fa190692b72b24fc" title="Constructor needs the SimpleSetup instance needed for planning. Optionally, the experiment name (name...">Benchmark</a>(<a class="code" href="classompl_1_1geometric_1_1SimpleSetup.html" title="Create the set of classes typically needed to solve a geometric problem.">geometric::SimpleSetup</a> &amp;setup, <span class="keyword">const</span> std::string &amp;name = std::string()) : <a class="code" href="classompl_1_1Benchmark.html#af0aeb774cdfa2cc94cefd6fc80923e5d" title="The instance of the problem to benchmark (if geometric planning)">gsetup_</a>(&amp;setup), <a class="code" href="classompl_1_1Benchmark.html#a180fc28e59e5247cb62d9291405fce0f" title="The instance of the problem to benchmark (if planning with controls)">csetup_</a>(NULL), <a class="code" href="classompl_1_1Benchmark.html#a739e8d29b9e507c96b91dfd234786389" title="Interface for console output.">msg_</a>(<span class="stringliteral">&quot;Benchmark&quot;</span>)
<a name="l00133"></a>00133         {
<a name="l00134"></a>00134             <a class="code" href="classompl_1_1Benchmark.html#a74dfbbcaad551d0b74096e80fd1b143c" title="The collected experimental data (for all planners)">exp_</a>.<a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#af259d4ec153ce9982713d81109e678ae" title="The name of the experiment.">name</a> = name;
<a name="l00135"></a>00135         }
<a name="l00136"></a>00136 
<a name="l00138"></a><a class="code" href="classompl_1_1Benchmark.html#a11749173c6c6ae3c05a004fcc787663a">00138</a>         <a class="code" href="classompl_1_1Benchmark.html#a8fa4b606116d36a9fa190692b72b24fc" title="Constructor needs the SimpleSetup instance needed for planning. Optionally, the experiment name (name...">Benchmark</a>(<a class="code" href="classompl_1_1control_1_1SimpleSetup.html" title="Create the set of classes typically needed to solve a control problem.">control::SimpleSetup</a> &amp;setup, <span class="keyword">const</span> std::string &amp;name = std::string()) : <a class="code" href="classompl_1_1Benchmark.html#af0aeb774cdfa2cc94cefd6fc80923e5d" title="The instance of the problem to benchmark (if geometric planning)">gsetup_</a>(NULL), <a class="code" href="classompl_1_1Benchmark.html#a180fc28e59e5247cb62d9291405fce0f" title="The instance of the problem to benchmark (if planning with controls)">csetup_</a>(&amp;setup), <a class="code" href="classompl_1_1Benchmark.html#a739e8d29b9e507c96b91dfd234786389" title="Interface for console output.">msg_</a>(<span class="stringliteral">&quot;Benchmark&quot;</span>)
<a name="l00139"></a>00139         {
<a name="l00140"></a>00140             <a class="code" href="classompl_1_1Benchmark.html#a74dfbbcaad551d0b74096e80fd1b143c" title="The collected experimental data (for all planners)">exp_</a>.<a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#af259d4ec153ce9982713d81109e678ae" title="The name of the experiment.">name</a> = name;
<a name="l00141"></a>00141         }
<a name="l00142"></a>00142 
<a name="l00143"></a>00143         <span class="keyword">virtual</span> ~<a class="code" href="classompl_1_1Benchmark.html" title="Benchmark a set of planners on a problem instance.">Benchmark</a>(<span class="keywordtype">void</span>)
<a name="l00144"></a>00144         {
<a name="l00145"></a>00145         }
<a name="l00146"></a>00146 
<a name="l00148"></a><a class="code" href="classompl_1_1Benchmark.html#a74762df36d3d4890361d850c74e82cca">00148</a>         <span class="keywordtype">void</span> <a class="code" href="classompl_1_1Benchmark.html#a74762df36d3d4890361d850c74e82cca" title="Set the name of the experiment.">setExperimentName</a>(<span class="keyword">const</span> std::string &amp;name)
<a name="l00149"></a>00149         {
<a name="l00150"></a>00150             <a class="code" href="classompl_1_1Benchmark.html#a74dfbbcaad551d0b74096e80fd1b143c" title="The collected experimental data (for all planners)">exp_</a>.<a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#af259d4ec153ce9982713d81109e678ae" title="The name of the experiment.">name</a> = name;
<a name="l00151"></a>00151         }
<a name="l00152"></a>00152 
<a name="l00154"></a><a class="code" href="classompl_1_1Benchmark.html#a8f6fe8d41acbb7e312525d4d2bcda362">00154</a>         <span class="keyword">const</span> std::string&amp; <a class="code" href="classompl_1_1Benchmark.html#a8f6fe8d41acbb7e312525d4d2bcda362" title="Get the name of the experiment.">getExperimentName</a>(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00155"></a>00155 <span class="keyword">        </span>{
<a name="l00156"></a>00156             <span class="keywordflow">return</span> <a class="code" href="classompl_1_1Benchmark.html#a74dfbbcaad551d0b74096e80fd1b143c" title="The collected experimental data (for all planners)">exp_</a>.<a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html#af259d4ec153ce9982713d81109e678ae" title="The name of the experiment.">name</a>;
<a name="l00157"></a>00157         }
<a name="l00158"></a>00158 
<a name="l00163"></a><a class="code" href="classompl_1_1Benchmark.html#a5941d80248cf78397aeacfa438c8756d">00163</a>         <span class="keywordtype">void</span> <a class="code" href="classompl_1_1Benchmark.html#a5941d80248cf78397aeacfa438c8756d" title="Set the planner to use. If the planner is not set, an attempt is made to use the planner allocator...">addPlanner</a>(<span class="keyword">const</span> <a class="code" href="classompl_1_1base_1_1PlannerPtr.html" title="A boost shared pointer wrapper for ompl::base::Planner.">base::PlannerPtr</a> &amp;planner)
<a name="l00164"></a>00164         {
<a name="l00165"></a>00165             <span class="keywordflow">if</span> (planner &amp;&amp; planner-&gt;getSpaceInformation().get() !=
<a name="l00166"></a>00166                 (<a class="code" href="classompl_1_1Benchmark.html#af0aeb774cdfa2cc94cefd6fc80923e5d" title="The instance of the problem to benchmark (if geometric planning)">gsetup_</a> ? <a class="code" href="classompl_1_1Benchmark.html#af0aeb774cdfa2cc94cefd6fc80923e5d" title="The instance of the problem to benchmark (if geometric planning)">gsetup_</a>-&gt;<a class="code" href="classompl_1_1geometric_1_1SimpleSetup.html#a1d971cd6f69b19d3bfc5d2e1e1ff2282" title="Get the current instance of the space information.">getSpaceInformation</a>().get() : <a class="code" href="classompl_1_1Benchmark.html#a180fc28e59e5247cb62d9291405fce0f" title="The instance of the problem to benchmark (if planning with controls)">csetup_</a>-&gt;<a class="code" href="classompl_1_1control_1_1SimpleSetup.html#ac992af52bc8e3e5548778f5359fe3875" title="Get the current instance of the space information.">getSpaceInformation</a>().get()))
<a name="l00167"></a>00167                 <span class="keywordflow">throw</span> <a class="code" href="classompl_1_1Exception.html" title="The exception type for ompl.">Exception</a>(<span class="stringliteral">&quot;Planner instance does not match space information&quot;</span>);
<a name="l00168"></a>00168             <a class="code" href="classompl_1_1Benchmark.html#a1f06e12a89c69c55407a46138ce79cfd" title="The set of planners to be tested.">planners_</a>.push_back(planner);
<a name="l00169"></a>00169         }
<a name="l00170"></a>00170 
<a name="l00174"></a><a class="code" href="classompl_1_1Benchmark.html#a9c60a7a327f621f7aeee8d6daff80203">00174</a>         <span class="keywordtype">void</span> <a class="code" href="classompl_1_1Benchmark.html#a9c60a7a327f621f7aeee8d6daff80203" title="Set the planner allocator to use. This is only used if no planner has been set. This is optional -- a...">addPlannerAllocator</a>(<span class="keyword">const</span> <a class="code" href="namespaceompl_1_1base.html#a52191d97eed3ef76517fd4f6f94d27a9" title="Definition of a function that can allocate a planner.">base::PlannerAllocator</a> &amp;pa)
<a name="l00175"></a>00175         {
<a name="l00176"></a>00176             <a class="code" href="classompl_1_1Benchmark.html#a1f06e12a89c69c55407a46138ce79cfd" title="The set of planners to be tested.">planners_</a>.push_back(pa(<a class="code" href="classompl_1_1Benchmark.html#af0aeb774cdfa2cc94cefd6fc80923e5d" title="The instance of the problem to benchmark (if geometric planning)">gsetup_</a> ? <a class="code" href="classompl_1_1Benchmark.html#af0aeb774cdfa2cc94cefd6fc80923e5d" title="The instance of the problem to benchmark (if geometric planning)">gsetup_</a>-&gt;<a class="code" href="classompl_1_1geometric_1_1SimpleSetup.html#a1d971cd6f69b19d3bfc5d2e1e1ff2282" title="Get the current instance of the space information.">getSpaceInformation</a>() : <a class="code" href="classompl_1_1Benchmark.html#a180fc28e59e5247cb62d9291405fce0f" title="The instance of the problem to benchmark (if planning with controls)">csetup_</a>-&gt;<a class="code" href="classompl_1_1control_1_1SimpleSetup.html#ac992af52bc8e3e5548778f5359fe3875" title="Get the current instance of the space information.">getSpaceInformation</a>()));
<a name="l00177"></a>00177         }
<a name="l00178"></a>00178 
<a name="l00180"></a><a class="code" href="classompl_1_1Benchmark.html#a2aa434d72e918e8ff9b5f695a25329a1">00180</a>         <span class="keywordtype">void</span> <a class="code" href="classompl_1_1Benchmark.html#a2aa434d72e918e8ff9b5f695a25329a1" title="Clear the set of planners to be benchmarked.">clearPlanners</a>(<span class="keywordtype">void</span>)
<a name="l00181"></a>00181         {
<a name="l00182"></a>00182             <a class="code" href="classompl_1_1Benchmark.html#a1f06e12a89c69c55407a46138ce79cfd" title="The set of planners to be tested.">planners_</a>.clear();
<a name="l00183"></a>00183         }
<a name="l00184"></a>00184 
<a name="l00186"></a><a class="code" href="classompl_1_1Benchmark.html#aa35638813ff8f0c83b2a531e597ab112">00186</a>         <span class="keywordtype">void</span> <a class="code" href="classompl_1_1Benchmark.html#aa35638813ff8f0c83b2a531e597ab112" title="Set the event to be called before the run of a planner.">setPreRunEvent</a>(<span class="keyword">const</span> <a class="code" href="classompl_1_1Benchmark.html#ae7070c3ab312a47276e2e45de7742cfa" title="Signature of function that can be called before a planner execution is started.">PreSetupEvent</a> &amp;event)
<a name="l00187"></a>00187         {
<a name="l00188"></a>00188             <a class="code" href="classompl_1_1Benchmark.html#a1e1c8420d53773e031891de335444ed8" title="Event to be called before the run of a planner.">preRun_</a> = event;
<a name="l00189"></a>00189         }
<a name="l00190"></a>00190 
<a name="l00192"></a><a class="code" href="classompl_1_1Benchmark.html#aa063218c2c1d129f340a4821f212f0d3">00192</a>         <span class="keywordtype">void</span> <a class="code" href="classompl_1_1Benchmark.html#aa063218c2c1d129f340a4821f212f0d3" title="Set the event to be called after the run of a planner.">setPostRunEvent</a>(<span class="keyword">const</span> <a class="code" href="classompl_1_1Benchmark.html#ab1a0f51e75e4fc432caad4849bf28026" title="Signature of function that can be called after a planner execution is completed.">PostSetupEvent</a> &amp;event)
<a name="l00193"></a>00193         {
<a name="l00194"></a>00194             <a class="code" href="classompl_1_1Benchmark.html#ad10b6e89ae578bbcb4fa8bcb6f8fc7dd" title="Event to be called after the run of a planner.">postRun_</a> = event;
<a name="l00195"></a>00195         }
<a name="l00196"></a>00196 
<a name="l00212"></a>00212         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classompl_1_1Benchmark.html#a14e970715817e989b272006274a07876" title="Benchmark the added planners on the defined problem. Repeated calls clear previously gathered data...">benchmark</a>(<span class="keywordtype">double</span> maxTime, <span class="keywordtype">double</span> maxMem, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> runCount, <span class="keywordtype">bool</span> displayProgress = <span class="keyword">false</span>);
<a name="l00213"></a>00213 
<a name="l00215"></a><a class="code" href="classompl_1_1Benchmark.html#abfddb519370491e6e2f95e74e9e1cfe1">00215</a>         <span class="keyword">const</span> <a class="code" href="structompl_1_1Benchmark_1_1Status.html" title="This structure contains information about the activity of a benchmark instance. If the instance is ru...">Status</a>&amp; <a class="code" href="classompl_1_1Benchmark.html#abfddb519370491e6e2f95e74e9e1cfe1" title="Get the status of the benchmarking code. This function can be called in a separate thread to check ho...">getStatus</a>(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00216"></a>00216 <span class="keyword">        </span>{
<a name="l00217"></a>00217             <span class="keywordflow">return</span> <a class="code" href="classompl_1_1Benchmark.html#aaa383cc7c3b0bfa7b2987edbfdd22c6c" title="The current status of this benchmarking instance.">status_</a>;
<a name="l00218"></a>00218         }
<a name="l00219"></a>00219 
<a name="l00224"></a><a class="code" href="classompl_1_1Benchmark.html#a2eae72e11ea4d0cc1ec11b3a4a04a8f6">00224</a>         <span class="keyword">const</span> <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html" title="This structure holds experimental data for a set of planners.">CompleteExperiment</a>&amp; <a class="code" href="classompl_1_1Benchmark.html#a2eae72e11ea4d0cc1ec11b3a4a04a8f6" title="Return all the experiment data that would be written to the results file. The data should not be chan...">getRecordedExperimentData</a>(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00225"></a>00225 <span class="keyword">        </span>{
<a name="l00226"></a>00226             <span class="keywordflow">return</span> <a class="code" href="classompl_1_1Benchmark.html#a74dfbbcaad551d0b74096e80fd1b143c" title="The collected experimental data (for all planners)">exp_</a>;
<a name="l00227"></a>00227         }
<a name="l00228"></a>00228 
<a name="l00230"></a>00230         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classompl_1_1Benchmark.html#abaf7d3138d919aa4592f46108f95f4d2" title="Save the results of the benchmark to a stream.">saveResultsToStream</a>(std::ostream &amp;out = std::cout) <span class="keyword">const</span>;
<a name="l00231"></a>00231 
<a name="l00233"></a>00233         <span class="keywordtype">bool</span> <a class="code" href="classompl_1_1Benchmark.html#a848349a734629a46cae8b425ea688018" title="Save the results of the benchmark to a file. The name of the file is the current date and time...">saveResultsToFile</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename) <span class="keyword">const</span>;
<a name="l00234"></a>00234 
<a name="l00236"></a>00236         <span class="keywordtype">bool</span> <a class="code" href="classompl_1_1Benchmark.html#a848349a734629a46cae8b425ea688018" title="Save the results of the benchmark to a file. The name of the file is the current date and time...">saveResultsToFile</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00237"></a>00237 
<a name="l00238"></a>00238     <span class="keyword">protected</span>:
<a name="l00239"></a>00239 
<a name="l00241"></a><a class="code" href="classompl_1_1Benchmark.html#af0aeb774cdfa2cc94cefd6fc80923e5d">00241</a>         <a class="code" href="classompl_1_1geometric_1_1SimpleSetup.html" title="Create the set of classes typically needed to solve a geometric problem.">geometric::SimpleSetup</a>       *<a class="code" href="classompl_1_1Benchmark.html#af0aeb774cdfa2cc94cefd6fc80923e5d" title="The instance of the problem to benchmark (if geometric planning)">gsetup_</a>;
<a name="l00242"></a>00242 
<a name="l00244"></a><a class="code" href="classompl_1_1Benchmark.html#a180fc28e59e5247cb62d9291405fce0f">00244</a>         <a class="code" href="classompl_1_1control_1_1SimpleSetup.html" title="Create the set of classes typically needed to solve a control problem.">control::SimpleSetup</a>         *<a class="code" href="classompl_1_1Benchmark.html#a180fc28e59e5247cb62d9291405fce0f" title="The instance of the problem to benchmark (if planning with controls)">csetup_</a>;
<a name="l00245"></a>00245 
<a name="l00247"></a><a class="code" href="classompl_1_1Benchmark.html#a1f06e12a89c69c55407a46138ce79cfd">00247</a>         std::vector&lt;base::PlannerPtr&gt; <a class="code" href="classompl_1_1Benchmark.html#a1f06e12a89c69c55407a46138ce79cfd" title="The set of planners to be tested.">planners_</a>;
<a name="l00248"></a>00248 
<a name="l00250"></a><a class="code" href="classompl_1_1Benchmark.html#a74dfbbcaad551d0b74096e80fd1b143c">00250</a>         <a class="code" href="structompl_1_1Benchmark_1_1CompleteExperiment.html" title="This structure holds experimental data for a set of planners.">CompleteExperiment</a>            <a class="code" href="classompl_1_1Benchmark.html#a74dfbbcaad551d0b74096e80fd1b143c" title="The collected experimental data (for all planners)">exp_</a>;
<a name="l00251"></a>00251 
<a name="l00253"></a><a class="code" href="classompl_1_1Benchmark.html#aaa383cc7c3b0bfa7b2987edbfdd22c6c">00253</a>         <a class="code" href="structompl_1_1Benchmark_1_1Status.html" title="This structure contains information about the activity of a benchmark instance. If the instance is ru...">Status</a>                        <a class="code" href="classompl_1_1Benchmark.html#aaa383cc7c3b0bfa7b2987edbfdd22c6c" title="The current status of this benchmarking instance.">status_</a>;
<a name="l00254"></a>00254 
<a name="l00256"></a><a class="code" href="classompl_1_1Benchmark.html#a1e1c8420d53773e031891de335444ed8">00256</a>         <a class="code" href="classompl_1_1Benchmark.html#ae7070c3ab312a47276e2e45de7742cfa" title="Signature of function that can be called before a planner execution is started.">PreSetupEvent</a>                 <a class="code" href="classompl_1_1Benchmark.html#a1e1c8420d53773e031891de335444ed8" title="Event to be called before the run of a planner.">preRun_</a>;
<a name="l00257"></a>00257 
<a name="l00259"></a><a class="code" href="classompl_1_1Benchmark.html#ad10b6e89ae578bbcb4fa8bcb6f8fc7dd">00259</a>         <a class="code" href="classompl_1_1Benchmark.html#ab1a0f51e75e4fc432caad4849bf28026" title="Signature of function that can be called after a planner execution is completed.">PostSetupEvent</a>                <a class="code" href="classompl_1_1Benchmark.html#ad10b6e89ae578bbcb4fa8bcb6f8fc7dd" title="Event to be called after the run of a planner.">postRun_</a>;
<a name="l00260"></a>00260 
<a name="l00262"></a><a class="code" href="classompl_1_1Benchmark.html#a739e8d29b9e507c96b91dfd234786389">00262</a>         <a class="code" href="classompl_1_1msg_1_1Interface.html" title="The piece of code that desires interaction with an action or an output handler should use an instance...">msg::Interface</a>                <a class="code" href="classompl_1_1Benchmark.html#a739e8d29b9e507c96b91dfd234786389" title="Interface for console output.">msg_</a>;
<a name="l00263"></a>00263 
<a name="l00264"></a>00264     };
<a name="l00265"></a>00265 
<a name="l00266"></a>00266 }
<a name="l00267"></a>00267 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div>

<div class="footer span-22 push-2 last">
  <a href="http://www.kavrakilab.org">Physical and Biological Computing Group</a> &bull;
  <a href="http://www.cs.rice.edu">Department of Computer Science</a> &bull;
  <a href="http://www.rice.edu">Rice University</a><br>
  <div class="gray">Generated on Sun Oct 9 2011 23:04:40 by&#160;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.7.4</div>
</div>
</div>
</body>
</html>