source: DCWoRMS/trunk/src/simulator/DCWormsConstants.java @ 481

Revision 481, 3.0 KB checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package simulator;
2
3import eduni.simjava.Sim_stat;
4
5public class DCWormsConstants {
6
7        public static final String START_TIME="start_time";
8       
9        public static final String END_TIME = "end_time";
10       
11        public static final String RESOURCES = "resources";
12
13       
14        /**
15         * the links have the maximal baud rate - no delays
16         */
17        public static final double DEFAULT_BAUD_RATE = Double.MAX_VALUE;
18       
19        /**
20         * Default name suffix of the allocation policy for every resource
21         */
22        public static final String DEFAULT_RESOURCE_MANAGER_NAME = "ResourceManager";
23       
24        /**
25         * The cost of processing per time unit
26         */
27        public static final float DEFAULT_RESOURCE_PROCESSING_COST = 1f;
28       
29        /**
30         * The default number of tasks in a single job
31         */
32        public static final int DEFAULT_TASK_COUNT_IN_SINGLE_JOB = 1;
33
34        /**
35         * The name of the broker interface entity (the entity that invokes proper methods on the given plugin)
36         */
37        public static final String BrokerInterfaceEntityName = "BrokerInterfaceEntity";
38       
39        /**
40         * The name of the output file with generated graphs
41         */
42        public static final String GraphsFileName = "GssGraphs.sjg";
43       
44        /**
45         * The name of the file where the resources' statistical data are to be stored
46         */
47        public static final String resourceStatisticsOutputFileName = "Stats_Resources.txt";
48       
49        /**
50         * The name of the file where the tasks' statistical data are to be stored
51         */
52        public static final String tasksStatisitcsOutputFileName = "Stats_Tasks.txt"; 
53
54       
55        public static final String MANAGEMENT_SYSTEM = "ManagementSystem";
56
57       
58/*
59 * 
60 * STATISTICAL INFORMATION VARIABLES AND METHODS
61 *
62 */
63       
64        /**
65         * The utilization measure name
66         */
67        public static final String USAGE_MEASURE_NAME = "Resource's utilization";
68       
69        /**
70         * The waiting tasks queue length measure name
71         */
72        public static final String TASKS_QUEUE_LENGTH_MEASURE_NAME = "Mean queue task count";
73       
74        /**
75         * The paused tasks list length measure name
76         */
77        public static final String PAUSED_TASKS_LIST_LENGTH_MEASURE_NAME = "Paused tasks list length";
78       
79        /**
80         * @param queuesCount the number of queues for which the measures are to be added
81         * @return a Sim_stat object to be used in all resources
82         */
83        public static Sim_stat getResourcesStatisticsObject(int queuesCount) {         
84                Sim_stat stat = new Sim_stat();
85                //stat.add_measure(Sim_stat.ARRIVAL_RATE);
86                //stat.add_measure(Sim_stat.QUEUE_LENGTH);
87                //stat.add_measure(Sim_stat.RESIDENCE_TIME);
88                //stat.add_measure(Sim_stat.SERVICE_TIME);
89                stat.add_measure(Sim_stat.THROUGHPUT);
90                //stat.add_measure(Sim_stat.UTILISATION);
91                //stat.add_measure(Sim_stat.WAITING_TIME);
92               
93                stat.add_measure(USAGE_MEASURE_NAME, Sim_stat.STATE_BASED, true); //continuous
94                for (int i = 0; i < queuesCount; ++i) {
95                        stat.add_measure(TASKS_QUEUE_LENGTH_MEASURE_NAME+"_"+Integer.toString(i), Sim_stat.STATE_BASED, true); //continuous
96                }
97                stat.add_measure(PAUSED_TASKS_LIST_LENGTH_MEASURE_NAME, Sim_stat.STATE_BASED, true); //continuous
98                //stat.add_measure(TASKS_AR_QUEUE_LENGTH_MEASURE_NAME, Sim_stat.STATE_BASED, true); //continuous
99                return stat;
100        }
101
102}
Note: See TracBrowser for help on using the repository browser.