# Weighted-CAPIC Caching Algorithm for Priority Traffic in Named Data Network
## 5 System Model  
Based on the Global Internet Phenomena Report 2019, internet traffic accessed by consumers can be divided into several groups with different characteristics [2]. [PERSON] et al. conducted research using the Zipf-Mandelbrot distribution to model content popularity [10]. Following the RFC 7945, the Zipf-Mandelbrot distribution is suitable for the network where nodes can store content locally [17]. The average of consumer request rate is modeled using Poisson distribution.  
In this research, the probability of connection between nodes is 50%. This modeling causes topology changes in a network for every simulation round. This effect the cache conditions and change dynamically. Content popularity is modeled by Zipf-Mandelbrot with exponential factor 0.8 and flattened factor 3. The average number of requests for each class follows the Poisson distribution and traffic class, according to Table 1. Simulation parameters are in detail according to Table 2.  
Two experimental scenarios were carried out, with variations in the number of request levels and variations in the request rate. In the scenario of variation in number request level, classes 1, 2, and 3 each have a demand average of 10, 20, and 30, respectively. In the scenario of variations in the request rate, the number of request levels is set to 6. This means that the user request pattern changes six times during the simulation time.  
In the first scenario that simulated the various number of request levels, there were three types of request levels, i.e., number of requests levels 2, 4, and 6. The number of requests level 2 means the pattern of consumer demand changed two times. For this scenario, there are two requests patterns: (10, 20, 30) and (20 30 10). This means that at half the simulation time, we used the (10, 20, 30) pattern. The (10, 20, 30) pattern implies that the number of requests for the first class is 10 requests per simulation round, the second class is 20 requests per second, and the third class is 30 requests per simulation round. As for the other half time of the simulation, we used (20, 30, 10) pattern. The number of requests  
Figure 1: Flowchart of Weighted CAPIC.  
levels 4 and 6 also worked in the same way as the previous mechanism. In the scenario of 'number of requests level' 4, there were four changes in the request pattern during the simulation. Similarly, for the 'number of request level' 6, there were six changes in the pattern of requests during the simulation.  
The second scenario simulates the different request rate gaps between content classes. The term \"Difference in request rate\" means a difference (gap) between the request rates for classes 1, 2, and 3. In this scenario, the values are tested starting from 10, 20, 30, and 40. A 'differences in request rate' of 10 means that class 1 has a request rate of 10 requests per simulation round, then the second class increases by 10 compared to the first class, which is 20 requests per simulation round, the third class increased by 10 compared to the second class, which is 30 requests per simulation round. Likewise, the 'difference in request rate' values of 20, 30, and 40 are modeled as more significant gaps between the request rates for each content class.  
System performance is seen from the cache hit ratio and path stretch parameters. The cache hit ratio parameter compares the number of requests that can be responded directly by the router node to the total number of requests. The path stretch parameter indicates the number of hops taken until a request receives data (content) as a response. Weighted-CAPIC performance is compared to Dynamic-CAPIC, Static-CAPIC, and LCD+Sharing schemes. LCD+Sharing scheme combines two typical cache schemes in NDN, namely LCD (leave copy down) and sharing scheme. We test the Weighted-CAPIC, Dynamic-CAPIC, Static-CAPIC, and LCD+sharing method in the same environment to obtain the appropriate comparison.