<!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 / Demand 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> > <span class='wikitrail'><a class='wikilink' href='Main.html'>Reference Manual</a> > <a class='wikilink' href='Solver.html'>Solver algorithm</a> > <a class='wikilink' href='Solverimpl.html'>Implementation details</a> > <a class='selflink' href='Solverimpldemand.html'>Demand solver</a></span> </p> <p class='vspace'>Ignore the demand if quantity is 0<br />Erase previous delivery operation plans, except the ones that are locked<br />Loop until the full demand quantity is planned. </p><div class='indent'>Call operation->ask(missing quantity,due date), where operation is the demand's or the items delivery operation </div><div class='indent'>If planned quantity = requested quantity, or the demand planning policy allows planning the demand in parts or shorts then <div class='indent'>Commit the operation plan creation </div></div><div class='indent'>Else <div class='indent'>Clear the list of scheduled operation plans </div><div class='indent'>If planned quantity > 0 then <div class='indent'>// This last step is required to make sure all supplying paths are planned for the quantity of the most constraining path </div><div class='indent'>Call operation->ask(planned quantity, due date) </div><div class='indent'>Commit the operation plan creation </div></div></div><div class='indent'>Update the planned quantity for the next iteration in the loop </div><div class='indent'>Exit the loop if the demand can't be planned late </div> </div> <!--PageFooterFmt--> <!--HTMLFooter--> </div></div> </body> </html>