<!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::Forecast::DoubleExponential 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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="a00258.html">module_forecast</a>::<a class="el" href="a00072.html">Forecast</a>::<a class="el" href="a00055.html">DoubleExponential</a> </div> </div> <div class="contents"> <h1>module_forecast::Forecast::DoubleExponential Class Reference</h1><!-- doxytag: class="module_forecast::Forecast::DoubleExponential" --><!-- doxytag: inherits="module_forecast::Forecast::ForecastMethod" --> <p>A class to perform double exponential smoothing on a time series. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="a00204_source.html">forecast.h</a>></code></p> <div class="dynheader"> Inheritance diagram for module_forecast::Forecast::DoubleExponential:</div> <div class="dynsection"> <div class="center"><img src="a00671.png" border="0" usemap="#module__forecast_1_1_forecast_1_1_double_exponential_inherit__map" alt="Inheritance graph"/></div> <map name="module__forecast_1_1_forecast_1_1_double_exponential_inherit__map" id="module__forecast_1_1_forecast_1_1_double_exponential_inherit__map"> <area shape="rect" id="node2" href="a00074.html" title="Abstract base class for all forecasting methods." alt="" coords="12,6,289,34"/> </map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="a00672.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#a86cd527c2908e510cbe90882e1c91423">applyForecast</a> (<a class="el" href="a00072.html">Forecast</a> *, const <a class="el" href="a00049.html">Date</a>[], unsigned int, bool)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#a9d6762efdde2f96350517331e6a21333">DoubleExponential</a> (double a=initial_alfa, double g=initial_gamma)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#a2ab0d08f2c0b5e8c4a48396e4b26e93b">generateForecast</a> (<a class="el" href="a00072.html">Forecast</a> *fcst, const double history[], unsigned int count, const double weight[], bool debug)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#adc0a96c3fa752f116266db734103645d">getName</a> ()</td></tr> <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#a491fa0943f16b9d9930f7185777e39eb">setDampenTrend</a> (double x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#a495b0c6cdea8e2bf5eda9ec919b0e8dd">setInitialAlfa</a> (double x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#ad7177e03316e4ae1cb69ca7ee40c6712">setInitialGamma</a> (double x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#a07dc5259fbf42a0f888d8681102ec902">setMaxAlfa</a> (double x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#af9dc80722594981dabfd896faf24469d">setMaxGamma</a> (double x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#a3c97f4c059db62dcbf2b18078e2ffb4a">setMinAlfa</a> (double x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00055.html#a572637a743e1b3b662fa42422d230317">setMinGamma</a> (double x)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>A class to perform double exponential smoothing on a time series. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00433">433</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a9d6762efdde2f96350517331e6a21333"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::DoubleExponential" ref="a9d6762efdde2f96350517331e6a21333" args="(double a=initial_alfa, double g=initial_gamma)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">module_forecast::Forecast::DoubleExponential::DoubleExponential </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>a</em> = <code>initial_alfa</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>g</em> = <code>initial_gamma</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></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#l00487">487</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="a86cd527c2908e510cbe90882e1c91423"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::applyForecast" ref="a86cd527c2908e510cbe90882e1c91423" args="(Forecast *, const Date[], unsigned int, bool)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void module_forecast::Forecast::DoubleExponential::applyForecast </td> <td>(</td> <td class="paramtype"><a class="el" href="a00072.html">Forecast</a> * </td> <td class="paramname"> <em>forecast</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="a00049.html">Date</a> </td> <td class="paramname"> <em>buckets</em>[], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>bucketcount</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>debug</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p><a class="el" href="a00072.html" title="This class represents a bucketized demand signal.">Forecast</a> value updating. </p> <p>Implements <a class="el" href="a00074.html#a5b6313466ac20ca0e9a74139e868f04a">module_forecast::Forecast::ForecastMethod</a>.</p> <p>Definition at line <a class="el" href="a00251_source.html#l00451">451</a> of file <a class="el" href="a00251_source.html">timeseries.cpp</a>.</p> </div> </div> <a class="anchor" id="a2ab0d08f2c0b5e8c4a48396e4b26e93b"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::generateForecast" ref="a2ab0d08f2c0b5e8c4a48396e4b26e93b" args="(Forecast *fcst, const double history[], unsigned int count, const double weight[], bool debug)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double module_forecast::Forecast::DoubleExponential::generateForecast </td> <td>(</td> <td class="paramtype"><a class="el" href="a00072.html">Forecast</a> * </td> <td class="paramname"> <em>fcst</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const double </td> <td class="paramname"> <em>history</em>[], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const double </td> <td class="paramname"> <em>weight</em>[], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>debug</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p><a class="el" href="a00072.html" title="This class represents a bucketized demand signal.">Forecast</a> evaluation. </p> <p>Implements <a class="el" href="a00074.html#a72078544ba513ac4d9bae0ef64045480">module_forecast::Forecast::ForecastMethod</a>.</p> <p>Definition at line <a class="el" href="a00251_source.html#l00313">313</a> of file <a class="el" href="a00251_source.html">timeseries.cpp</a>.</p> </div> </div> <a class="anchor" id="adc0a96c3fa752f116266db734103645d"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::getName" ref="adc0a96c3fa752f116266db734103645d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string module_forecast::Forecast::DoubleExponential::getName </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>The name of the method. </p> <p>Implements <a class="el" href="a00074.html#a5dff95401a41f796fbc243f4996afd27">module_forecast::Forecast::ForecastMethod</a>.</p> <p>Definition at line <a class="el" href="a00204_source.html#l00559">559</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="a491fa0943f16b9d9930f7185777e39eb"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::setDampenTrend" ref="a491fa0943f16b9d9930f7185777e39eb" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::DoubleExponential::setDampenTrend </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Update the dampening factor for the trend. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00552">552</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="a495b0c6cdea8e2bf5eda9ec919b0e8dd"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::setInitialAlfa" ref="a495b0c6cdea8e2bf5eda9ec919b0e8dd" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::DoubleExponential::setInitialAlfa </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Update the initial value for the alfa parameter. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00498">498</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="ad7177e03316e4ae1cb69ca7ee40c6712"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::setInitialGamma" ref="ad7177e03316e4ae1cb69ca7ee40c6712" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::DoubleExponential::setInitialGamma </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Update the initial value for the alfa parameter.<br/> The default value is 0.05. <br/> Setting this parameter to too low a value can create false positives: the double exponential method is selected for a time series without a real trend. A single exponential is better for such cases. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00528">528</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="a07dc5259fbf42a0f888d8681102ec902"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::setMaxAlfa" ref="a07dc5259fbf42a0f888d8681102ec902" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::DoubleExponential::setMaxAlfa </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Update the maximum value for the alfa parameter. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00514">514</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="af9dc80722594981dabfd896faf24469d"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::setMaxGamma" ref="af9dc80722594981dabfd896faf24469d" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::DoubleExponential::setMaxGamma </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Update the maximum value for the alfa parameter. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00544">544</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="a3c97f4c059db62dcbf2b18078e2ffb4a"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::setMinAlfa" ref="a3c97f4c059db62dcbf2b18078e2ffb4a" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::DoubleExponential::setMinAlfa </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Update the minimum value for the alfa parameter. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00506">506</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="a572637a743e1b3b662fa42422d230317"></a><!-- doxytag: member="module_forecast::Forecast::DoubleExponential::setMinGamma" ref="a572637a743e1b3b662fa42422d230317" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::DoubleExponential::setMinGamma </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Update the minimum value for the alfa parameter. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00536">536</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="a00251_source.html">timeseries.cpp</a></li> </ul> </div> <hr size="1"/><address style="align: right;"><small>Documentation generated for frePPLe by <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>