# An Intelligent System to Ensure Interoperability for the Dairy Farm Business Model
## 6 Negotiation Scenario
Therefore, at the middleware level, the negotiation interactions correspond to the creation in the negotiation graph of three white nodes (i.e., nodes 2, 3, and 4) managed by the Outsrc component of DF1 (Figure 10). Further, these interactions are propagated as the creation of a white node in each negotiation graph managed by the Insrc component of each guest, DF2, DF4, and DF6 (Figure 11). The three guests have their own (partial) copy of the complete negotiation graph but no information about each other in the negotiation process. The negotiation process is described below:  
* The NegA of the initiator DF1 sends the negotiation proposal to NegAs of the three invited dairy farms. The negotiation proposal is described by the following attributes: (quantity = 1000, delay <= 5, Fat >= 3, animal = ovine). * The NegAs of the three guests look in the common ontology for the attributes to be negotiated (Figure 1). For example, for the animal = ovine, they find two values sheep and goat. Once they have understood all the attributes to be negotiated, NegAs will consult their managers, and they will generate various counterproposals. * Subsequently, these counter-proposals are communicated with the help of the Insrc components of the three guests (DF2, DF4, and DF6) by opening the nodes in their own negotiation graphs, as well as in the graph managed by the Outsrc component of the initiator DF1. * The negotiation continues until the initiator DF1 decides to accept a negotiation offer made in a white node by one of the three partners. * Given the coordinated constraint of the Block component, namely that the entire quantity of dairy products to be purchased from a single partner, the initiator NegA must choose a single negotiation offer. * In the proposed scenario, the two partners, DF4 and DF6, propose the same offer in white nodes 10 and 13, respectively. In this case, the initiator NegA will retrieve the satisfaction degree of both dairy farms by querying its in-memory table; then, NegA will choose the partner with the highest satisfaction factor. Taking this into account, NegA will accept the offer made by the partner DF4 in the white node 10 since \(\sigma_{\text{CK},3}=73\%\), while DF6 has \(\sigma_{\text{CK},1}=51\%\). At the same time, the initiator NegA will reject all other proposals from the other white nodes. \begin{table}
\begin{tabular}{l l l} \hline \hline \multicolumn{3}{c}{**Negotiations between the Initiator DF1 and Three Guests DF2, DF4, and DF6**} \\ \hline Step1: DF1: Open node 0 (white); assert(Quantity = 1000, Delay \(<\) 5, Fat \(>\) = 3, Animal = Ovine); request(Price); request(Delay); request(Fat); request(Animal) & Step2: DF1: Open node 1 (black) \\ \hline \multicolumn{3}{c}{**Negotiation between DF1 and DF2**} & \multicolumn{1}{c}{**Negotiation between DF1 and DF4**} & \multicolumn{1}{c}{**Negotiation between DF1 and DF6**} \\ \hline Step3: DF1: Open node 2 (white); connect (2, DF2, Block) & Step3\({}^{\prime}\): DF1: Open node 3 (white); connect (3, DF3, Block) & Step3\({}^{\prime\prime}\): DF1: Open node 4 (white); connect (4, DF4, Block) \\ Step4: DF2: Open node 5 (black) from 2 & Step4\({}^{\prime}\): DF3: Open node 8 (black) from 3 & Step4\({}^{\prime\prime}\): DF4: Open node 11 (black) from 4 \\ Step5: DF2: Open node 6 (white) from 5; assert(Price = 60; Delay = 5; Fat = 3; Animal = Sheet) & Step5\({}^{\prime\prime}\): DF4: Open node 12 (