Sophie

Sophie

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

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 / Operation</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='ModelingOperation.html'>Operation</a></span>
</p>
<p class='vspace'>An operation represents an activity: these consume and produce material, take time and also require capacity.
</p>
<p class='vspace'>An operation consumes and produces material, modeled through flows.
</p>
<p class='vspace'>An operation requires capacity, modeled through loads.
</p>
<p class='vspace'>Different operation types exist:
</p><ul><li><a href='ModelingOperation.html#OPERATION_FIXED_TIME'>operation_fixed_time</a>:<br />  Models an operation with a duration that is independent of the quantity. A good example is a transport or a procurement operation.
</li><li><a href='ModelingOperation.html#OPERATION_TIME_PER'>operation_time_per</a>:<br />  Models an operation where the duration increases linear with the quantity. A good example is a manufacturing operation where the duration is determined by the production rate of a machine.
</li><li><a href='ModelingOperation.html#OPERATION_ALTERNATE'>operation_alternate</a>:<br />  Models a choice between different operations. 
</li><li><a href='ModelingOperation.html#OPERATION_ROUTING'>operation_routing</a>:<br />  Models a sequence a number of 'step' sub-operations, to be executed sequentially.
</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 operation.<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'>location
</td><td  valign='top'>location
</td><td  valign='top'>
<p>Location of the operation.<br />Default is null.<br />The working hours and holidays for the operation are taken from the 'available' calendar of the location.
</p></td></tr><tr><td  valign='top'>owner
</td><td  valign='top'>operation
</td><td  valign='top'>
<p>Operations can be organized in a hierarchical tree.<br />This field defines the parent operation.
</p></td></tr><tr><td  valign='top'>fence
</td><td  valign='top'>duration
</td><td  valign='top'>
<p>Time window from the current date of the plan during which all operationplans are expected to be frozen / released.<br />When the "FENCE" constraint is enabled in the solver, it won't create any new operation plans in this time fence. Only the externally supplied and locked operationplans will then exist in this time window.
</p></td></tr><tr><td  valign='top'>size_minimum
</td><td  valign='top'>positive double
</td><td  valign='top'>
<p>A minimum quantity for operationplans. The default value is 1.<br />A request for a lower, non-zero quantity will be rounded up.
</p></td></tr><tr><td  valign='top'>size_multiple
</td><td  valign='top'>positive double
</td><td  valign='top'>A lotsize quantity for operationplans.
</td></tr><tr><td  valign='top'>size_maximum
</td><td  valign='top'>positive double
</td><td  valign='top'>The maximum quantity for operationplans.<br />Note that this value limits the size of individual operationplans. The solver can create multiple operationplans of this maximum size, so this value does NOT constrain the total planned quantity on the operation. The field is useful to break big operationplans in smaller ones.
</td></tr><tr><td  valign='top'>cost
</td><td  valign='top'>double
</td><td  valign='top'>
<p>The cost of executing this operation, per unit of the operation_plan. Depending on what the operation models, this represents transportation costs, manufacturing costs, material procurement costs, delivery costs, etc...<br />The raw material cost and the resource usage cost are added to this cost and should normally not be included in this value.<br />The default value is 0.
</p></td></tr><tr><td  valign='top'>pretime
</td><td  valign='top'>duration
</td><td  valign='top'>
<p>A pre-operation time, used as a buffer for uncertain material supply.<br />The solver will try to position material supply for operation plans early by the time specified here. This is a soft constraint, ie it can be violated if required to meet the demand in time.<br />Resources are not loaded during the pre-operation time.
</p></td></tr><tr><td  valign='top'>posttime
</td><td  valign='top'>duration
</td><td  valign='top'>
<p>A post-operation time, used as a buffer for uncertain capacity or operation duration.<br />The solver will try to respect this time as a soft constraint. Ie when required to meet demand on time the post-operation time can be violated.<br />Resources are not loaded during the post-operation time.
</p>
<p class='vspace'>This field is used to model time-based safety stock targets, aka days of inventory. It is then set for the producing operation of a certain buffer.<br />If you want to model a safety stock quantity, you can use the minimum field on the buffer.
</p></td></tr><tr><td  valign='top'>detectproblems
</td><td  valign='top'>boolean
</td><td  valign='top'>
<p>Set this field to false to skip problem detection on this operation.<br />The default value is true.
</p></td></tr><tr><td  valign='top'>loads
</td><td  valign='top'>list of load
</td><td  valign='top'>
<p>A list of all resources loaded by this operation.
</p></td></tr><tr><td  valign='top'>flows
</td><td  valign='top'>list of flow
</td><td  valign='top'>
<p>A list of all buffers where material is consumed from or produced into.
</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'>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='OPERATION_FIXED_TIME' id='OPERATION_FIXED_TIME'></a>
</p><h2>operation_fixed_time</h2>
<p>Models an operation with a fixed duration regardless of the quantity.  <br />E.g. a transport operation.
</p>
<p class='vspace'>This is the default operation type.
</p>
<div class='vspace'></div>
<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'>duration
</td><td  valign='top'>duration
</td><td  valign='top'>
<p>Duration of the operation.<br />The default value is 0.
</p></td></tr></table>
<p class='vspace'><a name='OPERATION_TIME_PER' id='OPERATION_TIME_PER'></a>
</p><h2>operation_time_per</h2>
<p>Models an operation where the duration changes linear with the quantity.<br />E.g. a production operation.
</p>
<p class='vspace'>The total duration of the operation plan is the sum of:
</p><ul><li>A fixed DURATION.
</li><li>A variable duration, computed as the operationplan quantity multiplied by a DURATION_PER.
</li></ul><div class='vspace'></div>
<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'>duration
</td><td  valign='top'>duration
</td><td  valign='top'>
<p>Fixed component of the duration of the operationplan.<br />The default value is 0.
</p></td></tr><tr><td  valign='top'>duration_per
</td><td  valign='top'>duration
</td><td  valign='top'>
<p>Variable component of the duration of the operationplan.<br />The default value is 0.
</p></td></tr></table>
<p class='vspace'><a name='OPERATION_ALTERNATE' id='OPERATION_ALTERNATE'></a>
</p><h2>operation_alternate</h2>
<p>Models a choice between different operations. <br />It has a list of alternate sub-operations listed, each with a priority.
</p>
<div class='vspace'></div>
<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'>search
</td><td  valign='top'>string
</td><td  valign='top'>
<p>Defines the order of preference among the alternate operations.<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 the alternate operation plus 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 the alternate operation plus all penalties incurred in the upstream plan along the alternate.
</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'>alternates
</td><td  valign='top'>List of alternate
</td><td  valign='top'>
<p>List of alternate sub-operations, each with their priority.
</p></td></tr></table>
<div class='vspace'></div>
<table border='1' width='100%' ><tr><td width='30%'  valign='top'><strong>Method</strong>
</td><td width='70%'  valign='top'><strong>Description</strong>
</td></tr><tr><td  valign='top'>
<p>addAlternate( operation=[operation], priority=[number], effective_start=[date], effective_end=[date])
</p></td><td  valign='top'>
<p>Add a new alternate sub operation.<br />The last three keyword arguments are optional.
</p></td></tr></table>
<p class='vspace'>Alternate fields:
</p>
<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'>operation
</td><td  valign='top'>operation
</td><td  valign='top'>Sub-operation.
</td></tr><tr><td  valign='top'>priority
</td><td  valign='top'>integer
</td><td  valign='top'>
<p>Priority of this alternate.<br />Lower numbers indicate higher priority.<br />When the priority is equal to 0, this alternate is considered unavailable and it can't be used for planning.
</p></td></tr><tr><td  valign='top'>effective_start
</td><td  valign='top'>dateTime
</td><td  valign='top'>
<p>Earliest allowed start date for using this alternate.
</p></td></tr><tr><td  valign='top'>effective_end
</td><td  valign='top'>dateTime
</td><td  valign='top'>
<p>Latest allowed end date for using this alternate.
</p></td></tr></table>
<p class='vspace'><a name='OPERATION_ROUTING' id='OPERATION_ROUTING'></a>
</p><h2>operation_routing</h2>
<p>Models a sequence a number of 'step' sub-operations, to be executed sequentially.
</p>
<div class='vspace'></div>
<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'>steps
</td><td  valign='top'>List of operation
</td><td  valign='top'>
<p>Lists all sub-operations in the order of execution.
</p></td></tr></table>
<div class='vspace'></div>
<table border='1' width='100%' ><tr><td width='30%'  valign='top'><strong>Method</strong>
</td><td width='70%'  valign='top'><strong>Description</strong>
</td></tr><tr><td  valign='top'>addStep([operation],...)
</td><td  valign='top'>
<p>Add a new step sub operation to the routing.<br />Up to 4 operations can be passed as arguments.
</p></td></tr></table>
<div class='vspace'></div><h2>Example XML structures</h2>
<ul><li>Adding or changing operations
</li></ul><pre> &lt;plan&gt;
   &lt;operations&gt;
     &lt;operation name=&quot;buy item X from supplier&quot; 
       xsi:type=&quot;operation_fixed_time&quot;&gt;
       &lt;duration&gt;P1D&lt;/duration&gt;
     &lt;/operation&gt;
     &lt;operation name=&quot;make item X&quot; 
       xsi:type=&quot;operation_time_per&quot;&gt;
       &lt;duration&gt;PT1H&lt;/duration&gt;
       &lt;duration_per&gt;PT5M&lt;/duration_per&gt;
     &lt;/operation&gt;
     &lt;operation name=&quot;make or buy item X&quot;
       xsi:type=&quot;operation_alternate&quot;&gt;
       &lt;alternates&gt;
         &lt;alternate&gt;
           &lt;operation name=&quot;make item X&quot; /&gt;
           &lt;priority&gt;1&lt;/priority&gt;
         &lt;/alternate&gt;
         &lt;alternate&gt;
           &lt;operation name=&quot;buy item X from supplier&quot; /&gt;
           &lt;priority&gt;2&lt;/priority&gt;
         &lt;/alternate&gt;
       &lt;/alternates&gt;
     &lt;/operation&gt;
     &lt;operation name=&quot;make subassembly&quot;
       xsi:type=&quot;operation_routing&quot;&gt;
       &lt;steps&gt;
          &lt;operation name=&quot;make subassembly step 1&quot; 
            duration=&quot;PT1H&quot;/&gt;
          &lt;operation name=&quot;make subassembly step 2&quot; 
            duration=&quot;PT5M&quot;/&gt;
       &lt;/steps&gt;
     &lt;/operation&gt;
   &lt;/operations&gt;
 &lt;/plan&gt;
