Sophie

Sophie

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

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>Frepple / Solver </title>
  <link rel='stylesheet' href='../styles.css' type='text/css' />
  <!--PageHeaderFmt-->  
</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='Main.html'>Reference Manual</a></h3>
<h3><a href='../Main/FAQ.html'>FAQ</a></h3>
<h3><a href='../reference/index.html'>C++ API</a></h3>
<br/><div>
</div>  
</div>
</div>

<div id="content">
<br/>
<!--PageText-->
<div id='wikitext'>
<p><a class='wikilink' href='../Main/HomePage.html'>Main</a> &gt; <span class='wikitrail'><a class='wikilink' href='Main.html'>Reference Manual</a> > <a class='wikilink' href='Modeling.html'>Modeling</a> > <a class='selflink' href='ModelingSolver.html'>Solver</a></span>
</p>
<p class='vspace'>A solver represents modules of functionality that manipulate the model.<br />Examples are solvers to generate a plan, solvers to compute safety stocks, solvers to create production or purchase orders, etc...
</p>
<p class='vspace'>Only one solver is included in the core library: <a href='ModelingSolver.html#SOLVER_MRP'>solver_mrp</a>, which uses a heuristic algorithm to generate plans.<br />Other solvers are implemented as optional modules.
</p>
<p class='vspace'>For running a solver see the command command_solve.
</p>
<div class='vspace'></div><h2>Fields and methods</h2>
<table border='1' width="100%" ><tr><td width='20%'  valign='top'><strong>Field</strong>
</td><td width='20%'  valign='top'><strong>Type</strong>
</td><td width='60%'  valign='top'><strong>Description</strong>
</td></tr><tr><td  valign='top'>name
</td><td  valign='top'>non-empty string
</td><td  valign='top'>
<p>Name of the solver.<br />This is the key field and a required attribute.
</p></td></tr><tr><td  valign='top'>loglevel
</td><td  valign='top'>0 - 3
</td><td  valign='top'>
<p>Amount of logging and debugging messages:
</p><ul><li>0: Silent operation. Default logging level.
</li><li>1: Show minimum output.
</li><li>2: Show standard output.
</li><li>3: Show debugging output.
</li></ul></td></tr><tr><td  valign='top'>action
</td><td  valign='top'>A<br />C<br />AC (default)<br />R
</td><td  valign='top'>
<p>Type of action to be executed:
</p><ul><li>A: Add an new entity, and report an error if the entity already exists.
</li><li>C: Change an existing entity, and report an error if the entity doesn't exist yet.
</li><li>AC: Change an entity or create a new one if it doesn't exist yet.
</li><li>R: Remove an entity, and report an error if the entity doesn't exist.
</li></ul></td></tr></table>
<div class='vspace'></div>
<table border='1' width='100%' ><tr><td width='30%'  valign='top'><strong>Method</strong>
</td><td width='70%'  valign='top'><strong>Description</strong>
</td></tr><tr><td  valign='top'>solve()
</td><td  valign='top'>
<p>This method runs the solver algorithm.
</p></td></tr></table>
<p class='vspace'><a name='SOLVER_MRP' id='SOLVER_MRP'></a>
</p><h2>solver_mrp</h2>
<table border='1' width="100%" ><tr><td width='20%'  valign='top'><strong>Field</strong>
</td><td width='20%'  valign='top'><strong>Type</strong>
</td><td width='60%'  valign='top'><strong>Description</strong>
</td></tr><tr><td  valign='top'>plantype
</td><td  valign='top'>unsignedShort
</td><td  valign='top'>The type of plan being generated:
<ul><li>1: Constrained plan.<br />  This plan doesn't not violate any constraints.<br />  In case of material or capacity shortages the demand is delayed or planned short.
</li><li>2: Unconstrained plan with alternate search.<br />  This unconstrained plan leaves material, capacity and operation problems when shortages are found. Availability is searched across alternates and the remaining shortage is shown in the primary alternate.<br />  The demand is always fully met on time.
</li><li>3: Unconstrained plan without alternate search.<br />  This unconstrained plan leaves material, capacity and operation problems when shortages are found. It doesn't evaluate availability on alternates.<br />  The demand is always fully met on time.
</li></ul></td></tr><tr><td  valign='top'>constraints
</td><td  valign='top'>unsignedShort
</td><td  valign='top'>
<p>Sum up the values of the constraints you want to enable in the solver:
</p><ul><li>1: Lead times, ie don't plan in the past
</li><li>2: Material supply, ie don't allow inventory values to go negative
</li><li>4: Capacity, ie don't allow to overload resources
</li><li>8: Operation fences, ie don't allow to create plans in the frozen fence of operations
</li></ul><p>The default value is 15, ie all constraints are enabled.
</p></td></tr><tr><td  valign='top'>maxparallel
</td><td  valign='top'>positive integer
</td><td  valign='top'>
<p>Specifies the number of parallel threads the solver creates during planning.<br />The default value depends on whether the solver is run in verbose mode or not:
</p><ul><li>In normal mode the solver uses as many threads as specified by the NUMBER_OF_PROCESSORS environment variable.
</li><li>When the logging level is different from 0 the solver runs in a single thread to avoid mangling the debugging output of different threads.
</li></ul></td></tr><tr><td  valign='top'>autocommit
</td><td  valign='top'>boolean
</td><td  valign='top'>
<p>When true (which is the default) the plan changes are automatically committed after planning a demand.<br />When false the plan changes need to explicitly committed or undone.
</p></td></tr><tr><td  valign='top'>userexit_buffer
</td><td  valign='top'>Python function
</td><td  valign='top'>The Python function registered in this field as a callback function is called automatically when the solver is about to plan a buffer.<br />The function is passed two arguments: the buffer being evaluated and a boolean that specifies whether the planning mode is constrained or not. The return value of the function is not used.
</td></tr><tr><td  valign='top'>userexit_demand
</td><td  valign='top'>Python function
</td><td  valign='top'>The Python function registered in this field as a callback function is called automatically when the solver is about to plan a demand.<br />The function is passed two arguments: the demand being planned and a boolean that specifies whether the planning mode is constrained or not. The return value of the function is not used.<br />This user exit enables users to plug in customized logic to adjust the planning parameters in the supply path, or to print debugging information.<br />Note that changes to the due date, quantity or priority of the demand are possible, but such changes won't influence the sort order of the demand compared to other demands any more.
</td></tr><tr><td  valign='top'>userexit_flow
</td><td  valign='top'>Python function
</td><td  valign='top'>The Python function registered in this field as a callback function is called automatically when the solver evaluates alternate flows.<br />The function is passed two arguments: the flowplan being evaluated and a boolean that specifies whether the planning mode is constrained or not. When the function returns True the alternate is acceptable. When it returns False the alternate is not acceptable.<br />This user exit enables users to plug in customized logic to control complex configuration rules in the bill of material.
</td></tr><tr><td  valign='top'>userexit_operation
</td><td  valign='top'>Python function
</td><td  valign='top'>The Python function registered in this field as a callback function is called automatically when the solver is about to plan an operation.<br />The function is passed two arguments: the operation being evaluated and a boolean that specifies whether the planning mode is constrained or not. The return value of the function is not used.
</td></tr><tr><td  valign='top'>userexit_resource
</td><td  valign='top'>Python function
</td><td  valign='top'>The Python function registered in this field as a callback function is called automatically when the solver is about to plan a resource.<br />The function is passed two arguments: the resource being evaluated and a boolean that specifies whether the planning mode is constrained or not. The return value of the function is not used.
</td></tr></table>
<div class='vspace'></div>
<table border='1' width='100%' ><tr><td width='30%'  valign='top'><strong>Method</strong>
</td><td width='70%'  valign='top'><strong>Description</strong>
</td></tr><tr><td  valign='top'>solve()<br />solve([Demand])
</td><td  valign='top'>
<p>Without arguments it recreates the complete plan.<br />When a demand is passed as argument, the demand is planned incrementally.
</p></td></tr><tr><td  valign='top'>commit()
</td><td  valign='top'>
<p>Commits the changes to the plan.<br />This method is only meaningfull when the autocommit flag is set to false.
</p></td></tr><tr><td  valign='top'>undo()
</td><td  valign='top'>
<p>Undo the changes to the plan.<br />This method is only meaningfull when the autocommit flag is set to false.
</p></td></tr></table>
<div class='vspace'></div><h2>Example XML structures</h2>
<ul><li>Adding or changing a solver
</li></ul><pre> &lt;plan&gt;
    &lt;solvers&gt;
       &lt;solver name=&quot;MRP&quot; xsi-type=&quot;solver_mrp&quot;&gt;
         &lt;constraints&gt;7&lt;/constraints&gt;
         &lt;maxparallel&gt;2&lt;/maxparallel&gt;
       &lt;/solver&gt; 
    &lt;/solvers&gt;
 &lt;/plan&gt;
</pre><div class='vspace'></div><ul><li>Deleting a solver
</li></ul><pre> &lt;plan&gt;
    &lt;solvers&gt;
       &lt;solver name=&quot;MRP&quot; action=&quot;R&quot;/&gt;
    &lt;/solvers&gt;
 &lt;/plan&gt;
</pre><div class='vspace'></div><h2>Example Python code</h2>
<ul><li>Adding or changing a solver, and running it
</li></ul><pre>    sol = frepple.solver_mrp(name=&quot;MRP&quot;, constraints=7, maxparallel=2)
    sol.solve()
</pre><div class='vspace'></div><ul><li>Deleting a solver
</li></ul><pre>    frepple.solver(name=&quot;MRP&quot;, action=&quot;R&quot;)
</pre>
</div>

<!--PageFooterFmt-->
<!--HTMLFooter-->
</div></div>
</body>
</html>