# An Intelligent System to Ensure Interoperability for the Dairy Farm Business Model
## 5 Collaborative Negotiation System
### Negotiation Model
#### 5.2.2 Coordination Components in Closed Environment  
The Outsrc component is the major component that initiates the negotiation. Therefore, starting from the object of negotiation, the initiation of an automatic negotiation is done by creating an instance of the Outsrc. Furthermore, this component will build the negotiation graph according to the negotiation requirements (i.e., evaluation and creation of offers and counter-offers). Negotiation requirements are met by Outsrc by manipulating Xplore primitives [46]. In addition to these functionalities, the Outsrc must interpret and verify the negotiation constraints that are defined in the following two data structures: Negotiation Object and Negotiation Framework. The Negotiation Object provides information on the possible values of the attributes to be negotiated. Based on this information, Outsrc verifies whether the offers received refer to the attributes negotiated in the current negotiation and whether they are associated to the values of the specified range. For instance, assuming that the price attribute set in the Negotiation Object must be in the range of 50k < price < 100k, the Outsrc will stop the negotiation in the white nodes in which the offers are outside the specified range. Moreover, Outsrc coordinates the transactional aspect of the negotiation at the mid-dleware level. Its main role is to set an agreement between the component instances participating in the same negotiation. Another function of Outsrc is to execute the negotiation tactic defined in the Negotiation Framework by connecting the different instances of the other components. The Insrc component is the main component that manages the negotiation for a guest partner. While Outsrc has a complete image of the ongoing negotiations, Insrc has only the image of its own negotiation. In addition, at the beginning of the negotiation, this component has no information about what is being negotiated or about the constraints imposed by its own manager. Thus, unlike Outsrc, which has information from the beginning about the constraints defined in the two data structures (i.e., Negotiation Object and Negotiation Framework), Insrc communicates with its own manager about the new aspects required in the negotiation. Therefore, depending on the attributes defined by the initiator of the negotiation, Insrc is able to progressively build data structures that describe the Manager's preferences regarding the object of the negotiation and the negotiation framework. The main functionality of the Block component is to coordinate the negotiations in which the task must be entirely performed by a single partner. In this regard, the Block's major role is to mediate the negotiation between the initiating DF and all the other DFs that are invited to the current negotiation. The purpose of mediation is to establish a contract regarding the performance of the entire task by a single partner. In this respect, Block manages the constraint of not dividing the subcontracted task into distinct parts. In order to exemplify the operation of the Block component, we consider a negotiation initiated by the DF1 dairy farm and three other guest dairy farms (DF2, DF3, and DF4). In this context, the negotiation will start by initializing the Outsrc component of DF1. In order to fulfil the constraint regarding the accomplishment of the subcontracted task by a single dairy farm, Outsrc will invite the Block component in the negotiation. Next, Block connects to the Insrc component of each dairy farm (DF2, DF3, and DF4) and will manage the bilateral negotiations with them at the same time. The process of interaction among participants begins when all components are connected. During this process, the Negotiation Agent of each DF involved in the negotiation begins to generate and to exchange offers and counteroffers for the task-in-progress. The negotiation ends when DF1 reaches an agreement with one of the participants (e.g., DF2) on the set of attributes that describe the negotiated task.