========================================== P R E - O R D E R S A N D O R D E R S ========================================== We represent a plan to order a specific number of items for a service property or combined property of an event as a "pre-order," which includes the event id, related property, and number of items. We then convert it into an order, which includes the choice of a vendor and item type, as well as the overall cost. -= Pre-order =- A pre-order includes the following parts: (1) The id of an event for which we plan to place an order. (2) The related service or combined property. (3) The number of items that we plan to order. For example, if we plan to order two computers for Session 1, we represent it as the following pre-order: Event id: session1 Property: computer Number of items: 2 -= Order =- An order includes a pre-order, and the following additional parts: (4) The choice of a vendor, specified by a vendor name or id. (5) The choice of an item type that matches the related property, specified by the item-type id. (6) The total cost in cents of ordering these items from the vendor, which is a natural number. (7) The room of the related event. (8) The start of the event. (9) The duration of the event. For example, suppose that we satisfy the need for computers by ordering two Dell notebooks ("dell") from First Vendor ("v1"), the vendor charges $10 per hour for a notebook, Session 1 is in Auditorium at 2pm, and its duration it two hours; then, the order is as follows: Event id: session1 Property: computer Number of items: 2 Vendor: v1 Item type: dell Total cost: 4000 Room: auditorium Start: 2pm Duration: 2 hours -= Order list =- When the system selects vendor orders for a specific schedule, it first generates a list of pre-orders; note that we cannot have two different pre-orders for the same event and service property. Then, the system converts a pre-order list into the list of respective orders, by selecting a vendor and item type for each pre-order. We store a list of pre-orders in a separate file, and a list of orders in another file. These lists corresponds to a specific schedule; if we change the schedule, we need to select new orders.