Agent based coordination protocol for system of cyber-physical systems

Nowadays, society and business rely heavily on Information and Communication Technology (ICT) systems, which are progressing faster than ever. To stay on pace with them, focus is shifted towards integration of individual ICT systems into complex systems, which offers more functionality than simply the sum of individual systems. In this regard, Cyber-Physical Systems (CPSs) have gained significant importance and System-of-Systems (SoS) approach has been suggested for modeling complex CPSs to achieve a higher level goal, by dynamically building a large system with existing autonomous, and heterogeneous constituent systems (CSs). An important challenge in a system of Cyber-Physical Systems (SoCPSs) is to develop seamless collaboration between autonomous constituent-CPSs (CCPSs) to coordinate their operations. In this paper, we propose an agent based coordination mechanism to coordinate resource allocation and demand in SoCPSs. The approach models each CCPS as an agent and describes how multiple autonomous CCPSs, i.e., Virtual Power Plant (VPP), Commercial Greenhouse Growers (CGGs), communicate and collaborate with each other asynchronously through negotiation and how potential conflicts between CCPSs with conflicting goals are resolved. The efficacy of the proposed mechanism is validated through simulation of different real-world acyclic SoCPSs topologies. The results show that proposed approach is able to balance the individual requirements of multiple connected CPSs while achieving SoCPSs’ mission.


Introduction
The past few decades have given us enormous Information and Communication Technology (ICT) innovations with a clear indication that ICT advancements will continue at a rapid pace. To maintain the pace of the progress and the need for low cost, efficient and more capable systems, has led to a shift in focus towards the integration of independently developed ICT systems into a more complex system, which offers more functionality and performance than simply the sum of the individual systems (Bartocci et al. 2014). Besides functional benefits, there are some major concerns and challenges in complex systems which need to be taken into consideration, i.e., heterogeneous interacting entities; interaction and coordination of autonomous entities with conflicting goals; adaptivity to changing environments (San Miguel et al. 2012). In this regard, the concept of Cyber-Physical Systems (CPSs) has gained a significant importance in recent years. CPSs combine computational algorithms and communication with physical processes and act independently or co-operatively as part of a larger systems (Lee 2008). A CPS may represent entities with complex nature i.e., comprising multiple conflicting local objectives. The optimal design and operation of a CPS require these multiple objectives to be coordinated locally and a support for decision making among conflicting objectives.
Resource allocation in CPS forms an important part of coordination and the allocation of resources in a system combining several autonomous-yet-interacting CPSs is quite challenging, if 1) resources are shared, 2) resources varies over time, 3) overall system evolves over time. This fosters a need to design smart and resource-efficient systems, which must provide effective allocation of resources to its resource-consuming processes to avoid suboptimal system performance due to imbalances between demand and allocation. To achieve this, coupling of system components is required in order to enable communication between components to exchange, collect and process information.
In order to cope with the growing complexity of advanced CPSs, the System-of-Systems (SoS) engineering approach has been proposed in literature for modeling complex CPSs (Zhang 2015). SoS is a collection of multiple, heterogeneous and autonomous constituent systems (CSs), which are networked to achieve a certain higher goal (Damm and Vincentelli 2015). SoS exhibits emergent behavior due to the interactions between CSs, which are connected by shared resources. To achieve such physical-cyber integration and emergent behavior, both CPS and SoS paradigms exhibit a set of properties, which correspond to the complexity and requirements defined by a system comprising multiple autonomous CPSs, i.e., a System of Cyber-Physical Systems (SoCPSs) where individual and heterogeneous CSs form individual CPSs, each representing an autonomous physical entity to fulfill dedicated tasks. In union, these CPSs form a SoCPSs that generates unique properties, referred to as "emergent properties", which do not belong to any constituent-CPS (CCPS) but actually appear due to the interaction of individual CCPSs. In the context of SoCPSs, where one CCPS consumes a resource allocated by another CCPS, the emergent behavior is described as the "cumulative effect" of the interactions between CCPSs with respect to demand and allocation of resources in that SoCPSs. The resource allocation emerges as a result of individual decisions of CCPSs and the sequence of interactions between the CCPSs subject to demand and availability of resources.
An important challenge with respect to the integration of autonomous CCPSs in a SoCPSs is to develop seamless collaboration such that CCPSs collaborate and influence each other towards global goals, while respecting their individual goals. To this end, this paper seeks to address the following research question, "How can we coordinate the demand and allocation of shared resources in SoCPSs to engineer an emergent behavior that meets the performance requirements of the SoCPSs' objectives, while complying with the performance requirements of the individual CCPS".
The main contributions of this work are, 1) a meta-model which describes a SoCPSs design concept as well as the design of its CCPSs, 2) an intra-constituent agent (intra-CA) optimization model, which handles internal decision making process of each CCPS, and maintains its autonomous behavior, 3) an inter-constituent agent (inter-CA) negotiation model, which facilitates the interaction between CCPSs in order to coordinate interdependent actions belonging to different CCPSs, 4) a conflict resolution method for solving conflicts between goals of CCPSs.
The remainder of this paper is organized as follows. Related work section provides an overview and evaluation of literature. Proposed approach section describes the approach to address the research problem. Case study section presents a case study for the experiments. Experiments section presents experiments and results to validate the proposed approach. Finally, the conclusion section draws conclusion about the presented research.

Related work
The stated research problem spans multiple research areas. As a consequence, several areas, i.e., SoS coordination, cooperative coordination and control, and MOMI negotiation strategies are taken into consideration from the existing literature.
The SoS coordination strategies cover the methods for coordinating the CSs of an SoS in order to meet SoS mission. The authors in (Fang and DeLaurentis 2015) proposed a coordination approach based on approximate dynamic programming and transfer contract mechanism to facilitate hierarchy of stakeholders to reach an agreement with conflicting interests and budget constraints. The approach tries to avoid budget violations but stakeholders might end up in a situation where budget requests violate budget constraints. The authors in (Barnes II et al. 2017) presents classification and analysis of coordination strategies (centralized, hierarchical, peer and decentralized) for coordinating CSs in an SoS. None of the coordination strategies account for the fact that each CS may have internal conflicting objectives negotiating over several decision variables. A price-based coordination of constrained SoS is proposed in (Wenzel et al. 2017), where a chemical production site comprises multiple autonomous production plants. The price and resource utilization vectors are exchanged among centralized coordinator and production plants to coordinate shared resources.
Cooperative coordination and control strategies are used to solve cooperative control problems, where the individuals in the group share a common goal and act according to the mutual interest of the group (Beard et al. 2006). These approaches can be roughly classified as leader-follower approaches and leaderless approaches. In leaderfollower approach (Pasqualetti et al. 2008;Sugar and Kumar 1998), the leader pursues the group objective and followers are supposed to follow their leader. The approach compromises over autonomy and does not consider cases where followers' objectives may be in conflict with each other or with the group objective. In leaderless approaches (Khazaei and Nguyen 2017;Ren et al. 2005), the agents try to achieve the group objective without any leader and cooperate through a coordination variable, which is the minimal amount of information to be shared among members of the group.
Negotiation protocols focus on finding a trade off and good compromise among noncooperative agents with conflicting interests. The authors in (Aydoğan et al. 2014;Fujita et al. 2012;Klein et al. 2003) proposed mediator based protocol, where agents evaluate proposals proposed by a Mediator and announce their decision such that Mediator is able to find a final contract, which maximizes the social welfare. However, the approach is limited to handle negotiation between agents representing simple entities and it does not provide conflict resolution in case agents pursue constrained objectives. In (Clausen et al. 2017), a Multi-Agent System (MAS) based design of a Virtual Power Plant (VPP) constituting complex and heterogeneous Distributed Energy Resource (DER), is proposed, which enables synchronous bilateral negotiation between VPP and DER to coordinate Load Management (LM) actions of DER.
To the best of our knowledge, none of the existing SoS coordination strategies account for the fact that CSs are complex entities with several internal, conflicting objectives negotiating over several decision variables, which may end up with conflicts, and thus do not handle complex CSs. While some cooperative coordination and control strategies use unselfish and cooperative agents to reach consensus, i.e., maximize the group objective. Therefore, it is necessary to focus on self-interested agents rather than cooperative agents to solve real world complex problem scenarios. Furthermore, leader-follower approaches seem infeasible for solving our research problem as autonomy is compromised and consumers are required to follow the allocation made by resource domain.
Negotiation strategies have mostly focused on solving MOMI negotiation problem involving interdependent issues distributed among simple entities, while disregarding that agents are complex entities and MOMI problems may span over complex control domains. They also lack in modeling the emergent behavior of the overall system and handling scenarios, where agents' preferences may change over time and where agents cannot reach an agreement. Therefore, coordination mechanism is proposed, that unifies the properties of SoS coordination strategies, cooperative coordination and control strategies, and negotiation protocols, to engineer an emergent behavior that meets the performance requirements of the SoCPSs' objectives, while complying with the performance requirements of the objectives of the individual CCPSs.