</pre><div class='vspace'></div><ul><li>Deleting an operation
</li></ul><pre> &lt;plan&gt;
    &lt;operations&gt;
       &lt;operation name=&quot;make item X&quot; action=&quot;R&quot;/&gt;
    &lt;/operations&gt;
 &lt;/plan&gt;
</pre><div class='vspace'></div><h2>Example Python code</h2>
<ul><li>Adding or changing operations
</li></ul><pre>    op1 = frepple.operation_fixed_time(name=&quot;buy item X from supplier&quot;,
           duration=24*3600)
    op2 = frepple.operation_time_per(name=&quot;make item X&quot;, 
           duration=3600, duration_per=60*5)
    op3 = frepple.operation_alternate(name=&quot;make or buy item X&quot;)
    op3.addAlternate(operation=op1, priority=1)    
    op3.addAlternate(operation=op2, priority=2, 
      effective_end=datetime.datetime(2009,10,10))
    op4 = frepple.operation_routing(name=&quot;make subassembly&quot;)
    op4.addStep(
       frepple.operation_fixed_time(name=&quot;make subassembly step 1&quot; 
            ,duration=3600),
       frepple.operation_fixed_time(name=&quot;make subassembly step 2&quot; 
            ,duration=300)
       )
</pre><div class='vspace'></div><ul><li>Deleting an operation
</li></ul><pre>    frepple.operation(name=&quot;make item X&quot;, action=&quot;R&quot;)
</pre><div class='vspace'></div><ul><li>Iterate over operations, loads and flows
</li></ul><pre>    for o in frepple.operations():
      print "Operation:", o.name, o.description, o.category
      for l in o.loads:
        print "  Load:", l.resource.name, l.quantity, 
          l.effective_start, l.effective_end
      for l in o.flows:
        print "  Flow:", l.buffer.name, l.quantity, 
          l.effective_start, l.effective_end
</pre>
</div>

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