Examples of DataCollector


Examples of com.sun.corba.se.spi.orb.DataCollector

    }

    protected void set_parameters(Applet app, Properties props)
    {
        preInit( null, props ) ;
        DataCollector dataCollector =
            DataCollectorFactory.create( app, props, getLocalHostName() ) ;
        postInit( null, dataCollector ) ;
    }
View Full Code Here

Examples of com.sun.corba.se.spi.orb.DataCollector

    }

    protected void set_parameters (String[] params, Properties props)
    {
        preInit( params, props ) ;
        DataCollector dataCollector =
            DataCollectorFactory.create( params, props, getLocalHostName() ) ;
        postInit( params, dataCollector ) ;
    }
View Full Code Here

Examples of jsprit.analysis.toolbox.ComputationalLaboratory.DataCollector

    computationalLab.setNuOfRuns(5);
       
    /*
     * plot search progress of different algorithms
     */
    final DataCollector dataCollector = new DataCollector();
    computationalLab.addListener(new CalculationListener() {
     
      @Override
      public void calculationStarts(BenchmarkInstance p, final String algorithmName,VehicleRoutingAlgorithm algorithm, final int run) {}
     
      @Override
      public void calculationEnds(BenchmarkInstance p, String algorithmName,VehicleRoutingAlgorithm algorithm, int run,Collection<VehicleRoutingProblemSolution> solutions) {
        dataCollector.addDate("R101", algorithmName, run, "costs", Solutions.bestOf(solutions).getCost());
      }
     
    });
   
    computationalLab.setThreads(2);
    /*
     * run the experiments
     */
    computationalLab.run();
   
    /*
     * plot min, avg and max
     */
    XYLineChartBuilder chartBuilder = XYLineChartBuilder.newInstance("variations with iterations", "iterations", "costs");
    for(String algorithmName : computationalLab.getAlgorithmNames()){
      String[] nameTokens = algorithmName.split("_");
      int iteration = Integer.parseInt(nameTokens[1]);
      chartBuilder.addData("min", iteration, min(dataCollector.getData("R101", algorithmName, "costs")));
      chartBuilder.addData("max", iteration, max(dataCollector.getData("R101", algorithmName, "costs")));
      chartBuilder.addData("avg", iteration, avg(dataCollector.getData("R101", algorithmName, "costs")));
    }
   
    XYLineChartBuilder.saveChartAsPNG(chartBuilder.build(), "output/computationalStudies_min_max_avg.png");
   
   
View Full Code Here

Examples of jsprit.analysis.toolbox.ComputationalLaboratory.DataCollector

     
    });
    /*
     * define dataCollector to collect an arbitrary number of indicators as well as solutions
     */
    final DataCollector dataCollector = new DataCollector();
    computationalLab.addListener(new CalculationListener() {
     
      @Override
      public void calculationStarts(BenchmarkInstance p, String algorithmName,VehicleRoutingAlgorithm algorithm, int run) {}
     
      @Override
      public void calculationEnds(BenchmarkInstance p, String algorithmName,VehicleRoutingAlgorithm algorithm, int run,Collection<VehicleRoutingProblemSolution> solutions) {
        //memorize solution
        dataCollector.addSolution(p.name, algorithmName, run, Solutions.bestOf(solutions));
      }
     
    });
    /*
     * determine number of threads to be used
     */
    computationalLab.setThreads(2);
    /*
     * run the experiments
     */
    computationalLab.run();
   
    /*
     * plot the lineChart
     */
    XYLineChartBuilder.saveChartAsPNG(chartBuilder.build(), "output/computationalStudies_alphaSensitivity.png");
   
    /*
     * print best solution
     */
    SolutionPrinter.print(vrp, Solutions.bestOf(dataCollector.getSolutions()), Print.VERBOSE);
   
    /*
     * plot best
     */
    Plotter plotter = new Plotter(vrp,Solutions.bestOf(dataCollector.getSolutions()));
    plotter.plot("output/bestOf.png", "bestOfR101");
   
  }
View Full Code Here