Proposed approach
The agent-based coordination and control mechanism proposed here for coordinating the allocation and demand of multiple autonomous-yet-interacting CPSs constitutes meta-model of SoCPSs, intra-constituent optimization model and an inter-constitution negotiation model (Umair 2018), described as follows.

Meta-model of system of cyber-physical systems
The meta-model of SoCPSs comprises three levels, i.e., strategic level, tactical level and perceptual level as shown in Fig. 1. Each of the levels is described in the following subsections.

Strategic level
The strategic level captures the "big picture" view of SoCPSs and defines strategic goals, which a SoCPSs strives to achieve. A SoCPSs comprises a network of multiple instances of CPSs, which exhibit the properties of both CPS and SoS, and perform seamless collaboration to fulfill an overall purpose of the system as shown in Fig. 1. A SoCPSs is defined as a collection of N (CCPSs), as SoCPSs ¼ ⋃ N i¼1 ðCCPSÞ i . A SoCPSs has a set of n Strategic Goals (SGs) to achieve, which represent the desired emergent behavior of the overall system. This is a consequence of SGs in connected CCPSs, which may represent individual goals or goals of coordinating other CCPSs with respect to resources. This is defined as, SG (SoCPSs) = {SG (1, SoCPSs) , SG (2, SoCPSs) , …, SG (n, SoCPSs) }. The examples of SGs in a commercial domain might include reduce energy consumption, maximise comfort etc.

Tactical level
The tactical level includes actions aiming to accomplish CCPSs as well as SoCPSs' goals. Each CCPS constitutes a complex entity and therefore defined as a tuple: The CCPS is associated to the solving of a set of SGs. Each of the CCPSs has a set of m Tactical Concerns (TCs), which it implements, in order to accomplish its SGs, defined as TC (CCPS) = {TC (1, CCPS) , TC (2, CCPS) , …, TC (m, CCPS) }, where TC (CCPS) ≠ ∅. An SG can be accomplished by implementing either single or multiple TCs. For example the SG of maximising comfort in a commercial domain requires implementation of multiple TCs with respect to temperature and CO 2 levels in order to accomplish comfort. The set of TC (CCPS) in CCPS negotiates over issues to achieve their SGs. The issue represents a decision point over a resource, the value of which is negotiated by one or several TCs. The set I (SoCPSs) defines the set of p issues in SoCPSs as, I (SoCPSs) = {I (1, SoCPSs) , I (2, SoCPSs) , …, I (p, SoCPSs) }. Each TC i , where TC i TC (CCPS) , may negotiate over a subset of these. Specifically, each TC i is allowed to negotiate over the set of issues, I (CCPS) and I (CCPS) ≠ ∅, belonging to CCPS. This means that the successful operation of a complex CCPS requires TCs to be optimized locally such that a CCPS is able to make a local decision over several issues. The internal decision making process of each CCPS is described in next section. We define a TC as a function of I and N as, TC = f(I TC , N TC ), where I TC = {I 1 , I 2 , I 3 , …, I r } represents the set of r issues, over which TC negotiates and N TC = {N 1 , N 2 , N 3 , …, N q } represents the set of q inputs which a TC may have. R (CCPS) (TC (CCPS) ), represents the relative importance of TCs towards each other within a CCPS. The TCs in each CCPS might have different significance relative to each other. For e.g., a TC pursing an SG of achieving an uninterrupted light hours during the day in a commercial domain, seems to be relatively more important than a TC pursuing an SG of minimizing energy consumption. In this kind of situation, it is necessary to ensure the satisfaction of relatively more important TC before the satisfaction of relatively less important TC, to guarantee correct behavior of the system. To achieve this, the notion of relative importance is introduced, where we define the relative importance of each TC towards every other TC in each CCPS, i.e., for a specific pair (TC i , TC j ), a TC i can be either relatively more important, relatively less important or equally important to TC j . The notion of relative importance determines the ordering of TCs, which is utilized in the decision making process of CCPS.

