An item represents an end product, intermediate product or a raw material.
Each demand is associated with an item.
A buffer is also associated with an item: it represents a storage of the item at a certain location.
Fields
Field | Type | Description |
name | non-empty string | Name of the item. 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 | item | Items are organized in a hierarchical tree. This field defines the parent item. |
members | list of item | Items are organized in a hierarchical tree. This field defines a list of child items. |
operation | operation | This is the operation used to satisfy a demand for this item. If left unspecified the value is inherited from the parent item. See also the OPERATION field on the DEMAND. |
price | double | Cost or price of the item. Depending on the precise usage and business goal it should be evaluated which cost to load into this field: purchase cost, booking value, selling price… For most applications the booking value is the appropriate one. The default value is 0. |
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:
|
Example XML structures
- Adding or changing an item and its delivery operation
<plan> <items> <item name="item A"> <operation name="Delivery of item A" xsi:type="operation_fixed_time"> <duration>24:00:00</duration> </operation> <owner name="Item class A"/> </item> </items> </plan>
- Deleting an item
<plan> <items> <item name="item A" action="R"/> </items> </plan>
Example Python code
- Adding or changing an item and its delivery operation
oper = frepple.operation_fixed_time(name="Deliver item A", duration=24*3600) it1 = frepple.item(name="Item class A") it2 = frepple.item(name="item A", operation=oper, owner=it1)
- Deleting an item
frepple.item(name="item A", action="R")