Package simulation
Class Model
java.lang.Object
simulation.Model
-
Constructor Summary
ConstructorsConstructorDescriptionModel(List<MetricEvaluationDTO> metrics, List<FactorEvaluationDTO> factors, List<org.bson.Document> relations) Create Model on metrics / factors (DTOs), and relations List of Document (LD-eval). -
Method Summary
Modifier and TypeMethodDescriptionReturn the actual Collection of FactorEvaluationDTOs.voidSimulate change of a metric value: - Lookup MetricEvaluationDTO in mapMetricIdDTOvoidsetMetrics(Map<String, Double> metrics) Simulate change of for a list of metrics: - Lookup MetricEvaluationDTO in mapMetricIdDTOsimulate()Simulate change of a metric value: - Reevaluate influenced factors.
-
Constructor Details
-
Model
public Model(List<MetricEvaluationDTO> metrics, List<FactorEvaluationDTO> factors, List<org.bson.Document> relations) Create Model on metrics / factors (DTOs), and relations List of Document (LD-eval). Assumption: MetricEvaluationDTOs and FactorEvaluationDTOs contain exactly one EvaluationDTO for a specific evaluationDate.- Parameters:
metrics- List of MetricEvaluationDTOs for evaluationDate and projectId.factors- List of FactorEvaluationDTOs for evaluationDate and projectId.relations- SearchResponse of relation query for metric-factor relations, evaluationDate, and projectId.
-
-
Method Details
-
setMetric
Simulate change of a metric value: - Lookup MetricEvaluationDTO in mapMetricIdDTO. - Change EvaluationDTO to simulated value. - Updates the list of changeFactors.- Parameters:
metricId- The metricId.value- The simulated value.
-
setMetrics
Simulate change of for a list of metrics: - Lookup MetricEvaluationDTO in mapMetricIdDTO. - Change EvaluationDTO to simulated value. - Updates the list of changeFactors.- Parameters:
metrics- The list of metrics to be simulated (metricId and simulated value).
-
simulate
Simulate change of a metric value: - Reevaluate influenced factors.- Returns:
- Recomputed factors.
-
getFactors
Return the actual Collection of FactorEvaluationDTOs.- Returns:
- The map of evaluations associated to each factor.
-