| 1 | package de.uka.ipd.sdq.dsexplore.launch; |
| 2 | |
| 3 | import de.uka.ipd.sdq.dsexplore.analysis.AnalysisQualityAttributes; |
| 4 | import de.uka.ipd.sdq.dsexplore.qml.handling.QMLConstantsContainer; |
| 5 | |
| 6 | /** |
| 7 | * constants of DSE. QML-related constants are found in {@link QMLConstantsContainer}. |
| 8 | * @author martens |
| 9 | * |
| 10 | */ |
| 11 | public class DSEConstantsContainer { |
| 12 | |
| 13 | public static final String MAX_ITERATIONS = "maxIterations"; |
| 14 | public static final String INDIVIDUALS_PER_GENERATION = "indivPerGeneration"; |
| 15 | public static final String CROSSOVER_RATE = "crossover rate"; |
| 16 | |
| 17 | public static final String MRT_REQUIREMENTS = "meanResponseTimeRequirement"; |
| 18 | public static final String MAX_COST = "MAX_COST"; |
| 19 | |
| 20 | public static final String SEARCH_METHOD = "search method"; |
| 21 | |
| 22 | /** Messages for the selection combo box*/ |
| 23 | public static final String SEARCH_EVOLUTIONARY = "Evolutionary search"; |
| 24 | public static final String SEARCH_RANDOM = "Random search"; |
| 25 | /** whether the rule based search should explore the full search |
| 26 | * tree up to the depth given by the number of iterations. |
| 27 | */ |
| 28 | public static final String SEARCH_RULE = "Full rule-based search"; |
| 29 | /** Suboptimal candidates are pruned from the search tree and not further |
| 30 | * explored per iteration.*/ |
| 31 | public static final String SEARCH_RULE_OPT = "Rule-based search optimal only"; |
| 32 | |
| 33 | /** |
| 34 | * This must not be used as a key directly, but the quality attribute has to be appended. |
| 35 | */ |
| 36 | private static final String ANALYSIS_METHOD_PREFIX = "analysisMethod"; |
| 37 | |
| 38 | /** Model filenames value */ |
| 39 | public static final String COST_FILE = "costFile"; |
| 40 | //public static final String SECURITY_FILE = "securityFile"; |
| 41 | public static final String PREDEFINED_INSTANCES = "predefinedInstances"; |
| 42 | public static final String CACHE_INSTANCES = "cacheInstances"; |
| 43 | public static final String ALL_CANDIDATES = "allCandidates"; |
| 44 | public static final String ARCHIVE_CANDIDATES = "archiveCandidates"; |
| 45 | |
| 46 | |
| 47 | public static final String DESIGN_DECISION_FILE = "designDecisionFile"; |
| 48 | |
| 49 | public static final String QML_DEFINITION_FILE = "qmlDefinitionFile"; |
| 50 | |
| 51 | /** |
| 52 | * Set the file extensions which the dialog can use to filter the files it |
| 53 | * shows to the argument. |
| 54 | */ |
| 55 | public static final String[] COST_MODEL_EXTENSION = new String[] { "*.cost" }; |
| 56 | |
| 57 | //public static final String[] SECURITY_MODEL_EXTENSION = new String[] { "*.security" };; |
| 58 | |
| 59 | /** |
| 60 | * Set the file extensions which the dialog can use to filter the files it |
| 61 | * shows to the argument. |
| 62 | */ |
| 63 | public static final String[] CSV_EXTENSION = new String[] { "*.csv" }; |
| 64 | public static final String[] CANDIDATE_EXTENSION = new String[] { "*.csv" , "*.designdecision" }; |
| 65 | |
| 66 | /** |
| 67 | * Set the file extensions which the dialog can use to filter the files it |
| 68 | * shows to the argument. |
| 69 | */ |
| 70 | public static final String[] DESIGNDECISION_EXTENSION = new String[] { "*.designdecision" }; |
| 71 | |
| 72 | public static final String QML_DEFINITION_EXTENSION = new String ("*.qmldeclarations"); |
| 73 | |
| 74 | //TODO: delete |
| 75 | //XXX: use 'new QMLDimensionReader().getDimension(QMLConstantsContainer.QUALITY_ATTRIBUTE_DIMENSION_RESPONSETIME_DEFINITION_PATH).getEntityName()' instead |
| 76 | // public static final String MEAN_RESPONSE_TIME_QUALITY = "mean response time"; |
| 77 | // public static final String COST_QUALITY = "cost"; |
| 78 | // public static final String POFOD_QUALITY = "POFOD"; |
| 79 | |
| 80 | |
| 81 | /** |
| 82 | * TODO: Move this to {@link AnalysisQualityAttributes}? |
| 83 | */ |
| 84 | public enum QualityAttribute { |
| 85 | PERFORMANCE_QUALITY { |
| 86 | public String getName() { return "de.uka.ipd.sdq.dsexplore.performance"; } |
| 87 | public String getPrettyName() { return "Performance"; }}, |
| 88 | COST_QUALITY { |
| 89 | public String getName() { return "de.uka.ipd.sdq.dsexplore.cost"; } |
| 90 | public String getPrettyName() { return "Costs"; }}, |
| 91 | RELIABILITY_QUALITY { |
| 92 | public String getName() { return "de.uka.ipd.sdq.dsexplore.reliability" ; } |
| 93 | public String getPrettyName() { return "Reliability"; }}; |
| 94 | |
| 95 | public abstract String getName(); |
| 96 | |
| 97 | public static QualityAttribute getQualityAttribute(String name){ |
| 98 | if (name.equals(PERFORMANCE_QUALITY.getName())){ |
| 99 | return PERFORMANCE_QUALITY; |
| 100 | } else if (name.equals(RELIABILITY_QUALITY.getName())){ |
| 101 | return RELIABILITY_QUALITY; |
| 102 | } else if (name.equals(COST_QUALITY.getName())){ |
| 103 | return COST_QUALITY; |
| 104 | } else { |
| 105 | return null; |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | public abstract String getPrettyName(); |
| 110 | |
| 111 | } |
| 112 | |
| 113 | public static final String DESIGN_DECISIONS_ONLY = "designDecisionsOnly"; |
| 114 | public static final String OPTIMISATION_ONLY = "optimisationOnly"; |
| 115 | |
| 116 | |
| 117 | public static final String NONE = "none"; |
| 118 | public static final String getAnalysisMethod(QualityAttribute qualityAttribute){ |
| 119 | return ANALYSIS_METHOD_PREFIX+qualityAttribute.getName(); |
| 120 | } |
| 121 | |
| 122 | public static final String ALPHA = "alpha"; |
| 123 | public static final String UPPER_BOUND_CONFIDENCE = "upper bound confidence"; |
| 124 | public static final String LOWER_BOUND_CONFIDENCE = "lower bound confidence"; |
| 125 | |
| 126 | public static final String DSE_ITERATIONS = "number of DSE iterations"; |
| 127 | |
| 128 | /* |
| 129 | * Configuration of heuristics |
| 130 | */ |
| 131 | |
| 132 | public static final String CONSIDER_QML_BOUNDS = "Consider QML bounds"; |
| 133 | public static final String TACTICS_PROBABILITY = "tactics probability when mating"; |
| 134 | static final double TACTICS_PROBABILITY_DEFAULT = 0.6; |
| 135 | |
| 136 | public static final String USE_REALLOCATION = "Use reallocation heuristic"; |
| 137 | public static final String REALLOCATION_UTILISATION_DIFFERENCE = "Reallocation threshold for utilisation difference"; |
| 138 | public static final String REALLOCATION_WEIGHT = "Weight of reallocation heuristic"; |
| 139 | |
| 140 | public static final String USE_PROCESSING_RATE = "Use processing rate heuristic"; |
| 141 | public static final String PROCESSING_RATE_THRESHOLD_LOW_UTILISATION = "Proceesing rate threshold for low utilisation"; |
| 142 | public static final String PROCESSING_RATE_THRESHOLD_HIGH_UTILISATION = "Processing rate threshold for high utilisation"; |
| 143 | public static final String PROCESSING_RATE_INCREASE_FACTOR = "Increase processing rate factor"; |
| 144 | public static final String PROCESSING_RATE_DECREASE_FACTOR = "Decrease processing rate factor"; |
| 145 | public static final String PROCESSING_RATE_WEIGHT = "Weight of processing rate heuristic"; |
| 146 | |
| 147 | public static final String USE_SERVER_CONSOLIDATION = "Use server consolidation heuristic"; |
| 148 | public static final String SERVER_CONSOLIDATION_THRESHOLD_LOW_UTILISATION = "Server consolidation threshold for low utilisation"; |
| 149 | public static final String SERVER_CONSOLIDATION_WEIGHT = "Weight of server consolidation heuristic"; |
| 150 | |
| 151 | public static final String USE_SERVER_EXPANSION = "Use server expansion heuristic"; |
| 152 | public static final String SERVER_EXPANSION_THRESHOLD_HIGH_UTILISATION = "Server expansion threshold for high utilisation"; |
| 153 | public static final String SERVER_EXPANSION_MAX_NUMBER_OF_REPLACEMENTS = "Server expansion maximum number of reallocations"; |
| 154 | public static final String SERVER_EXPANSION_WEIGHT = "Weight of server expansion heuristic"; |
| 155 | |
| 156 | public static final String USE_LINK_REALLOCATION = "Use Realocation for Link Usage Tactic"; |
| 157 | |
| 158 | public static final String USE_ANTIPATTERNS = "Use antipattern knowledge"; |
| 159 | |
| 160 | public final static String USE_STARTING_POPULATION_HEURISTIC = "Use starting population heuristic"; |
| 161 | public final static String MIN_NUMBER_RESOURCE_CONTAINERS = "Minimum number of resource containers"; |
| 162 | public final static String MAX_NUMBER_RESOURCE_CONTAINERS = "Maximum number of resource containers"; |
| 163 | public final static String NUMBER_OF_CANDIDATES_PER_ALLOCATION_LEVEL = "Number of candidates per allocation level"; |
| 164 | |
| 165 | /* |
| 166 | * Termination Criteria related constants |
| 167 | */ |
| 168 | |
| 169 | //General |
| 170 | public static final String TC_GENERAL_USE_TERMINATION_CRITERIA = "Use Termination Criteria"; |
| 171 | public static final String TC_GENERAL_COMPARISION_MODE = "Run in comparision mode"; |
| 172 | |
| 173 | //Composed Criteria |
| 174 | public static final String TC_COMPOSED_CRITERIA_ACTIVATE = "Activate composed Criteria"; |
| 175 | public static final String TC_COMPOSED_CRITERIA_EXPRESSION = "Composed Criteria Expression"; |
| 176 | |
| 177 | //Maximum Generation Number Criterion |
| 178 | public static final String TC_MAX_NUM_OF_GEN_ACTIVATE = "Activate Maximum number of generation"; |
| 179 | public static final String TC_MAX_NUM_OF_GEN_LIMIT = "Maximum Number Of Generations"; |
| 180 | |
| 181 | //Elapsed Time Criterion |
| 182 | public static final String TC_ELAPSED_TIME_ACTIVATE = "Activate Elapsed Time Criterion"; |
| 183 | public static final String TC_ELAPSED_TIME_TYPE = "Type of the measured time"; |
| 184 | public static final String TC_ELAPSED_TIME_TIME_LIMIT = "Time in minutes"; |
| 185 | |
| 186 | //No New Pareto Optimal Candidates Found Criterion |
| 187 | public static final String TC_NO_NEW_CANDIDATES_ACTIVATE = "Activate No New Pareto Optimal Candidates"; |
| 188 | public static final String TC_NO_NEW_CANDIDATES_ITERATIONS_WITHOUT = "Iterations without new Pareto optimal candidates"; |
| 189 | |
| 190 | //Pareto Optimal Set Stability |
| 191 | public static final String TC_SET_STABILITY_ACTIVATE = "Activate Pareto Optimal Set Stability"; |
| 192 | public static final String TC_SET_STABILITY_MODE = "Evaluation Mode"; |
| 193 | public static final String TC_SET_STABILITY_MINIMUM_ITERATION_TO_SURVIVE = "Minimum iterations to survive"; |
| 194 | public static final String TC_SET_STABILITY_NUMBER_OF_SURVIVORS_EXACT = "Exact number of survivors"; |
| 195 | public static final String TC_SET_STABILITY_NUMBER_OF_SURVIVORS_PERCENTAGE = "Percentage number of survivors"; |
| 196 | |
| 197 | //Minimal Quality Criteria Value |
| 198 | public static final String TC_MINIMAL_VALUES_ACTIVATE = "Activate Minimal Quality Criteria Value"; |
| 199 | public static final String TC_MINIMAL_VALUES_CANDIDATES_TO_CONFORM = "Number of candidates to conform"; |
| 200 | public static final String TC_MINIMAL_VALUES_CONFIGURED_OBJECTIVES = "Configured objectives with values"; |
| 201 | |
| 202 | //A Given Pareto Front is Reached |
| 203 | public static final String TC_PARETO_FRONT_IS_REACHED_ACTIVATE = "Activate a Given Pareto Front Is reached"; |
| 204 | public static final String TC_PARETO_FRONT_IS_REACHED_PERCENTAGES_TO_COVER = "Percentages to cover"; |
| 205 | public static final String TC_PARETO_FRONT_IS_REACHED_PATH_TO_FRONT_FILE = "Path to the pareto front description file"; |
| 206 | |
| 207 | //Insignificant Set Quality Improvement |
| 208 | public static final String TC_INSIGNIFICANT_SET_IMPROVEMENT_ACTIVATE = "Activate Insignificant Set Quality Improvement"; |
| 209 | public static final String TC_INSIGNIFICANT_SET_IMPROVEMENT_GENERATION_X = "Number of the n-x generation"; |
| 210 | public static final String TC_INSIGNIFICANT_SET_IMPROVEMENT_CONFIGURED_OBJECTIVES = "Configured Objectives with averages"; |
| 211 | |
| 212 | //Insignificant Pareto Front Change |
| 213 | public static final String TC_INSIGNIFICANT_FRONT_CHANGE_ACTIVATE = "Activate Insignificant Pareto Front Change"; |
| 214 | public static final String TC_INSIGNIFICANT_FRONT_CHANGE_GENERATION_X = "Number of the n-x generation for front"; |
| 215 | public static final String TC_INSIGNIFICANT_FRONT_CHANGE_IMPROVEMENT = "Minimum percentage improvement"; |
| 216 | public static final String STOP_ON_INITIAL_FAILURE = "Stop on initial failure"; |
| 217 | public static final String STORE_RESULTS_AS_EMF = "store results as EMF"; |
| 218 | |
| 219 | // Default file URIs |
| 220 | /** Default URI for the cost model file. */ |
| 221 | public static final String DEFAULT_COST_MODEL_FILE = ""; |
| 222 | /** Default URI for the given candidates file. */ |
| 223 | public static final String DEFAULT_GIVEN_CANDIDATES_FILE = ""; |
| 224 | /** Default URI for the cached candidates file. */ |
| 225 | public static final String DEFAULT_CACHED_CANDIDATES_FILE = ""; |
| 226 | /** Default URI for the all candidates file. */ |
| 227 | public static final String DEFAULT_ALL_CANDIDATES_FILE = ""; |
| 228 | /** Default URI for the archive candidates file. */ |
| 229 | public static final String DEFAULT_ARCHIVE_INSTANCES_FILE = ""; |
| 230 | /** Default URI for the design decision file. */ |
| 231 | public static final String DEFAULT_DESIGN_DECISION_FILE = ""; |
| 232 | /** Default URI for the QML criteria definitions file. */ |
| 233 | public static final String DEFAULT_QML_CRITERIA_DEFINITIONS_FILE = ""; |
| 234 | |
| 235 | } |