Beruflich Dokumente
Kultur Dokumente
Assignment 2
November 9, 2010
Problem Statement
The Supermarket System is a computerized system that automates purchases, sales, delivery, returns, monitoring, inventory control, marketing, payroll, accounting, and security for supermarkets (think Provigo, Loblaws, or Metro). You are to elaborate the Operation Model for the inventory control and purchasing subsystem (IC&P), which helps each store manager to keep track of the products in store, coordinates product deliveries from the common warehouse to the stores, and assists in purchasing products from suppliers.
2
2.1
Sales A customer queues at the checkout counter after completing his shopping. The customer places the items in the cart on the conveyor belt. The cashier then scans each item and places it in a bag. For each item, if the item is expired, the system should ash a warning. The cashier then discards the item. The customer can then decide to go get another item, or continue without it. If the barcode is missing on the item, the cashier keys in the product number. If the barcode reader recognizes the code, the price is displayed. For items sold by weight (e.g. fruits and vegetables), the items are placed on the scale and the cashier keys in the code for the product. The customer may have coupons (e.g., 4 for 1, 10% less, $1 o) for some products. The cashier keys in the coupon number, so that the appropriate amount is deducted from the bill. After all the items are scanned, the cashier relays the total to the customer and waits for the payment. The customer can pay by cash, credit or debit card. Problems can arise if the card does not have enough credit or if the debit card PIN is not recognized. Also, a customer can ask for cash-back if he pays by debit card. The cashier only has access to the cash register immediately after a sale has been made. At other times, the register is locked by the system. Delivery At the checkout counter, the customer can choose to have the purchases delivered. The delivery charge is then added to the total. Some discounts may be applicable (e.g. for students). The name of the client, his address and phone number are stored in the system. The purchases are then queued for delivery. On delivery, the customer needs to acknowledge receipt of the goods. Returns An item sold can be returned by a customer within 30 days from the date of purchase. Before accepting the return, it is veried whether the return deadline still holds and also whether the item is in proper condition. However, food products 1
are not accepted for return. The customer has to take the items to the customer service. The service agent then keys in or scans the item code to verify whether the item actually was bought from their store. The item is checked and approved for return. If the customer has the original receipt, he gets refunded in the same form than his original payment. Without receipt, the client receives a gift card.
2.2
Inventory Control Inventory control ensures that fresh items are regularly maintained in the store. For each item purchased, the expiry date should be recorded. For items sold by weight, the expiry date is assumed to be the same for all items when a delivery is received from a supplier. If the expiry date of an item equals the current date, the store personnel should be alerted. The employees then take action to remove the expired items from the shelves. If certain items in a store are going to expire soon, the store manager is alerted. The denition of soon would vary with the product, e.g. the alert for chocolates can be given a month before, whereas the alert for perishable items like fruits and vegetables can be given 7 days before. If a lot of stock is remaining, then the product can be put on sale (e.g. reduced price or two-for-one oers), so that the items are sold before they expire. Since items in the real world can be lost, are destroyed or stolen, there is a need to make sure that the inventory that the system has on le for each product actually corresponds to reality. The employees of the store should therefore investigate the stock periodically, and update the store inventory to reect reality. Purchasing The supermarket chain has a warehouse in town that is used to store large quantities of the products that the individual stores sell. At the end of each day, the system looks at the inventory of each store. If the stock of a product in a store has fallen below a certain threshold, the warehouse is contacted in order to replenish the stores stock. All requested products that the warehouse has in stock are shipped together in one shipment to the store that placed the request early next morning. If a product is not in stock, the request for that product is put on hold. The purchase subsystem also handles renewal of warehouse stock by purchasing products from suppliers. The suppliers create accounts with the system by calling the supermarkets administration. Using a user name and a password, registered suppliers can log into the system at any time to set or update the list of products they oer and at what price. It is possible that some goods are oered by several suppliers. When the stock of a product in the warehouse falls below a certain threshold, the system determines the supplier that currently oers the best deal on the product, and contacts the supplier to place an order that replenishes the warehouse to the maximum capacity. Once the shipment arrives at the warehouse, the account of the supplier is credited with the appropriate amount. The merchandise is tagged with barcodes, if applicable, entered into the system, and any outstanding requests from stores for the received product are immediately fullled, if any. At any time, a supplier can withdraw money from the account in the supermarket system by requesting a money transfer to the suppliers own bank account. Finally, a supplier who does not wish to continue providing products for the supermarket can unregister with the system, in which case all remaining funds are transferred to the suppliers bank account, and the suppliers records in the system are deleted.
2.3
Other Subsystems (just for information, i.e. not part of the assignment)
Security Subsystem The security subsystem aims to reduce thefts and other incidents in the stores. A security tag is attached to some products, which is demagnetized after purchase to prevent the security alarms from going on. Cameras are installed in various places in the store to aid in inspection of customer behavior. Marketing Subsystem The marketing subsystem maintains statistics of sales and returns. The goal is to maximize sales by studying customer behavior and psychology. For instance, the statistics gathered by the marketing system can be used to estimate how many items of a product are sold on average per day depending on various parameters (such as time of the year, etc...). This information can then be used to optimize purchasing strategies. 2
1 MaintainEnough ItemsInWarehouse
Supplier *
<<
in
<<inclu
clu
de
>>
<<i
>>
ncl
ude
>>
Warehouse Manager
<< in clu de
UpdateSupplier Product
<<include>>
WithdrawSupplier Funds
e> >
UnregisterSupplier <<include>>
i <<
d clu
<<i
nclu
de>
>
MaintainEnough ItemsInStore
Warehouse Employee
Store Employee
Bank
StoreManager
Figure 1: Supermarket Purchasing Subsystem Use Case Diagram Payroll Subsystem The payroll subsystem keeps record of the employees, e.g. how many hours they work, and handles payments of salaries.
Requirements Elicitation Background Information (Partial) Use Case Model of the Purchasing Subsystem
The Use Case Model of the purchasing subsystem has already been established and is presented in Figure 1. Detailed textual use case templates of 4 selected user goal level use cases are also given below.
2. System informs Administrator of successful creation of the supplier account, providing the username and password. Administrator communicates the username and password to the supplier over the phone. Extensions: 2a. System ascertains that the supplier already has an account with the system. 2a.1 System informs Administrator about situation; use case ends in failure.
1. System orders from Supplier that currently oers the best price for product p as much quantity as possible, i.e. enough to ll the warehouse stock for product p to the maximum and to honor all the store orders. 2. Supplier ships product to warehouse. 3. WarehouseEmployee informs System that a shipment of product p (which is sold by-unit) has arrived. Steps 4-6 are repeated for each item of product p included in the shipment. 4. WarehouseEmployee glues a barcode sticker to the item and enters expiry date of item into WarehouseItemScanner. 5. WarehouseItemScanner informs System of barcode and expiry date of item. 6. WarehouseEmployee stocks item in the warehouse. 7. WarehouseEmployee informs System that unloading of the shipment of product p is completed. 8. System informs Supplier that shipment was received. Note: In case there are outstanding orders for product p by stores, the system does the necessary steps to fulll them (see use case MaintainEnoughItemsInStore). Extensions: 1a. No supplier currently produces product p. 1a.1 System informs WarehouseManager of situation. Use case continues with next product at step 1. 3a. WarehouseEmployee informs System that a shipment of x kg of product p (which is sold by-weight) has arrived. 3a.1 WarehouseEmployee glues a barcode sticker on the container of the shipment and enters expiry date into scanner. 3a.2 WarehouseItemScanner informs System of barcode and expiry date for the entire shipment. Use case continues at step 8.
Environment Model
Based on the Use Case Model shown above, an Environment Model for the Supermarket Purchasing System that can handle RegisterSupplier, SupplierUpdateProduct, ReplenishStore and ReplenishWarehouse (including all their extensions and inclusions) has been established. It is shown in Figure 2. The messages and their parameters are described below: Input Messages RegisterSupplier(name: String, email: String, accInfo: form of a string that allows the system to contact a bank) Login(username: String, password: EncryptedString) 5 String) (accInfo is some data structure in
0..* login supplierSetProductPrice withdraw logout unregister * 0..* :Supplier loginAck withdrawAck updateAck requestShipment shipmentReceived
* * 0..*
inventoryItem
:InventoryScanner
: Supermarket
:StoreTerminal
* 0..*
registerSupplier
0..1
:AdminTerminal
registrationAck
0..*
:WarehouseItemScanner
Figure 2: Supermarket Purchasing Subsystem Environment Model SetSupplierProduct(p: Withdraw(amount: Logout() UnregisterSupplier() DepositAck(s: Supplier) Product, s: Date) Supplier) (the assumption is that one product is unloaded StartReceivingProductByUnit(p: at a time) NewItem(b: Barcode, expiresOn: Product, price: Integer)
Integer)
DoneReceivingProductByUnit() ReceivedProductByWeight(p: ReceivedDelivery(p: InventoryItem(b: StartInventoryByUnit(p: DoneInventoryByUnit(p: Product, s: Supplier, w: Weight, b: Barcode, expiresOn: Date) Product) Product)
UpdateInventoryByWeight(b:
Time-Triggered Events CheckExpiredItems() ReplenishStore() ReplenishWarehouse() Output Messages type RegistrationOutcome is enum {ok, accountAlreadyExists} type LoginOutcome is enum {ok, notLoggedIn, wrongUsernameOrPassword, accountBlocked} RegistrationAck(outcome: LoginAck(result: WithdrawAck() UpdateAck() RequestShipment(p: ShipmentReceived(p: Deposit(acc: ExpiredItem(i: Product, numberOfItemsOrWeight: Product, numberOfItemsOrWeight: Integer) Integer) Integer, amountCredited: Integer) RegistrationOutcome, username: String, password: String)
LoginOutcome)
Integer)
Concept Model
The Concept Model for the Supermarket Purchasing Subsystem is shown in Figure 3.
Develop a (partial) Operation Model for the Supermarket Purchasing System that covers the use cases RegisterSupplier, UpdateSupplierProduct, MaintainEnoughItemsInWarehouse and MaintainEnoughItemsInStore (i.e, you dont have to handle WithdrawSupplierFunds, UnregisterSupplier, UpdateStoreInventory, PutExpiringItemsOnSale, RemoveExpiredItems). This involves writing operation schemas for the following operations: RegisterSupplier, Login, SetSupplierProduct, StartReceivingProductByUnit, NewItem, DoneReceivingProductByUn ReceivedProductByWeight, ReceivedDelivery, CheckExpiredItems, ReplenishStore, ReplenishWarehouse These operations should generate the following output messages: RegistrationAck, LoginAck, UpdateAck, RequestShipment, ShipmentReceived, DeliverToStore, NoSupplierForProdu ExpiredItem You can use the following assumptions: UpdateSupplierProduct: a supplier will never try to register a price for a product that your supermarket chain does not sell MaintainEnoughItemsInWarehouse: Shipments requested from a supplier always eventually arrive at the warehouse. However, the received shipments from the supplier might not contain the total quantity of product requested. Shipments from the same supplier arrive in the same order as they were requested (in particular if they are shipments of the same product). 7
*
0..*
Store ItemScanners
0..*
Store Terminals
<<system>> Supermarket Purchasing System * 1 0..* Bank BankAccount Details accInfo: String amountToDeposit: Integer
myAcc 1 owner 1
StoreDelivery {ordered} 0..* StoreCatalogue Store dest quantity: Integer address: String 1 expectedDelivery stThreshold: Integer onHold: boolean stMaxStock: Integer soldAt 0..* 0..1 location
at 1
0..* scannedItems
shipmentProduct 1 category 1
from 1 currentShipment 0..*0..* shippedIn {ordered} Warehouse 0..1 SupplierShipment unloading quantity: Integer
Item
0..* itemsInStore
SupplierAccount name: String email: String * <<id>> username: String password: String balance: Integer Supplier loggedIn: Boolean nbOfAttempts: Integer
Inventory
0..* of 1 0..1 productOrdered 1
0..1 deliveredIn
suppliedBy 0..*
Product name: String myProducts price: Integer 0..* whMaxStock: Integer whThreshold: Integer
myCode: Barcode
0..* transportedItems
Warehouse ItemScanner
Warehouse Terminal
Admin Terminal
ProductByUnit
ItemByUnit
MaintainEnoughItemsInStore: In case the warehouse does not have enough items to completely replenish the stores stock, the delivery is put on hold. Deliveries leaving the warehouse always eventually arrive at the store. No items are lost or broken during transport. Deliveries for the same product arrive in the same order as they were requested.
Hand-In
Please hand in a paper copy of your solution until Tuesday November 9th. Remember that you are allowed to work in groups of 2, but not with a person you worked with for a previous assignment. If you work with someone, please hand in a single copy signed by both of you.