Perceptual level
The perceptual level involves different types of knowledge that a CCPS perceives from the environment, to pursue respective SGs. An input is an abstraction used to represent, 1) a preference input, a TC has, to define its preference, 2) a sensory input that comes from a sensor, 3) a weather forecast or electricity price input that comes from external entities. A preference input can be constrained or unconstrained. A constrained input imposes some conditions or restrictions on the values assigned to issues, which values must conform to, whereas an unconstrained input does not impose any condition or restriction on the values assigned to issues, which values must conform to.
In order to meet the overall SoCPSs objectives, while respecting the objectives of individual CCPSs, the operations of CCPSs need to be coordinated. We model a SoCPSs as a MAS where each CCPS is modeled as an agent, constituent agent (CA), meant to achieve SGs associated with CCPS. Each CA is an autonomous complex entity, which pursues a set of TCs, settles down a subset of issues I (CPSoSs) with peers (connected CAs) through negotiation. To this end, the Inter-Constituent Tactical Concerns (ICTCs) are introduced within each CA to represent the connected CAs in order to enable seamless collaboration between CAs constituting MAS. This is needed when one CA needs resources owned by another CA. To preserve autonomous behavior in each CA in this context, relative importance is used, to ensure that a CA is able to carry out its dedicated task regardless of other CAs, while striving to achieve SGs of the MAS.
We define an ICTC as a function of I and N with the unique property that its minimizing function has a negotiable preference input. A preference input can be nonnegotiable or negotiable. A non-negotiable input cannot be negotiated during negotiation, for example a TC in a commercial domain, has an input of achieving an uninterrupted light hours in an interval (Federal Energy Regulatory Commission 2020; Damm and Vincentelli 2015; Bartocci et al. 2014;Fang and DeLaurentis 2015;Fujita et al. 2012;Khazaei and Nguyen 2017;Klein et al. 2003;Lee 2008;Munroe and Luck 2004) during the day. A negotiable input can be negotiated during negotiation, for example output of the connected agent A 1 . This input may serve as a resource for the TC in the agent A 2 , defined as, ICTC = f(I ICTC , N ICTC ), where, I ICTC represents the set of issues, over which ICTC negotiates and N ICTC represents a negotiable preference input of ICTC. The negotiation between CAs is described in inter-CA negotiation model subsection in detail. A notion (mutual dependence) described by (Sichman et al. 1998), is adopted to coordinate the operations of connected CAs through ICTCs. The ICTCs of each CA require resources that do not belong to its own set of resources/actions and depend on CAs, which it is connected to, in order to coordinate interdependent actions to achieve a common goal. With regards to MAS, we took a bottom up approach, by first explaining the internal mechanism of an individual CA, and later explaining how individual CAs are networked to collaborate with each other to achieve MAS mission. To this end, intra-CA optimization model and inter-CA negotiation model are proposed. The internal decision making of CAs is described via intra-CA optimization model, whereas communication and collaboration between CAs constituting MAS is described through inter-CA negotiation model.

Intra-constituent agent optimization model
Each CA is considered as an independent system and defines a MOMI optimization context consisting of m TCs, who negotiate over a set of r issues, I TC = {I 1 , I 2 , I 3 , …, I r }. The optimization context has a Mediator, which is responsible for managing the optimization process. In step 1, the Mediator uses a Multi-Objective Genetic Algorithm (MOGA) to generate random population of contracts. Each contract C contains a value for each of the issues to which one or more TCs in the CA has interest, and the Mediator will suggest this population of contracts to the TCs for evaluation. To this end, each TC provides a method, evaluate(), which takes a contract as an argument, and returns a cost-value as an evaluation of the contract. The cost function of each TC evaluates TC's preference in the form of a vector towards the contract or more specifically, a subset of issue values in each contract that the TC has interest in. Then in step 2, the TCs assign cost values to all contracts in the population. Each TC t will then respond with a cost q t, C which describes how well a given contract C fits the preference input of the TC t. In step 3, the Mediator selects the subset of contracts, which will act as a basis for generating the contracts for the next iteration. In order to select this subset of contracts, the Mediator applies the Pareto criterion, which filters out all the dominated contracts from the current population and keeps only non-dominated contracts. In step 4, the Mediator evolves the non-dominated population of contracts by performing crossover and mutation on randomly selected contracts in the Pareto set. The crossover operator makes sure that the new contracts inherit characteristics from parent contracts and the mutation operator maintains diversity in the population of contracts. Here, step 2 is executed again and the generated contracts are added to the Pareto set, if they fulfill the Pareto criterion. This process is repeated from step 2 to step 4 until a termination criterion is met. At termination, the Mediator selects a final contract which maximizes social welfare.

Selection of final contract
Each CA may have TCs with conflicting preferences. In case of conflicting preferences, optimization process does not end up with one optimal contract across all the TCs. In fact, multiple contracts (trade offs) exist on the Pareto front P f . The Mediator in each CA is then responsible for selecting a final contract from the Pareto front in order to find a good compromise among TCs. In order to ensure social welfare among the TCs within each CA, which is considered as a suitable metric for assessing system performance (Chevaleyre et al. 2005), the Mediator employs cardinal preference aggregation mechanism based on Social Welfare Orderings (SWOs). There exists several SWO methods to measure social welfare among TCs, namely utilitarian, egalitarian, elitist, Nash product, median rank dictator, leximin ordering, approximated fairness, fairness analysis, quantitative fairness and entropy explained in (Umair et al. 2019;Clausen et al. 2020). Before applying the selection criterion based on SWO, the cost of each TC t is normalized for each contract C in the Pareto set P f . The TCs participating in the optimization context, negotiate over a set of issues, which may belong to different domains and ranges of these issues may differ from each other. It is important to normalize the cost of TCs for each issue to a continuous range with upper and lower bounds, otherwise TCs' cost with different scales/ranges will not contribute equally in the selection of final contract. In this regard, 0-1 scaling is used to normalize TCs' costs, defined as q 0 ðt;CÞ ¼ ðq t;C −q t; min Þ ðq t; max −q t; min Þ . The minimum and maximum values are extracted from the non-dominated population of contracts P f for each TC t, in order to normalize its cost, defined as, q ðt; minÞ ¼ min returned by all TCs for each issue range from 0 to 1. This specific way of normalization, where costs are normalized with respect to TCs as opposed to a global value, ensures that we are not forced to compare values which are not intercomparable. That is due to the fact that values are defined in the 0-1 range depending on the area expanded in the given TC domain. After normalization, we apply the selection criterion based on SWO, in order to select the final contract. The selection of appropriate SWO depends on the behavior we expect from the system.

Relative importance of tactical concerns
The TCs in each CA might have different significance relative to each other. For example a TC pursing an SG of achieving an uninterrupted light hours during the day in a commercial domain, seems to be relatively more important than a TC pursuing an SG of minimizing energy consumption. In this kind of situation, it is necessary to ensure the satisfaction of relatively more important TC before the satisfaction of relatively less important TC, to guarantee correct behavior of the system. To achieve this, the notion of relative importance is introduced, where we define the relative importance of each TC towards every other TC in CA, i.e., for a specific pair (TC i , TC j ), a TC i can be either relatively more important, relatively less important or equally important to TC j . The notion of relative importance determines the ordering of TCs, which is carried out in the following way. Initially, the TCs are sorted based on relative importance of each possible pair of TCs towards each other. In result, a sorted list of TCs is generated and the first TC in the sorted list is assigned the highest rank. Each pair of consecutive TCs, i.e., current and immediate previous, in the sorted list is then traversed. This is followed by the step, where the relative importance of each pair of consecutive TCs is fetched. The fetched values are then compared to determine the ranks of rest of the TCs. If the relative importance of consecutive pair of TCs (TC i , TC j ), towards each other is equal, then TC j will be assigned equal rank as that of TC i otherwise TC j will be assigned lower rank as compared to TC i . This process is repeated until all TCs are assigned ranks. To select the final contract, we incorporate the notion of relative importance to the selection criterion based on SWO. The selection mechanism will now guarantee the selection of a final contract, which satisfies TCs with higher rank before it satisfies TCs with lower rank in the hierarchy.

