<!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 / Flow </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='Modeling.html'>Modeling</a> > <a class='selflink' href='ModelingFlow.html'>Flow</a></span> </p> <p class='vspace'>Flows are used to model the consumption and production of material from buffers. </p> <p class='vspace'>Two types of flows exist: </p><ul><li>FLOW_START: Flows that consume material at the start of an operationplan. </li><li>FLOW_END: Flows that produce material at the end of an operationplan. </li></ul><div class='vspace'></div><h2>Fields</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'>buffer </td><td valign='top'>buffer </td><td valign='top'> <p>Buffer from which material will be moved or transferred into.<br />This is a required field. </p></td></tr><tr><td valign='top'>operation </td><td valign='top'>operation </td><td valign='top'> <p>Operation to which the material flow is associated.<br />This is a required field. </p></td></tr><tr><td valign='top'>quantity </td><td valign='top'>double </td><td valign='top'> <p>Material quantity being consumed or produced per unit of the operationplan. </p></td></tr><tr><td valign='top'>effective_start </td><td valign='top'>dateTime </td><td valign='top'> <p>Date after which the material consumption is valid.<br />Before this date the planned quantity is always 0. </p></td></tr><tr><td valign='top'>effective_end </td><td valign='top'>dateTime </td><td valign='top'> <p>Date at which the material consumption becomes invalid.<br />After this date (and also at the exact date) the planned quantity is always 0. </p></td></tr><tr><td valign='top'>priority </td><td valign='top'>integer </td><td valign='top'> <p>Priority of the flow, used in case of alternate flows.<br />The default is 1. Lower numbers indicate more preferred flows. </p></td></tr><tr><td valign='top'>name </td><td valign='top'>non-empty string </td><td valign='top'> <p>Optional name of the flow.<br />A name is only useful when using alternate flows. Otherwise leave it empty to save some memory. </p></td></tr><tr><td valign='top'>alternate </td><td valign='top'>non-empty string<br />or<br />flow </td><td valign='top'>Name of the flow of which this is an alternate.<br />When using the Python API the argument can be a flow or a string.<br />When using the XML data format the argument is a string. </td></tr><tr><td valign='top'>search </td><td valign='top'>string </td><td valign='top'> <p>Defines the order of preference among the alternate flows.<br />The valid choices are: </p><ul><li>PRIORITY<br /> Select the alternate with the lowest priority number.<br /> This is the default. </li><li>MINCOST<br /> Select the alternate which gives the lowest cost.<br /> The cost includes the cost of all upstream operations, resources and buffers. </li><li>MINPENALTY<br /> Select the alternate which gives the lowest penalty.<br /> The penalty includes the penalty of all penalties incurred in the upstream plan along the flow. </li><li>MINCOSTPENALTY<br /> Select the alternate which gives the lowest sum of the cost and penalty.<br /> The sum is computed for the complete upstream path. </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><h2>Example XML structures</h2> <ul><li>Defining a flow </li></ul><pre> <plan> <flows> <flow xsi:type="flow_start"> <buffer name="buffer component"/> <operation name="operation B"/> <quantity>-2</quantity> </flow> </flows> </plan> </pre><div class='vspace'></div><ul><li>Defining a flow nested in an operation structure.<br /> A quantity 2 of component A OR 3 of component B are consumed, and 1 unit of the end item is produced. </li></ul><pre> <plan> <operations> <operation name="operation B"> <flows> <flow xsi:type="flow_start"> <buffer name="buffer component A"/> <quantity>-2</quantity> <name>group1</name> <priority>1</priority> </flow> <flow xsi:type="flow_start"> <buffer name="buffer component B"/> <quantity>-3</quantity> <alternate>group1</alternate> <priority>2</priority> </flow> <flow xsi:type="flow_end"> <buffer name="buffer end item"/> <quantity>1</quantity> </flow> </flows> </operation> </operations> </plan> </pre><div class='vspace'></div><ul><li>Defining a flow nested in a buffer structure </li></ul><pre> <plan> <buffers> <buffer name="buffer component"> <flows> <flow xsi:type="flow_start"> <operation name="operation A"/> <quantity>-2</quantity> </flow> <flow xsi:type="flow_start"> <operation name="operation B"/> <quantity>-1</quantity> </flow> </flows> </buffer> </buffers> </plan> </pre><div class='vspace'></div><ul><li>Deleting a flow </li></ul><pre> <plan> <flows> <flow action="R"> <buffer name="buffer component"/> <operation name="operation B"/> </flow> </flows> </plan> </pre> </div> <!--PageFooterFmt--> <!--HTMLFooter--> </div></div> </body> </html>