Simulate a cookie factory with the given conditions. Factory may have one or more production lines. Factory maintains separate inventories for raw materials and production. Storage is measured in kilos. Partially completed orders are not to be dispatched. Stores will have its maximum loading capacity and starting balance of items. Both supplies and orders are to be fetched run time with the given time stamp. Amount of water, fuel and materials not mentioned in the system are not to be concerned. During the process you are to expect no line issues arises in the factory and both labor and machines are at its full throttle. Line context switching time is negligible. Factory line should suspend automatically if raw material goes out of stock or production warehouse capacity get exceeded. There are no priority orders and program should be able to figure out the best sequence of execution. Inventory data description: Raw material codes: Flour - FL, Butter - BT, Chocolate Chips - CH, Milk - MK, Suggar - SG, Ginger- GN
Raw material inventory line: <Raw material code> <quantity>
Raw material supply <Raw material code> <Quantity> <Arrival time>
Cookie codes: Base Biscuit - BB, Butter Cookies - BC, Chocolate Chip Cookies - CC, Ginger Cookies GC
Recipe line <cookie code> [<Raw material code:quantity>, ….. |<process time>]
Merchandise inventory <Cookie code> <Quantity>
Invoice line <invoice id> <arrival time> [<Cookie code> <Quantity>, ………] Recipes are given for 100 kg of cookies. Arrival time given in seconds. System start time is taken as t0
System should be able to retrieve and store data from the given data files in the runtime. Appropriate repositories should be used. Sample data files are attached and complexity of data set would be higher in the actual test environment. Cookies and raw materials should be considered as entities and inventories should be made with thread safe structure. Cookie manufacturing lines could be implemented with threads and number of manufacturing lines available will be vary. Cookie manufacturing and raw material arrival management should be handled simultaneously. Invoice line selection should depend on current inventory status.
A detail report (sample report attached) should be generated at the end of execution. Proper application of object oriented design patterns, meaningful Class arrangement, efficient algorithm usage, error handling, readable and efficient coding will be considered in grading.
Project should implement the following classes.
1. InventoryManager - manage both raw material and merchandises inventory
2. FactoryManager - Manage incoming invoices and production line
3. FactoryRunner - with the main Method to execute the system. Initiate the system, loads the system data start processing invoices.
Deliverables [url removed, login to view] should be delivered along with source code
[url removed, login to view] should be created in the same folder where [url removed, login to view] resides.
Should execute as follows: java -jar [url removed, login to view] ~/<file path>/[url removed, login to view] ~/<file path>/[url removed, login to view] ~/<file path>/[url removed, login to view]
attached input files for the application