Inter-constituent agent negotiation model
To address the problem of coordinating allocation and demand of shared resources in a SoCPSs, the autonomous CAs must collaborate with each other, to achieve an overall system goal, while adhering to their individual goals. To make this happen, the operations of autonomous CAs need to be coordinated through negotiation. The proposed multi-party cooperative coordination mechanism enables multiple asynchronous bilateral negotiations between connected CAs. The negotiation process is based on a proposal/counterproposal-protocol, shown in Fig. 2, where the resource-CA and consumer-CA exchange plans for resource allocation and resource demands respectively. To facilitate this, the autonomously running CAs activate the ICTCs, to weave the negotiation with their connected CAs. The activation of ICTCs will leverage CAs' capabilities to perform not only intra-CA optimization but also support bilateral negotiations with their connected CAs. The initial connection between resource-CA and consumer-CA is established by the consumer-CA.
Initially, the consumer-CA calculates a demand proposal based on an intra-CA optimization among its TCs, explained earlier in intra-CA optimization model subsection. In addition to the activation of ICTCs, the Mediator in each CA has now the responsibility of selecting the best candidate contract (demand/allocation proposal) in each iteration of intra-CA optimization.
To select the best candidate contract, the selection mechanism based on the notion of SWO and relative importance is employed. During inter-CA negotiation, the relative importance of CA-specific TCs is higher than the relative importance of ICTCs. This implies that the best candidate contract complies with the SGs of the respective CA while adhering to the SGs of connected CA. Once the best candidate contract is Fig. 2 Inter-CA negotiation illustration selected in consumer-CA, it is then communicated as a negotiable preference input for the ICTC in resource-CA. In response, resource-CA calculates a counter allocation proposal in a similar fashion as did by consumer-CA, while taking into consideration the demand proposal communicated by consumer-CA. The counter allocation proposal is then sent back to the consumer-CA via ICTC of consumer-CA. In case the agreement is not reached between resource-CA and consumer-CA, i.e., the proposed allocation plan does not match the proposed demand plan, each CA checks the termination condition. If termination condition is not met yet, the control in each CA goes back to initial step, which leads to generating and exchanging a new set of proposals for resource allocation and demand plans through ICTCs. As the inter-CA negotiation evolves, the negotiable preference input of ICTCs changes to reflect the updated perspective of the connected CAs in each CA. In this way ICTCs ensure that the preferences of connected CAs are represented in each iteration of intra-CA optimization, yielding a system capable of performing intra-CA optimization as well as inter-CA negotiation. Due to back and forth exchange of proposals, consumer-CA and resource-CA influence the internal operation of each other in order to narrow down their differences and achieve common inter-CA goal (allocation = demand) through their respective ICTCs (Umair et al. 2015). Hence, due to mutual dependence, collaboration regarding inter-CA goals has happened which helps to achieve equilibrium between connected CAs and thus the SoCPSs. This process is repeated until negotiating CAs reach an agreement or the allowed inter-CA negotiation period times out. In case of agreement, the final contract (demand/allocation) selected by Mediator in each CA, is executed. While in other case, where CAs do not reach an agreement and negotiation time is over, it is necessary to ensure that negotiating CAs always reach an agreement in case where conflict of preferences exists. This could happen in a situation where resources are constrained and consumer-CAs require more than available resources. Here, one of the negotiating CAs in bilateral negotiation must make concession on issues under negotiation. In this regard, the proposed approach supports conflict resolution based on local reasoning of each CA, to guarantee that connected CAs finally reach an agreement. Therefore, in each CA, Mediator resolves the conflict and selects the final contract.

Conflict resolution
A conflict is a clash between the SGs of the connected CAs constituting SoCPSs. To resolve the conflict, we apply the notion of non-social (resource) dependence to the negotiation object, i.e., issue, which is dependent on a resource, within each consumer-CA. By resource-dependent issue we mean that, the values that issue takes on constitute the use of the resource, i.e., electricity (Munroe and Luck 2004) . A resource-dependency can be constrained or unconstrained. We have modeled constrained and unconstrained resource dependence relation between connected CAs in terms of constrained and unconstrained preference inputs. A CA with an ICTC, having a constrained preference input means that CA will follow resource allocation made by its peer CA strictly. On the other hand, a CA with an ICTC having an unconstrained preference input means that a CA is allowed to use resources as much as it needs.
In order to distinguish between constrained and unconstrained preference inputs, we therefore define the notion of relative importance based on another factor, i.e., preference importance factor, which defines the ordering of the TCs within each CA in a similar fashion as that of relative importance factor in the section above. The only difference is the ordering criterion, which is now based on relative preference importance of TCs towards each other, i.e., a TC with a constrained preference input is relatively more important than the one with an unconstrained preference input. The TCs with the same preference importance will be ranked based on their relative importance towards each other. The ranking of TCs is carried out by comparing the preference importance of consecutive pair (TC i , TC j ) of TCs in the sorted list. If the values matched with each other, TC j will be assigned rank based on the relative importance of TC i and TC j towards each other. Otherwise TC j will be assigned the rank, which is less than the rank of TC i . The same flow of operations will be performed for each consecutive pair of TCs. As mentioned earlier, during inter-CA negotiation, an ordering of TCs based on relative importance is used for selecting the best candidate contract. Similarly, when inter-CA negotiation ends, an ordering of TCs based on preference factor is used for selecting the final contract. At the termination of inter-CA negotiation, the Mediator in each CA uses preference importance factor to rearrange CA-specific TCs and ICTCs in a hierarchy, which will guarantee the selection of a final contract in each CA, which satisfies TCs with a higher rank before it considers TCs with a lower rank. This is how, the conflict resolution mechanism ensures the selection of a final contract from the population of contracts, that matches with the available amount of resources.

Asynchronous coordination
During bilateral communication, each CA communicates with its connected CAs asynchronously. The CA does not block waiting for a reply from its connected CA. Each CA uses the most recently received/updated information from the connected CA and proceeds further with its execution. In our proposed coordination mechanism, all CAs are continuously running. It is important to coordinate the activities of CAs in order to achieve overall SoCPSs goal. The CAs synchronize and coordinate their activities with their connected CAs based on the notion of input.
Initially, each CA performs intra-CA optimization and when it is truthful, it starts inter-CA negotiation, where it communicates with its connected CAs. A CA is truthful if the population is unchanged for 5 iterations and TCs with the highest relative importance return a cost 0 for the selected best contract. During inter-CA negotiation, if a CA reaches an agreement with any of its connected CAs, it is negotiating, it locks the issue values over which an agreement is made, and stops inter-CA negotiation with whom agreement is made. Meanwhile, it carries on its intra-CA optimization and also inter-CA negotiation with the connected-CAs, with whom an agreement is not made yet. The CA goes to a wait state and stops both intra-CA optimization and inter-CA negotiation in case it reaches an agreement with all of its connected CAs. If an input to any TC in a CA is changed, then all the issues related to that TC are unlocked. This also leads to re-initiation of intra-CA optimization process. The inter-CA negotiation may also re-initiate, if the negotiable preference input of any ICTC in a CA is changed.
A situation may arise, where a consumer-CA consumes multiple constrained and unconstrained resources in a way, that makes consumption of independent resources, interdependent i.e., the consumer may require a specific ratio between the amount of each resource allocated to it. In intra-CA optimization context, the dependencies among resources can be thought of as dependencies among issues, which represent resource dependent decision variables. To ensure the correct behavior of the system, the dependencies among resource-dependent issues within each CA should be taken into consideration and utilized, when issues are required to be locked in case of an agreement state between negotiating CAs. In this regard, we introduce the notion of issues' dependencies. Issue dependency in general is a result of multiple issues being linked through a TC. Issue interdependency then can span multiple CAs, if a TC n negotiates over a set of issues I n = {I 1, n , I 2, n , …, I q, n } such that one of the issues I c (I c ⊂ I n ), over which it negotiates, is also negotiated over by an ICTC with a constrained preference. In such cases, all the issues in I n are dependent on issue I c . This implies that the dependent issues in I n cannot be locked before the dependee issue I c is locked. This mechanism is necessary for the correct behavior of the system and ensures that, a consumer-CA cannot make an agreement with unconstrained resource-CAs, until it reaches an agreement with constrained resource-CAs, if the resources are dependent via some TC.

