Package simulation

Class Model

java.lang.Object
simulation.Model

public class Model extends Object
  • 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

      public void setMetric(String metricId, Double value)
      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

      public void setMetrics(Map<String,Double> metrics)
      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

      public Collection<FactorEvaluationDTO> simulate()
      Simulate change of a metric value: - Reevaluate influenced factors.
      Returns:
      Recomputed factors.
    • getFactors

      public Collection<FactorEvaluationDTO> getFactors()
      Return the actual Collection of FactorEvaluationDTOs.
      Returns:
      The map of evaluations associated to each factor.