Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 54cac1c2268db633d66eeff1b4faa585 > files > 351

frepple-doc-0.8.1-3.fc15.noarch.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>C++ API frePPLe: module_forecast::ForecastSolver Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="../styles.css" rel="stylesheet"  type="text/css">
</head>
<body>
<div id="container">

<div id="menubar"> 
<div id="logo" align="center">
<br/><img src='../frepple.bmp' alt="frepple" /><br/>
<a href='http://www.frepple.com/'>
<strong>a Free<br/>Production Planning<br/>Library</strong>
</a>
</div>
<div id="menu">
<br/>
<h3><a href='../Main/HomePage.html'>Main</a></h3>
<h3><a href='../UI/Main.html'>User Manual</a></h3>
<h3><a href='../Tutorial/Main.html'>Tutorial</a></h3>
<h3><a href='../Frepple/Main.html'>Reference Manual</a></h3>
<h3><a href='../Main/FAQ.html'>FAQ</a></h3>
<h3><a href='index.html'>C++ API</a></h3>
<br/>
</div>  
</div>

<div id="content">
<br/>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="a00258.html">module_forecast</a>::<a class="el" href="a00075.html">ForecastSolver</a>
  </div>
</div>
<div class="contents">
<h1>module_forecast::ForecastSolver Class Reference</h1><!-- doxytag: class="module_forecast::ForecastSolver" --><!-- doxytag: inherits="frepple::Solver" -->
<p>Implementation of a forecast netting algorithm.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00204_source.html">forecast.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for module_forecast::ForecastSolver:</div>
<div class="dynsection">
<div class="center"><img src="a00683.png" border="0" usemap="#module__forecast_1_1_forecast_solver_inherit__map" alt="Inheritance graph"/></div>
<map name="module__forecast_1_1_forecast_solver_inherit__map" id="module__forecast_1_1_forecast_solver_inherit__map">
<area shape="rect" id="node2" href="a00171.html" title="This class is an implementation of the &quot;visitor&quot; design pattern. It is..." alt="" coords="248,238,349,266"/>
<area shape="rect" id="node4" href="a00085.html" title="frepple::utils::HasName\&lt; Solver \&gt;" alt="" coords="191,161,407,189"/>
<area shape="rect" id="node6" href="a00119.html" title="Class NonCopyable is a base class. Derive your own class from it when you want to..." alt="" coords="5,83,181,111"/>
<area shape="rect" id="node8" href="a00182.html" title="This class represents a node in the tree." alt="" coords="205,83,392,111"/>
<area shape="rect" id="node10" href="a00120.html" title="Object is the abstract base class for the main entities." alt="" coords="416,83,552,111"/>
<area shape="rect" id="node12" href="a00151.html" title="This is a base class for all Python extension types." alt="" coords="371,6,597,34"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00684.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><b>sorter</b></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html#a00a1cb8d4cc26b2225890a23ea253f15">callback</a> (<a class="el" href="a00051.html">Demand</a> *l, const <a class="el" href="a00257.html#aec6d4a238b0cd9ffc8be8f10fd9b652f">Signal</a> a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html#a1993b597690552b059baca93f0181f2b">ForecastSolver</a> (const string &amp;n)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html#ac70ccb97b7cd36e38711756128e7eaa7">getSize</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="a00115.html">MetaClass</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html#af578993f598ddfbcd14243a211347a75">getType</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html#ac3feb97e41920fc9f83dc436b2f7db21">solve</a> (void *v=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html#ae732b3df58aae09f8edf43409d288632">solve</a> (const <a class="el" href="a00051.html">Demand</a> *, void *=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html#abb0d7eac37463f328f3f6d87f95bcb06">writeElement</a> (<a class="el" href="a00189.html">XMLOutput</a> *, const <a class="el" href="a00096.html">Keyword</a> &amp;, <a class="el" href="a00257.html#a20c2c7e4c6b668e71c154ae3eb18f398">mode</a>=DEFAULT) const </td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html#a5fd4c59863d2941f85d4f23fe3446f07">initialize</a> ()</td></tr>
<tr><td colspan="2"><h2>Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="a00115.html">MetaClass</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html#a4927b0e91b356b353486a68be54411a0">metadata</a></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html#a389e65d6271cd01947baca4c83e8b809">Forecast</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Implementation of a forecast netting algorithm. </p>
<p>As customer orders are being received they need to be deducted from the forecast to avoid double-counting demand.</p>
<p>The netting solver will process each order as follows:</p>
<ul>
<li><b>First search for a matching forecast.</b><br/>
 A matching forecast has the same item and customer as the order.<br/>
 If no match is found at this level, a match is tried at higher levels of the customer and item.<br/>
 Ultimately a match is tried with a empty customer or item field.</li>