Autonomy
Each CA preserves its autonomy, i.e., the ability of a CA as part of a SoCPSs to make independent choices. Each CA operates and updates information on its own pace and has full control over its local decision making process, i.e., when to 1) initiate intra-CA optimization process, 2) stop intra-CA optimization process, 3) re-initiate intra-CA optimization process, 4) initiate inter-CA negotiation, 5) stop inter-CA negotiation and 6) re-initiate inter-CA negotiation. In the beginning, each CA initiates intra-CA optimization process in order to optimize CA-specific TCs. Once it achieves local convergence, then it truthfully communicates its preferences by initiating inter-CA negotiation. When a CA reaches an agreement with its connected CA during inter-CA negotiation, it makes a settlement with it and go ahead with its further execution without waiting for its connected CA to make settlement with other connected CAs. Consider a scenario where CA 1 is coupled with CA 2 and CA 3 . Assuming CA 2 reaches an agreement with its connected CA 1 . Meanwhile CA 1 is still negotiating with CA 3 and haven't reached an agreement with CA 3 yet. CA 2 will make a settlement with CA 1 , without waiting for CA 1 to reach an agreement with CA 3 as well. In this kind of situation both intra-CA optimization process and inter-CA negotiation process are stopped in CA 2 . The local convergence within each CA is valid until an input to any TC is changed. Similarly, the agreement made between two connected-CAs is valid until an input to their ICTCs is changed. Both intra-CA optimization process and inter-CA negotiation processes are re-initiated by an input change.

Case study
The concept of SoCPSs applies across various domains i.e., from energy to health care to defense systems to transportation. In this regard, a brief overview of CGGs and VPP is given in the context of SoCPSs, to be used as an example of SoCPSs for experimental validation of proposed approach.
CGGs play an important role in the production of ornamental pot plants and vegetables in Northern Europe. The production of plants depends on greenhouses because of low temperature and light conditions in the winter season. To ensure an environmental and production optimal operation, energy resources must be used efficiently and process performance must be considered (Kjaer et al. 2011;Kjaer et al. 2012). In this regard, focus is on concepts and technologies that facilitate both energy efficiency and process performance (Ma et al. 2020). In Denmark, CGGs account for about 1% of the national electricity consumption of which approximately 95% is used for artificial growth light. As large electricity consumers, CGGs are potential candidates in a DR context through LM actions (Christensen et al. 2020a;Christensen et al. 2020b). According to the Federal Energy Regulatory Commission, DR is defined as changes in electric usage by end-use customers from their normal consumption patterns in response to changes in the price of electricity over time, or to incentive payments designed to induce lower electricity use at times of high wholesale market prices or when system reliability is jeopardized (Federal Energy Regulatory Commission 2020). LM actions comprise peak clipping, valley filling, and load shifting (Clausen et al. 2014). There is a market opportunity for electricity consumers in participating in DR programs (Ma and Jørgensen 2018). This opportunity can be enhanced by participating in a VPP, as DR program requirements (and risks) are shared between all members of the VPP (Clausen et al. 2016). A VPP is a cluster of small and medium sized dispersed generator units, controllable loads and storage systems aggregated in order to represent them as a single entity within the grid (Clausen et al. 2017;Othman et al. 2015).
CGG can provide LM services by time-shifting the use of artificial growth light from one hour to another, either within the same day or the next day, without any negative effect on their growth as long as these hours are provided within the same or following days. The LM actions of CGGs can be aggregated into larger entities to constitute VPP, that are easier to integrate with grid management . In provision of DR events, VPPs are operated according to a set of local targets, e.g., minimization of generation cost, profit maximization, peak load reduction (Pudjianto et al. 2007). A specific example of a VPP is one, where a VPP propagates a DR event to a group of CGGs through LM requests as shown in Fig. 3. In response, the CGGs then employ local decision strategies to adapt their electricity demand to the LM requests. Specifically, the CGGs may employ a strategy for artificial lighting which adheres to production goals Fig. 3 Conceptual model of a VPP while considering the request for LM from the VPP. The CGGs may shift light hours to perform load shifting or increase the number of light hours to perform valley filling. The response from the CGGs contains their demand profile. The VPP then applies its own decision making to make counter proposals to the CGGs, in cases where demand does not equal allocation. Once demand does equal allocation, the DR event has been honored.

Experiments
The experimental validation of the proposed models is done through simulating different acyclic topologies which map to real-world SoCPSs. Several experiments have been conducted considering the case study, where SoCPSs is a collection of autonomous resource and consumer CPSs. Each CPS is represented by CA. The number of consumers and resources vary in each set of experiments. Each experiment is run 20 times to validate the efficacy of proposed approach and show resilience towards the potential random behavior sparked by the use of a GA. The number of negotiation rounds is set to 1000. This number is empirically determined for algorithm convergence.

Single resource and multiple consumers
The first set of experiments maps to an acyclic topology (Fig. (4a)), where a single resource-CA representing a VPP is connected to multiple consumer-CAs representing CGGs. In this set of experiments, two scenarios are simulated: One with unconstrained and the other with constrained resources to meet demand. The configuration of consumer and resource CAs is described below.

