<!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_lp_solver Namespace 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 class="current"><a href="namespaces.html"><span>Namespaces</span></a></li> <li><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="namespaces.html"><span>Namespace List</span></a></li> <li><a href="namespacemembers.html"><span>Namespace Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>module_lp_solver Namespace Reference</h1> <p>A solver module based on a linear programming algorithm. <a href="#_details">More...</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">class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00112.html">LPSolver</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This class is a prototype of an Linear Programming (LP) Solver for the planning problem or a subset of it. <a href="a00112.html#_details">More...</a><br/></td></tr> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00259.html#a23b340fb5d3b4805500e466be4745537">initialize</a> (const <a class="el" href="a00030.html#abed9d8d8563f8322df35b7b9723d6f4f">CommandLoadLibrary::ParameterList</a> &z)</td></tr> <tr><td colspan="2"><h2>Variables</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a00096.html">Keyword</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00259.html#a3c066bd64a01663ae7923ce7157c9427">tag_datafile</a> ("datafile")</td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a00096.html">Keyword</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00259.html#a09bd3213510d9b988b069fefbb8eee4d">tag_modelfile</a> ("modelfile")</td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a00096.html">Keyword</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00259.html#a3e3099eabbd5a19d886103977972d149">tag_objective</a> ("objective")</td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a00096.html">Keyword</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00259.html#ad0f3afe8289adaa0e70aeffbc129e847">tag_solutionfile</a> ("solutionfile")</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>A solver module based on a linear programming algorithm. </p> <p>The solver is intended primarly for prototyping purposes. Cleaner and more performant alternatives are recommended for real production use.</p> <p>The module uses the "Gnu Linear Programming Kit" library (aka GLPK) to solve the LP model.<br/> The solver works as follows:</p> <ul> <li>The solver expects a <b>model file</b> and a <b>data file</b> as input.<br/> The model file represents the mathematical representation of the problem to solve.<br/> The data file holds the data to be loaded into the problem. If no data file is specified, the data section in the model file is used instead.<br/> The user is responsible for creating these files. See the unit test lp_solver1 for an example.</li> <li>The solver solves for a number of objectives in sequence.<br/> After solving an objective's optimal value, the solver freezes the value as a constraint and start for the next objective. Subsequent objectives can thus never yield a solution that is suboptimal for the previous objectives.</li> <li>After solving for all objectives the solution is written to a solution file.<br/> The user is responsible for all processing of this solution file.</li> </ul> <p>The XML schema extension enabled by this module is (see mod_lpsolver.xsd): </p> <pre> <xsd:complexType name="solver_lp"> <xsd:complexContent> <xsd:extension base="solver"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="loglevel" type="loglevel" /> <xsd:element name="minimum" type="xsd:boolean" /> <xsd:element name="modelfile" type="xsd:normalizedString" /> <xsd:element name="datafile" type="xsd:normalizedString" /> <xsd:element name="solutionfile" type="xsd:normalizedString" /> <xsd:element name="objective" type="xsd:normalizedString" /> </xsd:choice> <xsd:attribute name="loglevel" type="loglevel" /> <xsd:attribute name="minimum" type="xsd:boolean" /> <xsd:attribute name="modelfile" type="xsd:normalizedString" /> <xsd:attribute name="datafile" type="xsd:normalizedString" /> <xsd:attribute name="solutionfile" type="xsd:normalizedString" /> <xsd:attribute name="objective" type="xsd:normalizedString" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> </pre> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a23b340fb5d3b4805500e466be4745537"></a><!-- doxytag: member="module_lp_solver::initialize" ref="a23b340fb5d3b4805500e466be4745537" args="(const CommandLoadLibrary::ParameterList &z)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* module_lp_solver::initialize </td> <td>(</td> <td class="paramtype">const <a class="el" href="a00030.html#abed9d8d8563f8322df35b7b9723d6f4f">CommandLoadLibrary::ParameterList</a> & </td> <td class="paramname"> <em>z</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Initialization routine for the library. </p> </div> </div> <hr/><h2>Variable Documentation</h2> <a class="anchor" id="a3c066bd64a01663ae7923ce7157c9427"></a><!-- doxytag: member="module_lp_solver::tag_datafile" ref="a3c066bd64a01663ae7923ce7157c9427" args="("datafile")" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="a00096.html">Keyword</a> <a class="el" href="a00259.html#a3c066bd64a01663ae7923ce7157c9427">module_lp_solver::tag_datafile</a>("datafile")</td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a09bd3213510d9b988b069fefbb8eee4d"></a><!-- doxytag: member="module_lp_solver::tag_modelfile" ref="a09bd3213510d9b988b069fefbb8eee4d" args="("modelfile")" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="a00096.html">Keyword</a> <a class="el" href="a00259.html#a09bd3213510d9b988b069fefbb8eee4d">module_lp_solver::tag_modelfile</a>("modelfile")</td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a3e3099eabbd5a19d886103977972d149"></a><!-- doxytag: member="module_lp_solver::tag_objective" ref="a3e3099eabbd5a19d886103977972d149" args="("objective")" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="a00096.html">Keyword</a> <a class="el" href="a00259.html#a3e3099eabbd5a19d886103977972d149">module_lp_solver::tag_objective</a>("objective")</td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="ad0f3afe8289adaa0e70aeffbc129e847"></a><!-- doxytag: member="module_lp_solver::tag_solutionfile" ref="ad0f3afe8289adaa0e70aeffbc129e847" args="("solutionfile")" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="a00096.html">Keyword</a> <a class="el" href="a00259.html#ad0f3afe8289adaa0e70aeffbc129e847">module_lp_solver::tag_solutionfile</a>("solutionfile")</td> </tr> </table> </div> <div class="memdoc"> </div> </div> </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>