<commit_before>
									  -Design Document: Market-

-----------------------------------------INTERACTION DIAGRAM-----------------------------------------

Market
	Message							Parameters				[Sender] 	--> [Recipient]			EnumOrderStatus (Originally CARTED)
1.	msgOrderPlacement				Order 					Customer 		Cashier				PLACED
2.	msgInvoiceToCustomer			Order, Invoice 			Cashier			Customer			PAYING
3.	msgPayingForOrder				Invoice	 				Customer		Cashier				PAID
4.	msgHereIsReceiptInvoice			Invoice					Cashier			Customer			PAYMENT_RECEIVED
5.	msgFulfillOrder					Order					Cashier			Worker				ORDERING

6.	msgCustomerOrderReady			Order					Worker			Customer			VALIDATING
7.	msgInvoiceValidation			Invoice					Customer		Worker				VALIDATED
8.	msgHereIsCustomerOrder			Order					Worker			Customer			DONE



1.	msgOrderPlacement				Order					Cook			Cashier				PLACED
2.	msgInvoiceToCook				Order, Invoice			Cashier			Cook				PAYING
3.	msgPayingForOrder				Invoice	 				Cook			Cashier				PAID
4.	msgHereIsReceiptInvoice			Invoice					Cashier			Cook				PAYMENT_RECEIVED
5.	msgFulfillOrder					Order 					Cashier			Worker				ORDERING

6.	msgDeliverOrderToCook			Order					Worker			DeliveryTruck		DELIVERING
7.	msgCookOrderReady				Order					DeliveryTruck	Cook				VALIDATING
8.	msgInvoiceValidation			Invoice					Cook			DeliveryTruck		VALIDATED
9.	msgHereIsCookOrder				Order					DeliveryTruck	Cook				DONE


Item
	static enum EnumItemType = new enum {item possibilities}
	map from item type to price

Order
	static enum EnumOrderStatus {CARTED, PLACED, PAYING, PAID, PAYMENT_RECEIVED, ORDERING, DELIVERING, VALIDATING, VALIDATED, DONE};
	EnumOrderStatus mOrderStatus;
	Map<Item, Integer> mItems;
	Person mPerson;
	
Invoice
	Order mOrder;
	final int mTotal;
	int mPayment;
	boolean mPaid; //signed by the cashier


*Customer = MarketCustomerAgent
*Worker = MarketWorkerAgent
*Cashier = MarketCashierAgent
*Cook = MarketCookAgent
*DeliveryTruck = MarketDeliveryTruckAgent
<commit_msg>Updated interaction diagram for market design. #1<commit_after>
									  -Design Document: Market-

-----------------------------------------INTERACTION DIAGRAM-----------------------------------------

Market
	Original OrderStatus	OrderEvent			New OrderStatus				Message							Parameters				[Sender] 	--> [Recipient]				
1.	CARTED					1					PLACED						msgOrderPlacement				Order 					Customer/Cook	Cashier					
2.	PLACED					ORDER_PLACED		PAYING						msgInvoiceToCustomer			Order, Invoice 			Cashier			Customer/Cook		
3.	PAYING					RECEIVED_INVOICE	PAID						msgPayingForOrder				Invoice	 				Customer/Cook	Cashier					
4.	PAID					ORDER_PAID			PAYMENT_RECEIVED			msgHereIsReceiptInvoice			Invoice					Cashier			Customer/Cook				
5.	PAYMENT_RECEIVED		1					ORDERING					msgFulfillOrder					Order					Cashier			Worker			

6a.	ORDERING				TOLD_TO_FULFILL		VALIDATING					msgCustomerOrderReady			Order					Worker			Customer		
7a.	VALIDATING				ORDER_READY			VALIDATED					msgInvoiceValidation			Invoice					Customer		Worker					
8a.	VALIDATED				1					DONE						msgHereIsCustomerOrder			Order					Worker			Customer				

6b.	ORDERING				TOLD_TO_DELIVER		DELIVERING					msgDeliverOrderToCook			Order					Worker			DeliveryTruck			
7b.	DELIVERING				TOLD_TO_DRIVE		VALIDATING					msgCookOrderReady				Order					DeliveryTruck	Cook					
8b.	VALIDATING				ORDER_READY			VALIDATED					msgInvoiceValidation			Invoice					Cook			DeliveryTruck			
9b.	VALIDATED				1					DONE						msgHereIsCookOrder				Order					DeliveryTruck	Cook					


Item
	static enum EnumItemType = new enum {item possibilities}
	map from item type to price

Order
	static enum EnumOrderStatus {CARTED, PLACED, PAYING, PAID, PAYMENT_RECEIVED, ORDERING, DELIVERING, VALIDATING, VALIDATED, DONE}; //use states too?
	EnumOrderStatus mOrderStatus;
	Map<Item, Integer> mItems;
	Person mPerson;
	
Invoice
	Order mOrder;
	final int mTotal;
	int mPayment;
	boolean mPaid; //signed by the cashier


*Customer = MarketCustomerAgent
*Worker = MarketWorkerAgent
*Cashier = MarketCashierAgent
*Cook = MarketCookAgent
*DeliveryTruck = MarketDeliveryTruckAgent

{'fraction_non_alphanumeric': 0.0752635449865163, 'fraction_numerical': 0.008335376317724933, 'mean_word_length': 2.6266666666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1544181', 'n_tokens_mistral': 1803, 'n_tokens_neox': 1399, 'n_words': 358}