Package de.hpi.eworld.simulationstatistic.model

Examples of de.hpi.eworld.simulationstatistic.model.Value


     
      // get data source (dataset, interval, value) and
      // visualization parameters
      double lowThresh = (Double) lowThreshold.getValue();
      double highThresh = (Double) highThreshold.getValue();
      Value value = Value.valueOf((String) valueBox.getSelectedItem());
      int interval = (Integer) intervalBox.getValue();

      if (!dataset.belongsToCurrentMap()) {
        logger.info("Only data belonging to current map can be visualized!");
        JOptionPane.showMessageDialog(mainView.getComponent(),
View Full Code Here


    boolean firstIt = true;
    // iterate over all edges/lanes and find max and min values
    String setId = (String) dataSetBox.getSelectedItem();
    StatDataset dataset = StatisticsDataManager.getInstance().getDataset(
        setId);
    Value value = Value.valueOf((String) valueBox.getSelectedItem());
    if (dataset == null) {
      return;
    }

    StatInterval interval = dataset.getInterval((Integer) intervalBox.getValue());
View Full Code Here

   *            name of the y-Axis value series
   */
  public static void dependencyGraph(String firstParam, String secondParam,
      StatDataset dataset) {
   
    Value firstValue = null;
    Value secondValue = null;
   
    for (Value v: Value.values()){
      if (v.text().equals(firstParam))
        firstValue = v;
      else if (v.text().equals(secondParam))
        secondValue = v;
    }
    if (firstValue == null){
      System.out.println("Illegal value type parameter: " + firstParam);
      return;
    }else if (secondValue == null){
      System.out.println("Illegal value type parameter: " + firstParam);
      return;
    }
    XYSeries serie = new XYSeries(firstParam + " / " + secondParam);
    double SCHWELL_VAL = 0.05;
    for (int i = 0; i < dataset.numIntervals(); i++) {
      StatInterval inter = dataset.getInterval(i);
      for (StatEdge e : inter.getStatEdges()) {
        double firstVal = e.getValue(firstValue);
        double secondVal = e.getValue(secondValue);

        if (firstVal >= SCHWELL_VAL && secondVal >= SCHWELL_VAL) {
          serie.add(firstVal, secondVal);
        }
      }
    }
    XYSeriesCollection dataCol = new XYSeriesCollection(serie);

    JFreeChart chart = ChartFactory.createScatterPlot(
        "Dependency Scatter Plot", firstValue.text() + "  " + firstValue.unit(),
        secondValue.text() + "  " + secondValue.unit(), dataCol,
        PlotOrientation.HORIZONTAL, true, true, false);
    chart.addSubtitle(new TextTitle("Each dot represents the value combination of one edge\n" +
        "Only non-zero values are considered"));
    ChartFrame frame = new ChartFrame("Dependency Scatter Plot", chart);
    frame.setIconImage(Toolkit.getDefaultToolkit().getImage(
View Full Code Here

TOP

Related Classes of de.hpi.eworld.simulationstatistic.model.Value

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.