Experimental setup
Each consumer-CA has been modeled using three TCs, i.e., a production-TC (P-TC) which is a CA-specific TC pursuing a SG necessary to achieve the actual purpose of consumer-CA, an energy-ICTC (E-ICTC), which represents resource-CA in the consumer-CA and a minimize consumption-TC (MC-TC), which seeks to reduce the electricity consumption used to reach the production goal. Each set of TCs negotiate over a single issue reflecting a light plan. A light plan issue is a vector, l n = {l 1, n , l 2, n , … l t, n }, that describes when artificial light is on or off in the greenhouse for an entire day. The index {1, 2,…t} represents discrete time intervals expressed in hours. The value of Fig. 4 Acyclic topologies. a Single resource multi consumers b Multi resources single consumer c Multi resources multi consumers the time slot in the light plan issue l n is (on/off), which translates to the values 0 and 1. The P-TC negotiates over a light plan issue l n , to ensure that sufficient amount of artificial light is switched on to achieve the production goal. It has a non-negotiable preference, p n , which represents the amount of Photo Active Radiation (PAR) in MolSqrMeter, required to achieve the production goal. The weather conditions affect the contribution from artificial growth light during the day, i.e., the contribution is more when weather is cloudy, whereas contribution is less in case of sunny weather. To capture this, we introduce the coefficient vector for P-TC, v n = {v 1, n , v 2, n , …v t, n }, which represents the contribution from artificial light in each hour during the day. The cost function q n of P-TC is defined as, q n = | p n − h n |, where h n ¼ P t i¼1 ðv i;n Ãl i;n Þ. Each of the P-TC was given a preference of 400 MolSqrMeter. The coefficient vectors used for each P-TC are shown in Fig. 5. The E-ICTC represents the preferences of the resource-CA in the consumer-CA and negotiates over a light plan issue l n , used for artificial lighting. It has a negotiable preference, e n , which represents the energy allocation made by the resource-CA and is defined as e n = {e 1, n , e 2, n , …e t, n }. The E-ICTC is responsible for converting light plan suggestions into energy demand plans to calculate the amount of electricity needed to accommodate a given light plan. The conversion from the light plan to the energy demand plan is done by mapping energy demand for "off" hours in the light plan to 0 MWh in the energy plan, and "on" hours to an energy demand of 1 MWh. The assumption made here is that all lights are on at the same time and the installed lamp capacity is 1 MW in total. To capture this, we introduce a coefficient vector for E-ICTC, v n = {v 1, n , v 2, n , …v t, n }, of all 1's, which is multiplied to light plan issue l n , to get energy demand plan d n = {d 1, n , d 2, n , …d t, n } for artificial light.
The cost function q n of E-ICTC is defined as, q n ¼ P t i¼1 j e i;n −d i;n j. The MC-TC tries to minimize the amount of energy consumed in the consumer-CA. It negotiates over a light plan issue l n and has a non-negotiable preference vector, p n = {p 1, n , p 2, n , …p t, n }, of all 0's. The cost function q n of MC-TC is defined as., q n ¼ P t i¼1 j p i;n −l i;n j.
During inter-CA negotiation, the best candidate contract in each CA is communicated to the connected CAs in each negotiation round. To select the best candidate contract, the P-TC in each consumer-CA is assigned high relative importance as compared to E-ICTC and MC-TC, whereas E-ICTC has high relative importance in comparison to MC-TC. This configuration is chosen to exchange actual preferences of consumer-CAs through ICTCs during inter-CA negotiation. When the negotiation is over, the selection of final contract takes into account preference inputs of ICTCs. In Fig. 5 Coefficient vectors of consumer-CAs. a One consumer at t 0. b Two consumers at t 1. c Three consumers at t 2 case of unconstrained resources, ICTCs in each CA has unconstrained preferences. This is contrary to the case of constrained resources, where ICTCs in each CA has constrained preferences. Here, the ICTC in each consumer-CA will be assigned high relative importance compared to P-TC. This configuration ensures an agreement between connected-CAs in case of their conflicting preferences.
The resource-CA is modeled using an Aggregator-TC (A-TC), consumer-ICTC (C-ICTC) and consumer sum ICTC (C-ICTC sum ) for each connected consumer-CA. The TCs in the resource-CA negotiate over issues reflecting energy allocation plans, one for each consumer-CA. An energy plan issue is a vector, e n = {e 1, n , e 2, n , …e t, n }, that describes an hourly allocation of energy to the consumer-CAs for an entire day. The value of a time slot in the energy allocation plan issue e n is 0 or 1 MWh. The A-TC represents the need to change planned consumption of aggregated consumers based on market conditions or capacity constraints in the VPP and negotiates over the summarized energy allocation plan issues for all consumer-CAs, y ¼ P N n e n , to ensure that the combined allocation complies with the DR event. It has a non-negotiable preference input p = {p 1 , p 2 , …p t }, which constitutes an hourly DR event provided by external DR service, where t defines the number of time slots defined in the preference p. This is non-negotiable as we assume that the DR dispatcher cannot be influenced. The cost function q n of the A-TC is defined as, q n ¼ P t i¼1 j y i −p i j. The C-ICTC represents the preferences of the consumer-CA in the resource-CA. The C-ICTC negotiates over one issue, namely the energy allocation plan for the particular consumer-CA which it represents. The energy allocation plan issue for C-ICTC n ∈ N, where N is the number of C-ICTCs in the resource-CA, is defined as, e n = {e 1, n , e 2, n , …e t, n }, where t defines the number of time slots defined in the energy allocation plan issue. During inter-CA negotiation, each C-ICTC is assigned a negotiable preference, l n , which represents the current best candidate contract for the light plan of the consumer-CA, it represents. This is converted into an energy demand plan, d n using the same conversion method as the E-ICTC. The cost function q n of C-ICTC is defined as, q n ¼ P t i¼1 j e i;n −d i;n j . The C-ICTC sum seeks to ensure, that the correct amount of electricity is allocated for the consumer-CA it represents, regardless of the time it is allocated. This is introduced to favor sufficient allocation over in-sufficient allocation. It negotiates over the same issue as the corresponding C-ICTC. C-ICTC sum also has the same negotiable preference, d n , which represents the current best candidate contract for the light plan of the consumer-CA, it represents. The cost function of each C-ICTC sum is defined as, q n ¼j P t i¼1 e i;n − P t i¼1 d i;n j. As in the case of consumer-CA, to select the best candidate contract, the A-TC in the resource-CA is assigned high relative importance compared to the C-ICTCs and the C-ICTCs sum to ensure the truthful communication of preferences during inter-CA negotiation. The number of ICTCs in the resource-CA depends on the number of consumer-CAs connected to the resource-CA as one set of C-ICTC and C-ICTC sum is used for each consumer.

Baseline experiment results
The baseline experiment is used to show how the proposed coordination mechanism coordinates the allocation and consumption of shared resource in a dynamically evolving SoCPSs, where all the consumer-CAs will be allocated their requested demand. In order to simulate that the SoCPSs evolves over time and our proposed coordination mechanism is able to handle the allocation of shared resource among multiple consumer-CAs, the consumer-CAs connect to the VPP at different time instants. Figure 6 shows the results of this experiment. As can be seen, consumer-CA 1 connects to VPP at time instant t 0 (Fig. (6a)), consumer-CA 2 connects at time instant t 1 (Fig. (6b)), and consumer-CA 3 connects at time instant t 2 (Fig. (6c)). Before connecting to VPP, each consumer-CA computes its baseline demand profile. A baseline profile represents the optimal demand profile for consumer-CA. On receiving the baseline demand profile from each consumer-CA, the VPP creates an issue and two C-ICTCs for each consumer-CA, which negotiate over their respective issues. The baseline demand profile received from each consumer-CA, will be regarded as a negotiable preference input for their respective C-ICTCs and C − ICTCs sum in the VPP. This is done to reflect that consumer-CAs may adapt to the requests of the VPP. As a result, the aggregated baseline will be deduced live and an allocation profile that matches with the aggregated baseline demand profile is generated, if there is no LM request present. In this regard, the C-ICTCs and ICTCs sum for each consumer-CA also play their role and influence the intra-CA optimization process by negotiating over the issues, they are interested in. The C-ICTCs and ICTCs sum in the VPP will try to minimize the distance between their preference and issue values, they negotiate over. This is how, in case of no LM request, each consumer-CA is provided its preferred energy plan i.e. no change is forced upon the consumer-CAs and the aggregated demand profile corresponds to the aggregated baseline demand profiles. Each consumer-CA is able to achieve its production goal, i.e., 400 MolSqrMeter.

