frePPLeOpen source Production Planning
  • Home
  • Documentation
  • C++ API

Buffer

A buffer is a storage for a item. It represents a place where inventory of an item is kept.
It’s often called SKU.

Different types of buffers exist:

  • buffer_default:
    The default buffer uses an “producing” operation to replenish it with additional material.
  • buffer_procure:
    A buffer that is replenished by a supplier. A number of parameters control the re-ordering policy: classic re-order point, fixed time ordering, fixed quantity ordering, etc…
  • buffer_infinite:
    An infinite buffer has an infinite supply of the material is available.

Fields

Field Type Description
name non-empty string Name of the buffer.
This is the key field and a required attribute.
description string Free format description.
category normalizedString Free format category.
subcategory normalizedString Free format subcategory.
owner buffer Buffers can be organized in a hierarchical tree.
This field defines the parent buffer.
No specific planning behavior are currently linked to such a hierarchy.
members list of buffer Buffers can be organized in a hierarchical tree.
This field defines a list of child buffers.
location location Location of the buffer.
Default is null.
The working hours and holidays for the buffer are taken from the ‘available’ calendar of the location.
item item Item being stored in the buffer.
Default is null.
onhand double Inventory level at the start of the time horizon.
Default is 0.
carrying_cost double The cost of carrying inventory in this buffer.
The value is an annual percentage of the item sales price.
The default value is 0.0.
minimum double Refers to a calendar storing the desired minimum inventory level, aka safety stock.
The solver treats this as a soft constraint, ie it tries to meet this inventory level but will go below the minimum level if required to meet the demand.
A problem is reported when the inventory drops below this level.The safety stock target is expressed as a quantity. If you want to define a safety stock target as a time value (aka days of inventory), you can set a post-operation time on the producing operation of the buffer.
minimum_calendar calendar Refers to a calendar storing the desired minimum inventory level, aka safety stock.
Use this field when the minimum inventory level is varying over time. Otherwise use the minimum field. If both fields are specified, the minimum field is ignored.
maximum double Refers to a calendar storing the maximum inventory level.
This field is not used by the solver.
A problem is reported when the inventory level is higher than this limit.
maximum_calendar calendar Refers to a calendar storing the maximum inventory level.
Use this field when the maximum inventory level is varying over time. Otherwise use the maximum field. If both fields are specified, the maximum field is ignored.
producing operation This operation will be instantiated by the solver to replenish the buffer with additional material.
detectproblems boolean Set this field to false to supress problem detection on this buffer.
Default is true.
flows list of flow Defines material flows consuming from or producing into this buffer.
flowplans list of flowplan This field is populated during an export with the plan results for this buffer. It shows the complete inventory profile.
The field is export-only.
The description of the flowplan model is included in the section on operationplan.
level integer Indication of how upstream/downstream this entity is situated in the supply chain.
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.
The field is export-only.
cluster integer The network of entities can be partitioned in completely independent parts. This field gives the index for the partition this entity belongs to.
The field is export-only.
hidden boolean Marks entities that are considered hidden and are normally not shown to the end user.
action A
C
AC (default)
R
Type of action to be executed:

  • A: Add an new entity, and report an error if the entity already exists.
  • C: Change an existing entity, and report an error if the entity doesn’t exist yet.
  • AC: Change an entity or create a new one if it doesn’t exist yet.
  • R: Remove an entity, and report an error if the entity doesn’t exist.

buffer_default

The default buffer uses an “producing” operation to replenish it.

No fields are defined in addition to the ones listed above.

buffer_procure

A procurement buffer is replenished by a supplier.

A number of parameters control the re-ordering policy: classic re-order point, fixed time ordering, fixed quantity ordering, etc…
The parameters LEADTIME, MININVENTORY and MAXINVENTORY define a replenishment with a classical re-orderpoint policy. The inventory profile will show the typical sawtooth shape.
The parameters MININTERVAL and MAXINTERVAL put limits on the frequency of replenishments. The inventory profile will have “teeth” of variable size but with a controlled interval.
The parameters SIZE_MINIMUM, SIZE_MAXIMUM and SIZE_MULTIPLE put limits on the size of the replenishments. The inventory profile will have “teeth” of controlled size but with variable intervals.
Playing with these parameters allows flexible and smart procurement policies to be modelled.

Note that frePPLe doesn’t include any logic to set these parameters in an optimal way. The parameters are to be generated externally and frePPLe only executes based on the parameter settings.
At a later stage a module to compute these parameters could be added.

The PRODUCING field is unused for this buffer type.
Propagation through a bill of material will be stopped at a procurement buffer.

Field Type Description
leadtime duration Time taken between placing the purchase order with the supplier and the delivery of the material.
When the “LEADTIME” constraint is enabled in the solver, it won’t create any new procurement orders that would need to start in the past.
fence duration Time window (from the current date of the plan) during which procurement orders are expected to be released.
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 existing procurement plans will then exist in this time window.
mininventory Positive double Inventory level triggering a new replenishment.
The actual inventory can drop below this value.
maxinventory Positive double Inventory level to which we try to replenish.
The actual inventory can exceed this value.
mininterval duration Minimum time between replenishments.
The order quantity will be increased such that it covers at least the demand in the minimum interval period. The actual inventory can exceed the target set by the MinimumInventory parameter.
maxinterval duration Maximum time between replenishments.
The order quantity will replenish to an inventory value less than the maximum when this maximum interval is reached.
size_minimum Positive double Minimum quantity for a replenishment.
This parameter can cause the actual inventory to exceed the target set by the MinimumInventory parameter.
size_maximum Positive double Maximum quantity for a replenishment.
This parameter can cause the maximum inventory target never to be reached.
size_multiple Positive double All replenishments are rounded up to a multiple of this value.

