# Supply-Demand Dynamic Matching in Cloud Manufacturing Based on Hypernetwork Model
## 4 Dynamic Matching Method
### Dynamic Updates of the Matching Model  
During the dynamic adjustment stage, the supply and demand situations may change due to random dynamic events, such as the addition or removal of service or task nodes, leading to alterations in the hypernetwork. A detailed analysis of these dynamic events reveals that information changes between suppliers and requesters trigger updates to the hypernetwork. Changes in nodes and hyperedges can be categorised into the following six scenarios:  
_Event 1_: Addition of new service nodes \(S\).  
_Event 2_: Service nodes \(S\) interrupt or cease service.  
_Event 3_: Addition of new task nodes \(T\).  
_Event 4_: Task nodes \(T\) interrupt or cease demand.  
_Event 5_: Addition of connections in the supply-demand hyperedges.  
_Event 6_: Disconnections in the supply-demand hyperedges.  
The addition or removal of service and task nodes directly leads to _Events 5_ and 6, while alterations in the manufacturing information of services and tasks also trigger these events. Since the manufacturing processing conditions remain unchanged in the short term, there will be no alteration in the manufacturing information; hyperedge connections will only change due to node additions or removals. Therefore, this discussion focuses on _Events 1_, 2_, 3, and 4 to determine whether they disrupt the current scheme and require rematching. Additionally, a premise is set for the system: once manufacturing has commenced, the existing matching scheme will continue to be executed even if a better scheme is available, as long as the existing scheme is not broken. The specific judgment criteria are outlined as follows:  
* _Event 1_: The addition of service node \(S\) does not threaten the original scheme due to the established premise, so no adjustments to the scheme are made, and the original matching scheme continues to be executed by default.
* _Event 2_: The deletion of service node \(S\) requires specific analysis in two scenarios. If the deleted \(S\) node was selected in the original scheme as a matching service, it impacts the original scheme, triggering the rematching mechanism. However, if the deleted \(S\) node was not selected in the original scheme, it does not affect the original scheme, and no response measures are necessary.
* _Event 3_: The addition of task node \(T\) signifies that the new tasks in the network have not yet been assigned. The original scheme is inadequate for the current situation, thus triggering the rematching mechanism to supplement the scheme.
* _Event 4_: The deletion of task node \(T\) disrupts some matches in the original scheme and necessitates adjustments to release the manufacturing capacity of the service with the broken match.  
The initial hypernetwork model is updated and adjusted in response to the dynamic events \(ADD_{S}\), \(ADD_{T}\), \(DELETE_{S}\), and \(DELETE_{T}\) that occur over time. If \(s_{i}\in ADD_{S}\), and \(MEET_{T}(s_{i})\) represents the set of tasks that \(s_{i}\) can connect to, then for each task \(j\) in \(MEET_{T}(s_{i})\) we have \(e_{ij}^{S,T}\in ADD_{E^{S,T}}\). Similarly, if \(s_{i}\in DELETE_{S}\), then for each task \(j\) that \(s_{i}\) could connect to, we have \(e_{ij}^{S,T}\in DELETE_{E^{S,T}}\). The increase and decrease process of \(T\) nodes is similar to \(S\) nodes. The model update can be seen in Equations (36)-(40). Update the total numbers of current service and task nodes while updating the network model. The variables \(add_{S}\) and \(delete_{S}\) represent the number of added or deleted service nodes, respectively, while \(add_{T}\) and \(delete_{T}\) represent the number of added or deleted task nodes.  
\[S_{t}=S_{t-1}\cup ADD_{S}\setminus DELETE_{S}, \tag{36}\] \[T_{t}=T_{t-1}\cup ADD_{T}\setminus DELETE_{T},\] (37) \[E_{t}^{S,T}=E_{t-1}^{S,T}\cup ADD_{E^{S,T}}\setminus DELETE_{E^ {S,T}},\] (38) \[NoS_{t}=NoS_{t-1}+add_{S}-delete_{S},\] (39) \[NoT_{t}=NoT_{t-1}+add_{T}-delete_{T}. \tag{40}\]