Peak clipping experiment results
This experiment illustrates how conflict is resolved between CAs, where conflict of preferences exists. Therefore, a scenario is simulated, where the VPP receives a DR event from a DR service, which requires modifications to the aggregated baseline profile. To this end, the negotiable preference inputs of E-ICTCs in each consumer-CA are Fig. 6 Results of baseline experiment defined as "constrained", whereas the negotiable preference inputs of C-ICTCs in the resource-CA are defined as "unconstrained". This is done to reflect that the operation of VPP is critical and in case of conflict, consumer-CAs must adapt to the allocation made by VPP. Figure 7 shows the preference input of A-TC in the resource-CA, which reflects the LM action peak clipping. The conflict can be seen at slot 11, where a DR event requires modification to the aggregated baseline demand profile, by providing 1 MW less energy, in order to clip the peak. This situation requires one of the consumer-CAs to shed its load in slot 11. All consumer-CAs initiate inter-CA negotiation with the resource-CA and communicate their truthful preferences during inter-CA negotiation. As can be seen in Fig. 8a, the resource-CA honors the DR event and allocates 1 MW less to one of the consumer-CAs, i.e., consumer-CA 3 in slot 11, whereas consumer-CA 3 follows its baseline demand profile and demands electricity in slot 11. This creates a conflict between the resource-CA and the consumer-CA 3 in slot 11.
As mentioned earlier, the proposed approach uses the notion of preference importance to resolve the conflict in order to ensure agreement state between negotiating CAs. As the E-ICTCs in the consumer-CAs, have a constrained preference, the E-ICTCs will have higher relative importance compared to rest of the TCs. Therefore the selection of a final contract in consumer-CA 3 will guarantee the satisfaction of E-ICTCs, before it considers the satisfaction of local TCs. This is how, consumer-CA 3 finally reaches an agreement with the resource-CA and made a compromise of 1 MW and achieved a production of 350 instead of 400, whereas rest of the two consumer-CAs achieve their production goal. Figure 8b shows the result after inter-CA negotiation with conflict resolution. As can be seen, the VPP executes LM actions while adhering to the energy demands of consumer-CAs. The aggregated demand profile of consumer-CAs is exactly equal to the aggregated allocation made by the resource-CA and this clearly indicates the state of agreement between negotiating CAs.
Hence, conflict is resolved through graceful degradation of the production requirements in the greenhouse under the assumption that accurate operation of the VPP is critical.

Multiple resources and single consumer
The second set of experiments maps to an acyclic topology (Fig. 4b), where a single consumer-CA is connected to multiple resource-CAs. A simulated CGG constitutes the consumer-CA, whereas VPP constitutes resource-CA 1 and a Water Service Supply (WSS) constitutes resource-CA 2. The greenhouse needs electricity for supplementary lighting as well as water, to ensure sufficient plant growth. In this regard, VPP is responsible for the allocation of electricity to the greenhouse in compliance to DR events, whereas the WSS is responsible for the allocation of adequate water to the greenhouse, while adhering to its capacity constraints. This set of experiments simulates a scenario, where the consumption of resources is interdependent, i.e., the consumer-CA requires a specific ratio between the amount of each resource allocated to it by resource-CAs. Here, one of the resources it consumes is constrained in terms of amount of resources consumed and time, at which the resources are consumed. The configuration of consumer and resource CAs is described below.

