Main > frePPLe Tutorial > Your first model

In this section you'll be introduced to the main modeling constructs and build a simple model.

Our sample company has 2 factories. In the first factory products can be manufactured, stored and then packaged. The second factory packages the products it gets shipped from the first factory.
Raw materials for the manufacturing are procured with a certain lead time from external suppliers.
We assume an infinite supply of the packaging material.
The customers can be supplied with products from both factories, and we prefer to deliver from the factory closest to the customer. Only when the preferred factory can't deliver in time is the other factory is considered as an alternative.

You can manually type in the data in your model. Or download the data file and import it into your frePPLe model as described earlier.

  • Calendar
    Some parameters in the model varying over time. This can be the capacity of a resource, the working hours at a location, the safety stock in a buffer, etc... These entities are defined in a calendar.
    In this model we'll later use calendars to define the working hours of the factories and capacity of the resources.

Download calendar.csv

NameTypeDefault value
pack capacity factory 1calendar_double0
pack capacity factory 2calendar_double0
weave capacity factory 1calendar_double0
availability of factory 1calendar_boolean1
availability of factory 2calendar_boolean1

Download calendar_bucket.csv

CalendarStart dateValuePriorityName
pack capacity factory 11/1/2008 0:0010 
pack capacity factory 12/1/2009 0:0020 
pack capacity factory 21/1/2008 0:0010 
weave capacity factory 11/1/2008 0:0030 
availability of factory 11/1/2008 0:0010 
availability of factory 21/1/2008 0:0010 
  • Location
    A location is a place where resources, buffers and operations are located. The locations could be physical or logical.
    In the picture above the locations are marked as rectangle around a number of other entities.
    Note that the location references a calendar to define its holidays and working hours.

Download location.csv

NameDescriptionAvailable
factory 1 availability of factory 1
factory 2 availability of factory 2
  • Item
    An item represents an end product, intermediate product or a raw material.

Download item.csv

NameDescription
box 
fabrican intermediate product
ink 
productan end item
thread 
  • Operation
    An operation represents an activity: it consumes and produces material, takes a certain time and also requires capacity.
    The material consumption is modelled as a flow: see below.
    The capacity consumption is modelled as a load: see below.
    In the picture above the operations are shown as the red rectangles.
    There are different types of operations.
    Fixed_time operations always last for a fixed period of time, regardless of the processed quantity.
    Time_per operations take a duration that is proportional to their quantity.
    Alternate operations model a choice between different options. The alternatives are listed as sub-operations.
    Routing operations model a sequence of operations to be executed in sequence. The steps are listed as sub-operations.

Download operation.csv

NameTypeLocationDurationDuration_perSize minimumSize multiple
Deliver product from factory 1 - 1 dayoperation_fixed_timefactory 186400 11
Deliver product from factory 1 - 7 dayoperation_fixed_timefactory 1604800 11
Deliver product from factory 1 or 2operation_alternate   11
Deliver product from factory 2 - 1 dayoperation_fixed_timefactory 286400 11
Deliver product from factory 2 - 7 dayoperation_fixed_timefactory 2604800 11
Deliver product from factory 2 or 1operation_alternate   11
Make fabric @ factory 1operation_time_perfactory 10360011
Pack product @ factory 1operation_fixed_timefactory 186400 11
Pack product @ factory 2operation_fixed_timefactory 286400 11
Purchase box @ factory 1operation_fixed_timefactory 1604800 40050
Purchase box @ factory 2operation_fixed_timefactory 2604800 40050
Purchase ink @ factory 1operation_fixed_timefactory 1604800 150
Purchase thread @ factory 1operation_fixed_timefactory 11209600 5001
Transport fabric from factory 1 to 2operation_fixed_time 172800 10001

Download suboperation.csv

OperationSuboperationPriority
Deliver product from factory 2 or 1Deliver product from factory 2 - 1 day1
Deliver product from factory 1 or 2Deliver product from factory 2 - 7 day2
Deliver product from factory 1 or 2Deliver product from factory 1 - 1 day1
Deliver product from factory 2 or 1Deliver product from factory 1 - 7 day2
  • Buffer
    A buffer is a storage for a item. It represents a place where inventory of an item is kept.
    Operations consume material from or produce into buffers using flows: see below.
    There are buffers of different types.
    Infinite buffers have an indefinite supply and will never constrain the plan.
    Default buffers don't have an infinite supply, and the field producing defines the operation that needs to be planned to replenish the buffer.

Download buffer.csv

