| 1 | package de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.impl; |
| 2 | |
| 3 | import org.apache.log4j.Logger; |
| 4 | |
| 5 | import de.uka.ipd.sdq.pcm.allocation.AllocationContext; |
| 6 | |
| 7 | public class ServiceInfo { |
| 8 | |
| 9 | protected static Logger logger = Logger.getLogger(ServiceInfo.class.getName()); |
| 10 | |
| 11 | //name of the service |
| 12 | String serviceName; |
| 13 | |
| 14 | //name of the component providing the service |
| 15 | String compName; |
| 16 | |
| 17 | //allocation context of the component providing the service |
| 18 | AllocationContext compAllocContext; |
| 19 | |
| 20 | //User Requirement - response time of the service |
| 21 | double userReq; |
| 22 | |
| 23 | //LQN solution - response time of the service |
| 24 | double respT; |
| 25 | |
| 26 | //frequency of the service |
| 27 | double frequency; |
| 28 | |
| 29 | //initial values |
| 30 | public ServiceInfo(){ |
| 31 | this.serviceName = ""; |
| 32 | this.compName = ""; |
| 33 | //this.compAllocContext = null; |
| 34 | this.userReq = 0.0; |
| 35 | this.respT = 0.0; |
| 36 | this.frequency = 0.0; |
| 37 | } |
| 38 | |
| 39 | public ServiceInfo(String sName, String cName, double u, double r, double f){ |
| 40 | this.serviceName = sName; |
| 41 | this.compName = cName; |
| 42 | //this.compAllocContext = compAllocContext; |
| 43 | this.userReq = u; |
| 44 | this.respT = r; |
| 45 | this.frequency = f; |
| 46 | } |
| 47 | |
| 48 | //print elements of ServiceInfo type |
| 49 | public void print(){ |
| 50 | logger.info("SEFF " + this.serviceName + ","+ |
| 51 | " by " + this.compName + ","+ |
| 52 | //" instance " + this.compAllocContext.getEntityName() + ","+ |
| 53 | " RT(user requirement) " + this.userReq + ","+ |
| 54 | " RT(lqn solution) " + this.respT + ","+ |
| 55 | " frequency " + this.frequency); |
| 56 | } |
| 57 | |
| 58 | } |