<li><b>Next, the remaining net quantity of the forecast is decreased.</b><br/>
 The forecast bucket to be reduced is the one where the order is due.<br/>
 If the net quantity is already completely depleted in that bucket the solver will look in earlier and later buckets. The parameters Net_Early and Net_Late control the limits for the search in the time dimension.</li>
</ul>
<p>The logging levels have the following meaning:</p>
<ul>
<li>0: Silent operation. Default logging level.</li>
<li>1: Log demands being netted and the matching forecast.</li>
<li>2: Same as 1, plus details on forecast buckets being netted. </li>
</ul>

<p>Definition at line <a class="el" href="a00204_source.html#l01255">1255</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1993b597690552b059baca93f0181f2b"></a><!-- doxytag: member="module_forecast::ForecastSolver::ForecastSolver" ref="a1993b597690552b059baca93f0181f2b" args="(const string &amp;n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">module_forecast::ForecastSolver::ForecastSolver </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>n</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructor. </p>

<p>Definition at line <a class="el" href="a00204_source.html#l01260">1260</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a00a1cb8d4cc26b2225890a23ea253f15"></a><!-- doxytag: member="module_forecast::ForecastSolver::callback" ref="a00a1cb8d4cc26b2225890a23ea253f15" args="(Demand *l, const Signal a)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool module_forecast::ForecastSolver::callback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00051.html">Demand</a> *&nbsp;</td>
          <td class="paramname"> <em>l</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00257.html#aec6d4a238b0cd9ffc8be8f10fd9b652f">Signal</a>&nbsp;</td>
          <td class="paramname"> <em>a</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Callback function, used for netting orders against the forecast. </p>

<p>Definition at line <a class="el" href="a00205_source.html#l00046">46</a> of file <a class="el" href="a00205_source.html">forecastsolver.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ac70ccb97b7cd36e38711756128e7eaa7"></a><!-- doxytag: member="module_forecast::ForecastSolver::getSize" ref="ac70ccb97b7cd36e38711756128e7eaa7" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t module_forecast::ForecastSolver::getSize </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the memory size of the object in bytes. </p>

<p>Implements <a class="el" href="a00120.html#ae381655a0e700d1e0d9ef72379792872">frepple::utils::Object</a>.</p>

<p>Definition at line <a class="el" href="a00204_source.html#l01274">1274</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p>

</div>
</div>
<a class="anchor" id="af578993f598ddfbcd14243a211347a75"></a><!-- doxytag: member="module_forecast::ForecastSolver::getType" ref="af578993f598ddfbcd14243a211347a75" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="a00115.html">MetaClass</a>&amp; module_forecast::ForecastSolver::getType </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This returns the type information on the object, a bit similar to the standard type_info information. </p>

<p>Reimplemented from <a class="el" href="a00171.html#aa616e2bc3ea78ac9fbf467544032fdc5">frepple::Solver</a>.</p>

<p>Definition at line <a class="el" href="a00204_source.html#l01272">1272</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5fd4c59863d2941f85d4f23fe3446f07"></a><!-- doxytag: member="module_forecast::ForecastSolver::initialize" ref="a5fd4c59863d2941f85d4f23fe3446f07" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int module_forecast::ForecastSolver::initialize </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented from <a class="el" href="a00171.html#a9410da1315fa0ea25e61b7e867c34bac">frepple::Solver</a>.</p>

<p>Definition at line <a class="el" href="a00205_source.html#l00035">35</a> of file <a class="el" href="a00205_source.html">forecastsolver.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ac3feb97e41920fc9f83dc436b2f7db21"></a><!-- doxytag: member="module_forecast::ForecastSolver::solve" ref="ac3feb97e41920fc9f83dc436b2f7db21" args="(void *v=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void module_forecast::ForecastSolver::solve </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>v</em> = <code>NULL</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This is the main solver method that will appropriately call the other solve methods.<br/>
 </p>

<p>Implements <a class="el" href="a00171.html#aa24859d5719ee02c89188323f9c47e56">frepple::Solver</a>.</p>

<p>Definition at line <a class="el" href="a00205_source.html#l00104">104</a> of file <a class="el" href="a00205_source.html">forecastsolver.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae732b3df58aae09f8edf43409d288632"></a><!-- doxytag: member="module_forecast::ForecastSolver::solve" ref="ae732b3df58aae09f8edf43409d288632" args="(const Demand *, void *=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void module_forecast::ForecastSolver::solve </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00051.html">Demand</a> *&nbsp;</td>
          <td class="paramname"> <em>l</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>v</em> = <code>NULL</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This method handles the search for a matching forecast, followed by decreasing the net forecast. </p>

<p>Reimplemented from <a class="el" href="a00171.html#a156a608f426159a7cda58117a713a66c">frepple::Solver</a>.</p>

<p>Definition at line <a class="el" href="a00205_source.html#l00075">75</a> of file <a class="el" href="a00205_source.html">forecastsolver.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="abb0d7eac37463f328f3f6d87f95bcb06"></a><!-- doxytag: member="module_forecast::ForecastSolver::writeElement" ref="abb0d7eac37463f328f3f6d87f95bcb06" args="(XMLOutput *, const Keyword &amp;, mode=DEFAULT) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void module_forecast::ForecastSolver::writeElement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00189.html">XMLOutput</a> *&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00096.html">Keyword</a> &amp;&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00257.html#a20c2c7e4c6b668e71c154ae3eb18f398">mode</a>&nbsp;</td>
          <td class="paramname"> = <code>DEFAULT</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Called while writing the model into an XML-file. The user class should write itself out, using the IOutStream members for its "simple" members and calling writeElement recursively for any contained objects. Not all classes are expected to implement this method. In instances of such a class can be created but can't be persisted. E.g. Command </p>

<p>Reimplemented from <a class="el" href="a00171.html#a710cb60097e6931be16ff0d842e1cb3b">frepple::Solver</a>.</p>

<p>Definition at line <a class="el" href="a00205_source.html#l00056">56</a> of file <a class="el" href="a00205_source.html">forecastsolver.cpp</a>.</p>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a389e65d6271cd01947baca4c83e8b809"></a><!-- doxytag: member="module_forecast::ForecastSolver::Forecast" ref="a389e65d6271cd01947baca4c83e8b809" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="a00072.html">Forecast</a><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="a00204_source.html#l01257">1257</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a4927b0e91b356b353486a68be54411a0"></a><!-- doxytag: member="module_forecast::ForecastSolver::metadata" ref="a4927b0e91b356b353486a68be54411a0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="a00115.html">MetaClass</a> * <a class="el" href="a00075.html#a4927b0e91b356b353486a68be54411a0">module_forecast::ForecastSolver::metadata</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented from <a class="el" href="a00171.html#a71e7d22ae04bc1aa927b489f1f022745">frepple::Solver</a>.</p>

<p>Definition at line <a class="el" href="a00204_source.html#l01273">1273</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a00204_source.html">forecast.h</a></li>
<li><a class="el" href="a00205_source.html">forecastsolver.cpp</a></li>
</ul>
</div>
<hr size="1"/><address style="align: right;"><small>Documentation generated for frePPLe by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"/></a></small></address>
</div>
</div>
</body>
</html>