frePPLev2.0
open source Production PLanning
  • Home
  • Documentation
    • Getting started
    • Modeling guide
    • User guide
    • Installation guide
    • Developer guide
    • FAQ
  • C++ API

Demand

Define independent demands for items.
These can be actual customer orders, or forecasted demands.

Fields

Field Type Description
name non-empty string Name of the demand.
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 demand Demands are organized in a hierarchical tree.
This field defines the parent demand.
members list of demand Demands are organized in a hierarchical tree.
This field defines a list of child demand.
quantity double Requested quantity.
item item Requested item.
due dateTime Due date of the demand.
priority integer Priority of the demand relative to the other demands.
A lower number indicates higher priority.
The default value is 0.
operation operation Operation to be used to satisfy the demand.
If left unspecified the operation on the item will be used.
customer customer Customer placing the demand.
detectproblems boolean Set this field to false to supress problem detection on this demand.
Default is true.
maxlateness duration The maximum delay that can be accepted to satisfy this demand.
The default value allows an infinite delay.
minshipment positive double The minimum quantity allowed for the shipment operationplans that satisfy this demand.
The default is 1.
constraints list of Problems This field returns the list of reasons why the demand was planned late or short.
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.

Example XML structures

  • Adding or changing demands
 <plan>
   <demands>
    <demand name="order A">
      <quantity>10</quantity>
      <due>2007-01-10T00:00:00</due>
      <priority>1</priority>
      <item name="item 1" />
      <!-- Don't allow any delay -->
      <maxlateness>P0D</maxlateness>
      <!-- Don't create a delivery for less than 5 units -->
      <minshipment>5</minshipment> 
    </demand>
    <demand name="order B" quantity="10" 
        due="2007-01-10T00:00:00" priority="1" >
      <item name="item 1" />
    </demand>  
   </demands>
 </plan>
  • Removing a demand
 <plan>
   <demands>
       <demand name="order ABC" action="R"/>
   </demands>
 </plan>

Example Python code

  • Adding or changing demands
    it = frepple.item(name="item 1")
    dem1 = frepple.demand(name="order A", 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="order B", quantity=10,
        due=datetime.datetime(2007,1,10), priority=1", item=it)
  • Removing a demand
    frepple.demand(name="order ABC", action="R")
  • Iterating over all demands and their deliveries
    for d in frepple.demands():
      print "Demand:", d.name, d.due, d.item.name, d.quantity
      for i in d.operationplans:
        print "  Operationplan:", i.operation.name, i.quantity, i.end
  • Show the reason(s) why a demand is planned late or short:
    dmd = frepple.demand(name="a demand")
    for i in dmd.constraints:
      print i.entity, i.name, str(i.owner), i.description, 
        i.start, i.end, i.weight
    • Getting started
    • 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
      • Extension modules
        • Forecast module
        • REST web service module
        • Linear programming solver module
        • OpenERP connector module
    • User guide
      • Main features
      • Supported browsers
      • Getting around
        • Logging in
        • Logging out
        • Changing password
        • Navigation
          • Menu bar
          • Jump search
          • Context menus
          • Browser bookmarks
        • Filtering data
        • Sorting data
        • Selecting time buckets
        • Exporting data
        • Importing data
        • User preferences
        • User permissions and roles
      • Screens
        • Data input
        • Supply Path / Where Used
        • Comments
        • History – Audit trail
        • Plan analysis
          • 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
        • Execute
      • Batch commands
        • manage.py (manage.exe on Windows)
        • frepple (frepple.exe on Windows)
        • freppleservice.exe (Windows only)
    • Installation guide
      • Windows installer
      • Compiling on Windows
      • Linux binary packages
      • Compiling on Linux
      • Compiling on debian-based linux
      • Compiling on Red Hat based Linux
      • Compiling from the subversion source code repository
      • Running the VMWare virtual machine
      • Other platforms
      • Configuring the user interface
      • Configuring multiple models in the user interface
      • Configuring as a Python extension module
    • FAQ
    • Developer guide
      • Code structure
      • Class diagram
      • Solver
        • Solver features
        • Planning algorithm
          • Top level loop
          • Demand solver
          • Buffer solver
          • Flow solver
          • Load solver
          • Operation solver
          • Resource solver
        • Cluster and level algorithm
      • Extension modules
      • Version control
      • Style guide
      • Portability
      • Security
      • Internationalization
      • Translating the user interface
      • Adding or customizing a report
      • 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
    • License
      • GNU Affero General Public License
      • GNU Free Documentation License
    • Third party add-ons
  • Copyright © 2010-2013 frePPLe bvba