NameLocationItemOnhandTypeProducing
box @ factory 1factory 1box30buffer_infinite 
box @ factory 2factory 2box40buffer_infinite 
fabric @ factory 1factory 1fabric0 Make fabric @ factory 1
fabric @ factory 2factory 2fabric0 Transport fabric from factory 1 to 2
ink @ factory 1factory 1ink0 Purchase ink @ factory 1
product @ factory 1factory 1product0 Pack product @ factory 1
product @ factory 2factory 2product10 Pack product @ factory 2
thread @ factory 1factory 1thread50 Purchase thread @ factory 1
  • Flow
    Flows are used to model the consumption and production of material.
    They create a link/assiocation between an operation and a buffer.
    In the picture above the flows are visible as arrows between a buffer and an operation. Arrows from a buffer to an operation represent consumption of material, and arrows starting from operation represent material that is produced.

Download flow.csv

OperationBufferTypeQuantity
Pack product @ factory 1product @ factory 1flow_end1
Pack product @ factory 2product @ factory 2flow_end1
Purchase box @ factory 1box @ factory 1flow_end1
Purchase box @ factory 2box @ factory 2flow_end1
Purchase ink @ factory 1ink @ factory 1flow_end1
Purchase thread @ factory 1thread @ factory 1flow_end1
Make fabric @ factory 1fabric @ factory 1flow_end1
Deliver product from factory 1 - 1 dayproduct @ factory 1 -1
Deliver product from factory 1 - 7 dayproduct @ factory 1 -1
Deliver product from factory 2 - 1 dayproduct @ factory 2 -1
Deliver product from factory 2 - 7 dayproduct @ factory 2 -1
Make fabric @ factory 1thread @ factory 1 -3
Make fabric @ factory 1ink @ factory 1 -2
Pack product @ factory 1fabric @ factory 1 -1
Pack product @ factory 2fabric @ factory 2 -1
Pack product @ factory 1box @ factory 1 -1
Pack product @ factory 2box @ factory 2 -1
Transport fabric from factory 1 to 2fabric @ factory 2flow_end1
Transport fabric from factory 1 to 2fabric @ factory 1 -1
  • Resource
    Resources represent capacity. They represent a machine, a worker or a group of workers, or some logical limits.
    Operations consume capacity using loads: see below.
    The picture above shows the name of the resource.
    Note how the resource point to a calendar for the definition of their maximum capacity.

Download resource.csv

NameLocationMaximum
pack in factory 1factory 1pack capacity factory 1
pack in factory 2factory 2pack capacity factory 2
weave in factory 1factory 1weave capacity factory 1
  • Load
    Loads are used to model the capacity consumption of an operation.
    They are displayed as a dashed line in the above picture.
    In this model we'll claim 1 unit on the resource for each operation.

Download load.csv

OperationResourceQuantity
Pack product @ factory 1pack in factory 11
Pack product @ factory 2pack in factory 21
Make fabric @ factory 1weave in factory 11
  • Demand
    Defines independent demands for items. These can be actual customer orders, or forecasted demands.
    The actual demands are not shown in the above picture, but the operations (big red rectangles)you see on the right are the delivery operations that are planned to satisfy the demand.
    In this example the delivery operations are alternate operations, modelling the choice to meet the demand from the 2 factories.
    Note how the demand points to an operation that will need to be planned to satisfy the demand.

Download demand.csv

NameItemDueQuantityMinimum shipmentDelivery operationPriority
Demand 1product5/5/2009 0:00100100Deliver product from factory 1 or 21
  • Parameter
    Finally, we need to update an important parameter in the model.
    Locate the record currentdate in the parameter table and change its value to 2009-01-01 00:00:00. This parameter defines the start date of the planning horizon. If the parameter is missing or incorrectly formatted frePPLe use the system date of your computer.
    The second parameter loading_time_units is optional and selects the units to use in the resource loading report.

Download parameter.csv

NameValueDescription
currentdate1/1/2009 0:00Current date of the plan, formatted as YYYY-MM-DD HH-MM-SS
loading_time_unitsdaysTime units to be used for the resource report: hours, days, weeks
  • Verify the supply path
    The supply path shows the modelled supply chain.
    You can follow the supply chain "downstream", i.e. starting from raw materials and moving step by step towards the end item. Click on an operation, buffer or resource and select "where used" in the popup menu to see the downstream supply path.
    You can also follow the supply chain "upstream", i.e. starting from the end item and tracking step by step which material and capcity it takes to produce it. Click on an operation, buffer or resource and select "supply path" to see the upstream supply path.
    If all went well, the "where used" report for the buffer "ink @ factory 1" will look as follows. You can easily trace the different elements shown in the picture above.
  • If you didn't complete all of the above steps successfully, you're lucky: there is a fixture available that let's you catch up.
    Open the menu item "execute" and hit the "erase" button. Next, select the "tutorial 1" dataset from the list and hit the "load" button.