Sophie

Sophie

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

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 / Demand </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='ModelingDemand.html'>Demand</a></span>
</p>
<p class='vspace'>Define independent demands for items.<br />These can be actual customer orders, or forecasted demands.
</p>
<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'>name
</td><td  valign='top'>non-empty string
</td><td  valign='top'>
<p>Name of the demand.<br />This is the key field and a required attribute.
</p></td></tr><tr><td  valign='top'>description
</td><td  valign='top'>string
</td><td  valign='top'>
<p>Free format description.
</p></td></tr><tr><td  valign='top'>category
</td><td  valign='top'>normalizedString
</td><td  valign='top'>
<p>Free format category.
</p></td></tr><tr><td  valign='top'>subcategory
</td><td  valign='top'>normalizedString
</td><td  valign='top'>
<p>Free format subcategory.
</p></td></tr><tr><td  valign='top'>owner
</td><td  valign='top'>demand
</td><td  valign='top'>
<p>Demands are organized in a hierarchical tree.<br />This field defines the parent demand.
</p></td></tr><tr><td  valign='top'>members
</td><td  valign='top'>list of demand
</td><td  valign='top'>
<p>Demands are organized in a hierarchical tree.<br />This field defines a list of child demand.
</p></td></tr><tr><td  valign='top'>quantity
</td><td  valign='top'>double
</td><td  valign='top'>
<p>Requested quantity.
</p></td></tr><tr><td  valign='top'>item
</td><td  valign='top'>item
</td><td  valign='top'>
<p>Requested item.
</p></td></tr><tr><td  valign='top'>due
</td><td  valign='top'>dateTime
</td><td  valign='top'>
<p>Due date of the demand.
</p></td></tr><tr><td  valign='top'>priority
</td><td  valign='top'>integer
</td><td  valign='top'>
<p>Priority of the demand relative to the other demands.<br />A lower number indicates higher priority.<br />The default value is 0.
</p></td></tr><tr><td  valign='top'>operation
</td><td  valign='top'>operation
</td><td  valign='top'>
<p>Operation to be used to satisfy the demand.<br />If left unspecified the operation on the item will be used.
</p></td></tr><tr><td  valign='top'>customer
</td><td  valign='top'>customer
</td><td  valign='top'>
<p>Customer placing the demand.
</p></td></tr><tr><td  valign='top'>detectproblems
</td><td  valign='top'>boolean
</td><td  valign='top'>
<p>Set this field to false to supress problem detection on this demand.<br />Default is true.
</p></td></tr><tr><td  valign='top'>maxlateness
</td><td  valign='top'>duration
</td><td  valign='top'>
<p>The maximum delay that can be accepted to satisfy this demand.<br />The default value allows an infinite delay.
</p></td></tr><tr><td  valign='top'>minshipment
</td><td  valign='top'>positive double
</td><td  valign='top'>
<p>The minimum quantity allowed for the shipment operationplans that satisfy this demand.<br />The default is 0, allowing deliveries of any size.
</p></td></tr><tr><td  valign='top'>constraints
</td><td  valign='top'>list of Problems
</td><td  valign='top'>
<p>This field returns the list of reasons why the demand was planned late or short.<br />The field is export-only.
</p></td></tr><tr><td  valign='top'>hidden
</td><td  valign='top'>boolean
</td><td  valign='top'>
<p>Marks entities that are considered hidden and are normally not shown to the end user.
</p></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>Adding or changing demands
</li></ul><pre> &lt;plan&gt;
   &lt;demands&gt;
    &lt;demand name=&quot;order A&quot;&gt;
      &lt;quantity&gt;10&lt;/quantity&gt;
      &lt;due&gt;2007-01-10T00:00:00&lt;/due&gt;
      &lt;priority&gt;1&lt;/priority&gt;
      &lt;item name=&quot;item 1&quot; /&gt;
      &lt;!-- Don't allow any delay --&gt;
      &lt;maxlateness&gt;P0D&lt;/maxlateness&gt;
      &lt;!-- Don't create a delivery for less than 5 units --&gt;
      &lt;minshipment&gt;5&lt;/minshipment&gt; 
    &lt;/demand&gt;
    &lt;demand name=&quot;order B&quot; quantity=&quot;10&quot; 
        due=&quot;2007-01-10T00:00:00&quot; priority=&quot;1&quot; &gt;
      &lt;item name=&quot;item 1&quot; /&gt;
    &lt;/demand&gt;  
   &lt;/demands&gt;
 &lt;/plan&gt;
</pre><div class='vspace'></div><ul><li>Removing a demand
</li></ul><pre> &lt;plan&gt;
   &lt;demands&gt;
       &lt;demand name=&quot;order ABC&quot; action=&quot;R&quot;/&gt;
   &lt;/demands&gt;
 &lt;/plan&gt;
</pre><div class='vspace'></div><h2>Example Python code</h2>
<ul><li>Adding or changing demands
</li></ul><pre>    it = frepple.item(name=&quot;item 1&quot;)
    dem1 = frepple.demand(name=&quot;order A&quot;, quantity=10,
      due=datetime.datetime(2007,01,10), priority=1, item=it, 
      # Don't allow any delay
      maxlateness=0,
      # Don't create a delivery for less than 5 units
      minshipment=5) 
    dem2 = frepple.demand(name=&quot;order B&quot;, quantity=10,
        due=datetime.datetime(2007,1,10), priority=1&quot;, item=it)
</pre><div class='vspace'></div><ul><li>Removing a demand
</li></ul><pre>    frepple.demand(name=&quot;order ABC&quot;, action=&quot;R&quot;)
</pre><div class='vspace'></div><ul><li>Iterating over all demands and their deliveries
</li></ul><pre>    for d in frepple.demands():
      print &quot;Demand:&quot;, d.name, d.due, d.item.name, d.quantity
      for i in d.operationplans:
        print &quot;  Operationplan:&quot;, i.operation.name, i.quantity, i.end
</pre><div class='vspace'></div><ul><li>Show the reason(s) why a demand is planned late or short:
</li></ul><pre>    dmd = frepple.demand(name=&quot;a demand&quot;)
    for i in dmd.constraints:
      print i.entity, i.name, str(i.owner), i.description, 
        i.start, i.end, i.weight
</pre>
</div>

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