buffer_infinite

An infinite buffer has an infinite supply of the material is available.

The PRODUCING field is unused for this buffer type.
Propagation through a bill of material will be stopped at an infinite buffer.

Example XML structures

  • Adding or changing a buffer
     <plan>
       <buffers>
         <buffer name="item a @ location b">
           <item name="item a" />
           <location name="location b" />
           <onhand>10</onhand>
         </buffer>
       </buffers>
     </plan>
  • Update the current inventory information of an existing buffer
     <plan>
       <buffers>
         <buffer name="item a @ location b" onhand="100"  action="C" />
       </buffers>
     </plan>
  • Deleting a buffer
     <plan>
        <buffers>
           <buffer name="item a @ location b" action="R"/>
        </buffers>
     </plan>

Example Python code

  • Adding or changing a buffer
        it = frepple.item(name="item a")
        loc = frepple.location(name="location b")
        buf = frepple.buffer(name="item a @ location b", 
                onhand=10, item=it, location=loc)
  • Update the current inventory information of an existing buffer
        buf = frepple.buffer(name="item a @ location b", 
                onhand=10, action="C")
  • Deleting a buffer
        buf = frepple.buffer(name="item a @ location b", action="R")
  • Iterate over buffers, flows and flowplans
       for b in frepple.buffers():
         print "Buffer:", b.name, b.description, b.category 
         for l in b.flows:
           print " Flow:", l.operation.name, l.quantity, 
             l.effective_start, l.effective_end
         for l in b.flowplans:
           print " Flowplan:", l.operationplan.operation.name, 
             l.quantity, l.date
    • Getting started
      • 1 – Introduction
      • 2 – Installation
      • 3 – Entering data
      • 4 – Modelling concepts
      • 5 – Your first model
      • 6 – Your first plan
    • Modeling guide
      • Simplified domain model
      • Detailed domain model
      • Environment variables
      • Python interpreter
      • Global parameters
      • Buffer
      • Calendar
      • Customer
      • Demand
      • Flow
      • Item
      • Load
      • Location
      • Operation
      • Suboperation
      • Operationplan
      • Problem
      • Resource
      • SetupMatrix
      • Skill
      • Resource skill
      • Solver
    • User guide
      • Supported browsers
      • Getting around
        • Logging in
        • Logging out
        • Changing password
        • Navigation
          • Menu bar
          • Jump search
          • Context menus
        • Filtering data
        • Sorting data
        • Selecting time buckets
        • Exporting data
        • Importing data
        • Customizing a screen
        • User preferences
        • User permissions and roles
        • Comments
        • History – Audit trail
      • Data maintenance screens
      • Supply Path / Where Used
      • Plan analysis screens
        • Problem report
        • Constraint report
        • Inventory report
        • Inventory detail report
        • Resource report
        • Resource Gantt report
        • Resource detail report
        • Operation report
        • Operation detail report
        • Demand report
        • Demand detail report
        • Demand Gantt report
        • Forecast report
        • Performance indicator report
      • Execution screen
      • Batch commands
        • frepplectl
        • frepple
        • freppleservice.exe (Windows only)
    • Installation guide
      • Windows installer
      • Compiling on Windows
      • Linux binary packages
      • Compiling on Linux
      • Compiling from the source code repository
      • Running the VMWare virtual machine
      • Other platforms
      • Configuring multiple models in the user interface
      • Configuring as a Python extension module
    • Extension modules
      • Forecast module
      • Order quoting module
      • REST web service module
      • OpenERP connector module
      • Linear programming solver module
    • Technical guide
      • Architecture
      • Source code repository
      • User interface
        • Creating an extension app
        • Translating the user interface
        • Adding or customizing a report
        • Style guide
      • Solver engine
        • Code structure
        • Class diagram
        • Planning algorithm
          • Top level loop
          • Demand solver
          • Buffer solver
          • Flow solver
          • Load solver
          • Operation solver
          • Resource solver
        • Cluster and level algorithm
        • Extension modules
        • Style guide
        • Portability
      • Security
      • Unit tests
        • buffer_procure_1
        • calendar
        • callback
        • cluster
        • constraints_combined_1
        • constraints_combined_2
        • constraints_leadtime_1
        • constraints_material_1
        • constraints_material_2
        • constraints_material_3
        • constraints_material_4
        • constraints_resource_1
        • constraints_resource_2
        • constraints_resource_3
        • constraints_resource_4
        • constraints_resource_5
        • datetime
        • deletion
        • demand_policy
        • flow_alternate_1
        • flow_alternate_2
        • flow_effective
        • forecast_1
        • forecast_2
        • forecast_3
        • forecast_4
        • forecast_5
        • forecast_6
        • jobshop
        • load_alternate
        • load_effective
        • lpsolver_1
        • multithreading
        • name
        • operation_alternate
        • operation_available
        • operation_effective
        • operation_pre_post
        • operation_routing
        • pegging
        • problems
        • python_1
        • python_2
        • python_3
        • safety_stock
        • sample_module
        • scalability_1
        • scalability_2
        • scalability_3
        • setup_1
        • setup_2
        • skill
        • xml
        • xml_remote
    • FAQ
    • License
      • GNU Affero General Public License
      • GNU Free Documentation License
    • Third party add-ons
  • Copyright © 2010-2013 frePPLe bvba