Example #1
0
 private static double[][] readParmsOfParetoFront(String exp, int trial, int nObj) {
   int nSolnsOnFront =
       ECStatOutputReader.readParetoFronts("output/" + exp + "/job." + trial + ".pareto", nObj)
           .length;
   return ECStatOutputReader.readParetoBestSolutions(
       "output/" + exp + "/job." + trial + ".Full", nSolnsOnFront, 50);
 }
Example #2
0
 public static Izhikevich9pModelMC readModel(String exp, int trial) {
   File newFile = new File("output/" + exp + "/job." + trial + ".Full");
   if (!(newFile).exists()) {
     System.out.println("file not found! skipping.." + "file: " + newFile.getAbsolutePath());
     return null;
   }
   double[] parms =
       ECStatOutputReader.readBestSolution("output/" + exp + "/job." + trial + ".Full", 50);
   Izhikevich9pModelMC model = getRightInstanceForModel();
   EAGenes genes = new EAGenes(parms, iso_comp);
   model.setK(genes.getK());
   model.setA(genes.getA());
   model.setB(genes.getB());
   model.setD(genes.getD());
   model.setcM(genes.getCM());
   model.setvR(genes.getVR());
   model.setvT(genes.getVT());
   model.setvMin(genes.getVMIN());
   model.setvPeak(genes.getVPEAK());
   model.setG(genes.getG());
   model.setP(genes.getP());
   double[] I = genes.getI();
   // System.out.println(I[0]);
   model.setInputParameters(new double[] {I[0]}, 0d, 0d);
   return model;
 }
Example #3
0
  private static int getBestTrial(int nJobs, String nodes) {
    float[] fitness = new float[nJobs];
    System.out.println("Jobs Fitness:");
    for (int job = 0; job < nJobs; job++) {
      fitness[job] =
          ECStatOutputReader.readBestFitness(
              "output/" + nodes + "/job." + job
                  + ".Full"); // "C:\\Users\\Siva\\TIME\\ECJ Izhikevich\\output\\I2, 3 - BEST so
                              // far\\job."+job+".Full", 5);//
      // fitness[job] = ECStatOutputReader.readBestFitness("output/"+nodes+"/$Full_0_"+job,
      // 5);//"C:\\Users\\Siva\\TIME\\ECJ Izhikevich\\output\\I2, 3 - BEST so
      // far\\job."+job+".Full", 5);//

      System.out.println(job + "\t" + fitness[job]);
    }
    // find min fitness:
    float maxFit = -Float.MAX_VALUE;
    int maxFitJob = -1;
    for (int job = 0; job < fitness.length; job++) {
      if (fitness[job] > maxFit) {
        maxFit = fitness[job];
        maxFitJob = job;
      }
    }
    System.out.println("Best Job:\t" + maxFitJob);
    ;
    System.out.println("**********************************************");

    return maxFitJob;
  }
Example #4
0
 public static double[] readBestParms(String exp, int best_trial) {
   double[] parms =
       ECStatOutputReader.readBestSolution(
           "output/" + exp + "/job." + best_trial + ".Full",
           50); // "C:\\Users\\Siva\\TIME\\ECJ Izhikevich\\output\\I2, 3 - BEST so
                // far\\job."+best_trial+".Full",6,11);//
   return parms;
 }
Example #5
0
 private static int findNGen(String exp, int best_trial) {
   return ECStatOutputReader.findNGen(
       "output/"
           + exp
           + "/job."
           + best_trial
           + ".Stat"); // "C:\\Users\\Siva\\TIME\\ECJ Izhikevich\\output\\I2, 3 - BEST so
                       // far\\job."+best_trial+".Full",6,11);//
 }