Experimental setup
The consumer-CA has been modeled using three TCs, i.e., a production-TC (P-TC), an energy-ICTC (E-ICTC), which represents resource-CA 1 in the consumer-CA and a water-ICTC (W-ICTC), which represents resource-CA 2 in the consumer-CA. There exists two issues reflecting a light plan and water plan. A light plan issue is a vector, l n = {l 1, n , l 2, n , …l t, n }, which describes when artificial light is on or off in the consumer-CA for an entire day. The value of the time slot in the light plan issue l n ranges from 0 to 2 MW, as we assume that lamps have multiple light intensity levels. A water plan issue is a vector, w n = {w 1, n , w 2, n , …w t, n }, that describes an hourly water demand for an entire day. The value of a time slot in the water plan issue w n is from 0 to 4 gal per hour. The P-TC negotiates over a light plan issue l n and water plan issue w n to achieve the production goal. The cost function q n of P-TC is defined as, q n ¼ P t i¼1 j 0:5− d i;n w i;n j if w i;n > 0; Max:Double otherwise ( which shows that a cost of 0 is returned for each hour in which a 2:1 ratio between energy allocation and water allocation exists. The configuration of E-ICTC is maintained as described in section above. However, in this set of experiments, E-ICTC has a "unconstrained" negotiable preference input. This implies that adequate amount of resources is available in the resource-CA 1.The W-ICTC represents the preferences of the resource-CA 2 in the consumer-CA and negotiates over a water plan issue w n . It has a "constrained" negotiable preference input, a n , which represents the water allocation made by the resource-CA 2 and is defined as a n = {a 1, n , a 2, n …a t, n }. This reflects a scenario where water is a limited resource (as opposed to electricity). The cost function q n of W-ICTC is defined as, q n ¼ P t i¼1 j a i;n −w i;n j . During inter-CA negotiation, the relative importance of P-TC is higher than E-ICTC and W- Fig. 8 Results of peak clipping experiment ICTC, whereas the relative importance of W-ICTC is higher than E-ICTC. At the termination of inter-CA negotiation, the relative importance of W-ICTC with a constrained preference, will be higher than E-ICTC and P-TC, whereas the relative importance of P-TC will be higher than E-ICTC. Both resource-CA 1 and resource-CA 2 are modeled in a similar way to the resource-CA described in single resource and multiple consumers subsection, using an Aggregator-TC (A-TC), and two ICTCs, consumer-ICTC (C-ICTC) and consumer sum ICTC (C-ICTC sum ) with "unconstrained" negotiable preference inputs, as a single consumer-CA is connected to each resource-CA. Here, the non-negotiable preference input of A-TC in resource-CA 2 represents an hourly WSS capacity.

Multi resource coordination (without issue dependence) experiment results
This experiment serves to highlight the resource-demand coordination problem, which arises when a consumer connected to multiple independent resources, consumes resources in a way that creates dependencies among resources and completely disregards consumption based resource interdependency. Figure 9a shows the initial hourly energy and water demand for the entire day in the consumer-CA. It can be seen that the water demand in each time slot is exactly double of the energy demand in the same time slot. This implies, that P-TC in the consumer-CA is fully satisfied and ensures that the preference of consumer-CA is truthfully communicated to the resource-CAs. Figure 9b shows the result of inter-CA negotiation of consumer-CA with its connected resource-CAs.
It can be seen that in slots 1, 2, 5 and 8, the final allocations made by resource-CA 1 and resource-CA 2 do not fulfill P-TC preference and ends up with an energy allocation which does not fully adhere to the ratio to achieve production in the hours needed in consumer-CA. Consumer-CA ultimately deviates from its preference in order to comply with constrained resource allocation. This experiment, disregards issues' dependencies, therefore in the beginning, when consumer-CA starts inter-CA negotiation with resource-CAs, it reaches an agreement with resource-CA 1 immediately, because resource-CA 1 is unconstrained and therefore it allocates the exact amount of energy demanded by consumer-CA. On reaching an agreement with resource-CA 1, both resource-CA 1 and consumer-CA lock their respective issues e n and l n . As a result, when resource-CA 2 makes water allocation for consumer-CA, while adhering to its capacity constraints, it creates a conflict with the light plan l n in consumer-CA, which already has been locked on reaching an agreement with resource-CA 1. This is why, P-TC in consumer-CA could not achieve the required ratio of energy to water demand and is forced to make a compromise over the allocated energy and water resources.

Multi resource coordination (with issue dependence) experiment results
This experiment shows, how the notion of issues dependencies helps to resolve multiresource coordination problem, highlighted in the previous experiment. In this experiment, we have employed the notion of issues' dependencies to resolve the problem such that consumer-CA is allocated its preferred amount of resources while complying with the constrained resource allocation. Considering issues' dependencies, the issue l n is dependent on an issue w n . That's why issue l n is not allowed to be locked before issue w n . In the beginning, when consumer-CA reaches an agreement with the resource-CA 1, both CAs stop inter-CA negotiation. Resource-CA 1 locks its respective issue e n but the consumer-CA does not lock issue l n due to that issue being dependent on issue w n , from the perspective of the consumer-CA. Meanwhile, resource-CA 2 makes water allocation for consumer-CA, while adhering to its capacity constraints. This leads to a conflict between water allocation plan and energy allocation plan. As a result, the P-TC in the consumer-CA, favors a light plan, which retains the correct ratio of energy to water demand. The consumer-CA communicates back the updated energy demand plan to the resource-CA 1.
On receiving an updated input, resource-CA 1 re-initiates intra-CA optimization as well as inter-CA negotiation. As resource-CA 1 is unconstrained, it allocates the exact amount of energy, that is recently demanded by consumer-CA. This allows consumer-CA to achieve the required ratio of energy to water resource. This is how, all CAs reach an agreement and the consumer-CA achieves its goal. Figure 10a shows the initial hourly energy and water demand for the entire day in the consumer-CA. Figure 10b shows the result of inter-CA negotiation of consumer-CA with its connected resource-CAs. It can be seen that the final allocations made by resource-CA 1 and resource-CA 2 fulfill the preference of P-TC (correct ratio of energy to water allocation), which is valid for achieving the production goal in the consumer-CA.

Multiple resources and multiple consumers
In third set of experiments, the acyclic topology of second set of experiments is extended to capture more complex topological structure (Fig. 4c), where multiple consumer-CAs are connected to multiple resource-CAs. Here CGG constitutes consumer-CAs, VPP constitutes resource-CA 1 and WSS constitutes resource-CA 2. The experiment shows that each CA has an autonomous control over local processes and performs asynchronous bilateral negotiation with its connected CAs. Each CA will stop inter-CA negotiation, when an agreement with its connected-CAs has been reached.

Experimental setup
The configuration of consumer and resource CAs is maintained as described in the section above. Consumer-CA 1 has two issues, i.e., light plan l n and water plan w n . Consumer-CA 1 is connected to resource-CA 2 to negotiate over w n . Similarly consumer-CA 2 has also two issues, i.e., light plan l n and water plan w n , and negotiates over both l n and w n with resource-CA 1 and resource-CA 2 respectively. Finally, consumer-CA 3 comprises two issues as well, i.e., light plan l n and water plan w n . Consumer-CA 3 is connected with resource-CA 1 to negotiate over l n .

Results
This experiment simulates a scenario where adequate resources are available with respect to the resource demand. This implies that ICTCs in each CA have "unconstrained" negotiable preferences. All consumer-CAs should reach an agreement with their connected resource-CAs without making any compromise over their production goals. Figures 11 and 12 shows the costs of TCs in each CA during inter-CA negotiation. It can be seen that the constituent-specific TCs in each CA, i.e., A-TC in resource-CAs and P-TC in consumer-CAs return 0 cost since beginning of inter-CA negotiation.
This implies that each CA truthfully communicates its preferences to the connected CA during inter-CA negotiation. It can also be seen that each CA took different number of inter-CA negotiation rounds to reach an agreement with its connected resource-CAs. This shows that each of the CAs performs autonomous bilateral negotiation at its own pace asynchronously.
As mentioned earlier, the resource-CA 1 is negotiating with consumer-CA 2 and consumer-CA 3. It can be seen in Fig. 12c that E-ICTC in consumer-CA 3 return 0 cost at negotiation round 30. This indicates that consumer-CA 3 reaches an agreement with its connected resource-CA 1, without waiting for resource-CA 1 to reach an agreement with consumer-CA 2 as well. Both intra-CA optimization and inter-CA negotiation processes are stopped in consumer-CA 3. Similarly, resource-CA 1 reaches an agreement with consumer-CA 3 at negotiation round 11 because both C-ICTC 3 and C − ICTC sum 3 return 0 cost. The resource-CA 1 makes a partial agreement and stop inter-CA negotiation with consumer-CA 3, but carries on intra-constituent optimization and inter-CA negotiation with consumer-CA 2. Resource-CA 2 is also connected to two consumers, i.e., consumer-CA 1 and consumer-CA 2. Figure 12b shows that W-ICTC in consumer-CA 2 returns 0 cost at negotiation round 13, which means that consumer-CA 2 reaches an agreement with resource-CA 2 and stops bilateral negotiation with resource-CA 2. However, it continues bilateral negotiation with resource-CA 1 until it reaches an agreement with resource-CA 1 at negotiation round 29. Meanwhile, resource-CA 2 reaches an agreement with both consumer-CAs at negotiation round 8, where all ICTCs representing consumer-CAs return 0 cost. Hence, the results clearly indicate that each CA preserves its autonomy and has full control to make independent choices about when to start and stop intra-CA optimization and inter-CA negotiation.

Conclusion
This paper addresses the problem of coordinating demand and allocation of shared resources in a system consisting of CPSs, i.e., SoCPSs. In this regard, a meta-model of SoCPSs is proposed, where each CCPS is modeled as an agent, i.e., CA. The metamodel comprises intra-CA optimization model and inter-CA negotiation model. The intra-CA optimization model uses MOMI optimization to provide an internal decision making process in each CA. The inter-CA negotiation model focuses on asynchronous bilateral negotiation between autonomous CAs to coordinate the interdependent issues distributed across multiple connected CAs and introduces support for conflict resolution within each CA and across CAs. To validate the efficacy of the proposed approach, multiple acyclic topologies (ranging from simple to complex) which mimic real-world SoCPSs are simulated. The results show that the proposed approach is able to 1) integrate and recognize different types of CAs and their heterogeneous nature, 2) maintain the operational independence of connected CAs, 3) create a cooperative coordination mechanism that can achieve a global objective without risking suboptimality or sub optimization of individual CAs, 4) support dynamic evolution of the overall SoCPSs, 5) able to find an agreement-in terms of allocation and demand among connected-CAs without having global knowledge about SoCPS.
Regarding future work, we plan to test the proposed approach in different problem domains, in order to see if the model presented for intra-CA optimization and inter-CA negotiation is applicable to other types of resource allocation problems. Furthermore, the topological structures, that we considered for experimentation, are based on our strict assumption that the type of relationship between connected-CAs constituting