1 | package de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.impl; |
2 | import org.apache.log4j.Logger; |
3 | import de.uka.ipd.sdq.pcm.repository.PassiveResource; |
4 | |
5 | public class PassiveResInfo { |
6 | |
7 | protected static Logger logger = Logger.getLogger(ActiveResInfo.class.getName()); |
8 | |
9 | //passive resource |
10 | PassiveResource pr; |
11 | |
12 | //component whose passive resource belongs to |
13 | String component; |
14 | |
15 | //capacity of the passive resource |
16 | int capacity; |
17 | |
18 | //LQN solution - queue length of the passive resource |
19 | double queueLength; |
20 | |
21 | //LQN solution - waiting time of the passive resource |
22 | double waitingTime; |
23 | |
24 | //LQN solution - holding time of the passive resource |
25 | double holdingTime; |
26 | |
27 | //initial values |
28 | public PassiveResInfo(){ |
29 | this.pr = null; |
30 | this.component = ""; |
31 | this.capacity = 1; |
32 | this.queueLength = 0.0; |
33 | this.waitingTime = 0.0; |
34 | this.holdingTime = 0.0; |
35 | } |
36 | |
37 | public PassiveResInfo(PassiveResource pr, String c, int i, double q, double w, double h){ |
38 | this.pr = pr; |
39 | this.component = c; |
40 | this.capacity = i; |
41 | this.queueLength = q; |
42 | this.waitingTime = w; |
43 | this.holdingTime = h; |
44 | } |
45 | |
46 | public PassiveResInfo(PassiveResInfo h){ |
47 | this.pr = h.pr; |
48 | this.component = h.component; |
49 | this.capacity = h.capacity; |
50 | this.queueLength = h.queueLength; |
51 | this.waitingTime = h.waitingTime; |
52 | this.holdingTime = h.holdingTime; |
53 | } |
54 | |
55 | //print elements of PassiveResInfo type |
56 | public void print(){ |
57 | logger.info("PassiveRes " + this.pr.getEntityName() + ","+ |
58 | " component " + this.component + ","+ |
59 | " capacity: " + this.capacity + ","+ |
60 | " QL: " + this.queueLength + ","+ |
61 | " WT: " + this.waitingTime + ","+ |
62 | " HT: " + this.holdingTime); |
63 | } |
64 | |
65 | } |