Sophie

Sophie

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

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 / Resource </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='ModelingResource.html'>Resource</a></span>
</p>
<p class='vspace'>Resources represent capacity.<br />They represent a machine, a worker or a group of workers, or some logical limits.
</p>
<p class='vspace'>A calendar refers to a time-phased maximum limit of the resource usage.
</p>
<p class='vspace'>Operations will consume capacity using loads.
</p>
<p class='vspace'>Different types of resources exist:
</p><ul><li><a href='ModelingResource.html#RESOURCE_DEFAULT'>resource_default</a>:<br />  A default resource is constrained with a maximum available capacity.
</li><li><a href='ModelingResource.html#RESOURCE_INFINITE'>resource_infinite</a>:<br />  An infinite resource has no capacity limit. 
</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'>name
</td><td  valign='top'>non-empty string
</td><td  valign='top'>
<p>Name of the resource.<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'>resource
</td><td  valign='top'>
<p>Resources can be organized in a hierarchical tree.<br />This field defines the parent resource.<br />No specific planning behavior is currently linked to such a hierarchy.
</p></td></tr><tr><td  valign='top'>members
</td><td  valign='top'>list of resource
</td><td  valign='top'>
<p>Resources can be organized in a hierarchical tree.<br />This field defines a list of child resources.
</p></td></tr><tr><td  valign='top'>location
</td><td  valign='top'>location
</td><td  valign='top'>
<p>Location of the resource.<br />Default is null.<br />The working hours and holidays for the resource are taken from the 'available' calendar of the location.
</p></td></tr><tr><td  valign='top'>maximum
</td><td  valign='top'>calendar
</td><td  valign='top'>
<p>Refers to a calendar storing the available capacity.<br />A problem is reported when the resource load exceeds than this limit.
</p></td></tr><tr><td  valign='top'>cost
</td><td  valign='top'>double
</td><td  valign='top'>
<p>The cost of using 1 unit of this resource for 1 hour.<br />The default value is 0.
</p></td></tr><tr><td  valign='top'>detectproblems
</td><td  valign='top'>boolean
</td><td  valign='top'>
<p>Set this field to false to suppress problem detection on this resource.<br />Default is true.
</p></td></tr><tr><td  valign='top'>maxearly
</td><td  valign='top'>duration
</td><td  valign='top'>
<p>Time window before the ask date where we look for available capacity.<br />The default value is 100 days.
</p></td></tr><tr><td  valign='top'>loads
</td><td  valign='top'>list of load
</td><td  valign='top'>
<p>Defines the capacity of the operations.
</p></td></tr><tr><td  valign='top'>loadplans
</td><td  valign='top'>list of loadplan
</td><td  valign='top'>
<p>This field is populated during an export with the plan results for this resource. It shows the resource load profile.<br />The field is export-only.<br />The description of the <a class='wikilink' href='ModelingOperationPlan.html#LOAD_PLAN'>loadplan model</a> is included in the section on operationplan.
</p></td></tr><tr><td  valign='top'>level
</td><td  valign='top'>integer
</td><td  valign='top'>
<p>Indication of how upstream/downstream this entity is situated in the supply chain.<br />Lower numbers indicate the entity is close to the end item, while a high number will be shown for components nested deep in a bill of material.<br />The field is export-only.
</p></td></tr><tr><td  valign='top'>cluster
</td><td  valign='top'>integer
</td><td  valign='top'>
<p>The network of entities can be partitioned in completely independent parts. This field gives the index for the partition this entity belongs to.<br />The field is export-only.
</p></td></tr><tr><td  valign='top'>setup
</td><td  valign='top'>non-empty string
</td><td  valign='top'>
<p>The name of the current setup of the resource, ie the setup of the resource at the start of the planning horizon.
</p></td></tr><tr><td  valign='top'>setupmatrix
</td><td  valign='top'>non-empty string
</td><td  valign='top'>
<p>The name of the setup matrix which specifies the changeover times between setups.
</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>
<p class='vspace'><a name='RESOURCE_DEFAULT' id='RESOURCE_DEFAULT'></a>
</p><h2>resource_default</h2>
<p>A default resource is constrained with a maximum available capacity.
</p>
<p class='vspace'>No fields are defined in addition to the ones listed above.
</p>
<p class='vspace'><a name='RESOURCE_INFINITE' id='RESOURCE_INFINITE'></a>
</p><h2>resource_infinite</h2>
<p>An infinite resource has no capacity limit.<br />It is useful to monitor the loading or usage.
</p>
<p class='vspace'>The MAXIMUM field is unused for this resource type.  
</p>
<div class='vspace'></div><h2>Example XML structures</h2>
<ul><li>Adding or changing a resource
</li></ul><pre> &lt;plan&gt;
   &lt;resources&gt;
     &lt;resource name=&quot;machine X&quot;&gt;
       &lt;maximum name=&quot;capacity calendar for machine X&quot; /&gt;
     &lt;/resource&gt;
   &lt;/resources&gt;
 &lt;/plan&gt;
</pre><div class='vspace'></div><ul><li>Deleting a resource
</li></ul><pre> &lt;plan&gt;
    &lt;resources&gt;
       &lt;resource name=&quot;machine X&quot; action=&quot;R&quot;/&gt;
    &lt;/resources&gt;
 &lt;/plan&gt;
</pre><div class='vspace'></div><h2>Example Python code</h2>
<ul><li>Adding or changing a resource
</li></ul><pre>    cal = frepple.calendar(name=&quot;capacity calendar for machine X&quot;)
    res = frepple.resource(name=&quot;machine X&quot;, maximum=cal)
</pre><div class='vspace'></div><ul><li>Deleting a resource
</li></ul><pre>    frepple.resource(name=&quot;machine X&quot;, action=&quot;R&quot;)
</pre><div class='vspace'></div><ul><li>Iterater over resources, loads and loadplans
</li></ul><pre>    for r in frepple.resources():
      print "Resource:", r.name, r.description, r.category
      for l in r.loads:
        print "  Load:", l.operation.name, l.quantity, 
          l.effective_start, l.effective_end
      for l in r.loadplans:
        print "  Loadplan:", l.operationplan.operation.name, 
          l.quantity, l.startdate, l.enddate, l.operationplan.id 
</pre>
</div>

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