private static double[] run(ModelInterface aC_model, int ai_mcn, double[] ada_bestvalues) { int li_breakcond = 0; java.text.NumberFormat fn = (java.text.NumberFormat) java.text.NumberFormat.getInstance(java.util.Locale.GERMANY); fn.setMaximumFractionDigits(100); double best = 10E10; TestFunction fct = aC_model.getFct(); fct.resetSeverity(); while (li_breakcond != ai_mcn) { /* Iterate one step, method returns true if a perfect solution was found inside, * when having fit(i) = 0, prevents devision by Zero (calc Select Probs) and * breaks further calculations (onlookers). */ aC_model.Iterate(); fct.addToSeverity(0.1); // save the last best Solution lC_globalbest = aC_model.getBestSolution(); /* on every step the best, later be used to make a mean with more experiments */ ada_bestvalues[li_breakcond] = lC_globalbest.value; li_breakcond++; } double[] ld_best_it = new double[2]; ld_best_it[0] = best; ld_best_it[1] = li_breakcond; return ld_best_it; }