Main > Reference Manual > Modeling > Item
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.
Fields
Field | Type | Description |
name | non-empty string |
Name of the item. |
description | string |
Free format description. |
category | normalizedString |
Free format category. |
subcategory | normalizedString |
Free format subcategory. |
owner | item |
Items are organized in a hierarchical tree. |
members | list of item |
Items are organized in a hierarchical tree. |
operation | operation |
This is the operation used to satisfy a demand for this item. |
price | double |
Cost or price of the item. |
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")