Examples of nz.co.abrahams.asithappens.collectors.DataCollector

    public DataSets retrieveTemplate(int sessionID) throws DBException, UnknownHostException, SNMPException, DAOCreationException {
        PreparedStatement statement;
        ResultSet results;
        DataCollectorDAO collectorDAO;
        DataCollector collector;
        DataSets data;
        //Device device;
        //int dataTypeID;
        //boolean storing;
        //String portString;
        //String collectorType;

        try {
            collectorDAO = DAOFactory.getDataCollectorDAO(connection, sessionID);
            collector = collectorDAO.retrieve(sessionID);

            statement = connection.prepareStatement(RETRIEVE_TEMPLATE);
            statement.setInt(1, sessionID);
            results = statement.executeQuery();
            results.next();

            data = new DataSets(collector.getDataType(), collector, collector.getDevice(), results.getInt("pollInterval"),
                    results.getString("port"), results.getInt("direction"), results.getString("title"), results.getBoolean("storing"));
            results.close();
            statement.close();
           
            // Nasty - fix it up please
            if ( collector.getDataType() == DataType.OID ) {
                CustomOIDCollector oidCollector;
                oidCollector = (CustomOIDCollector)collector;
                for (int i = 0; i < oidCollector.getOIDs().size() ; i++) {
                    data.addSet(oidCollector.getOIDs().elementAt(i).label);
                }
View Full Code Here

Examples of nz.co.abrahams.asithappens.collectors.DataCollector

   
    /** Creates a new response graph. */
    private void responseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_responseButtonActionPerformed
        Device device;
        int pollInterval;
        DataCollector collector;
        DataSets data;
        TimeSeriesContext context;
        DataGraph graphFrame;
       
        try {
View Full Code Here

Examples of nz.co.abrahams.asithappens.collectors.DataCollector

        processorsPane.setViewportView(new javax.swing.JList());
        storagePane.setViewportView(new javax.swing.JList());
    }//GEN-LAST:event_collectorTypeComboBoxActionPerformed
   
    private void storageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_storageButtonActionPerformed
        DataCollector collector;
        DataSets data;
        TimeSeriesContext context;
        DataGraph graphFrame;
        int storageIndex;
        String storageString;
View Full Code Here

Examples of nz.co.abrahams.asithappens.collectors.DataCollector

        }
    }//GEN-LAST:event_storageButtonActionPerformed
   
    /** Creates a new processor graph. */
    private void processorButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_processorButtonActionPerformed
        DataCollector collector;
        DataSets data;
        TimeSeriesContext context;
        DataGraph graphFrame;
        int processorIndex;
        String processorString;
View Full Code Here

Examples of org.apache.imperius.spl.core.DataCollector

    }

    public void initialize() throws SPLException {

        DataCollector dc = new JavaDataCollectorImpl();
        Actuator ac = new JavaActuatorImpl();
        _policyManager = new PolicyManagerImpl(dc, ac);

        // registering internal client
        InternalClient oInternalClientObj = new InternalClient(_policyManager);
View Full Code Here

Examples of org.apache.imperius.spl.core.DataCollector

   */

  private ArrayList filterTargetClassInstanceReferencesWithTargetExpression(List targetClassInstanceReferences , String className,String namespc) throws SPLException
  {
    logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "filterTargetClassInstanceReferencesWithTargetExpression");
    DataCollector dc = DataCollectorFactory.getDataCollector();
    ArrayList filteredTargetClassInstanceReferences = new ArrayList();
    if(targetClassInstanceReferences!=null)
    {


      Iterator it=targetClassInstanceReferences.iterator();
      while(it.hasNext())
      {
        Object cop=(Object)it.next();
        //System.out.println("getSymbolsForInstance "+className+" "+ namespc+" "+ cop);
        Map map = dc.getSymbolsForInstance(className, namespc, cop);
        //System.out.println("map.size() "+map.size()+" "+map.toString());
        //symTab.populateInstanceValuesForCollect(className, className, cop, map);
        //NRJ
        symTab.populateInstanceValuesForInstance(className, className, cop, map);
        Boolean result = (Boolean)expressionForTarget.evaluate();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.