diff --git a/src/eva2/server/go/problems/MatlabProblem.java b/src/eva2/server/go/problems/MatlabProblem.java index 11b9b70c..00d860e1 100644 --- a/src/eva2/server/go/problems/MatlabProblem.java +++ b/src/eva2/server/go/problems/MatlabProblem.java @@ -37,8 +37,8 @@ public class MatlabProblem extends AbstractOptimizationProblem implements Interf transient PrintStream dos = null; private double range[][] = null; private static String defTestOut = "matlabproblem-debug.log"; - private static String resOutFile = "matlabproblem-output.txt"; - transient PrintStream resOutStream = null; +// private static String resOutFile = "matlabproblem-output.txt"; +// transient PrintStream resOutStream = null; int verbosityLevel = 0; private MatlabEvalMediator handler = null; private boolean isDouble = true; @@ -228,9 +228,12 @@ public class MatlabProblem extends AbstractOptimizationProblem implements Interf handler.setFinished(false); runnable = OptimizerFactory.getOptRunnable(optType, (AbstractOptimizationProblem)this, outputFilePrefix); // runnable.getGOParams().setPostProcessParams(new PostProcessParams(0, 0.01, 5)); -// log("in MP optimize B\n"); + log("in MP optimize B\n"); + log("Setting text listener, verbo " + verbosityLevel + "\n"); runnable.setTextListener(this); runnable.setVerbosityLevel(verbosityLevel); + if (verbosityLevel>0) runnable.setOutputTo(2); // both file + window + else runnable.setOutputTo(1); // only window runnable.setOutputAdditionalInfo(true); // log("in MP optimize C\n"); @@ -396,17 +399,18 @@ public class MatlabProblem extends AbstractOptimizationProblem implements Interf } public void print(String str) { - if (resOutStream==null) { - try { - resOutStream = new PrintStream(new FileOutputStream(resOutFile)); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - } +// System.err.println("MP print: " + str); +// if (resOutStream==null) { +// try { +// resOutStream = new PrintStream(new FileOutputStream(resOutFile)); +// } catch (FileNotFoundException e) { +// e.printStackTrace(); +// } +// } if (verbosityLevel > 0) { // matlab displays sysout output in the command window, so we simply use this channel System.out.print(str); - if (resOutStream != null) resOutStream.print(str); +// if (resOutStream != null) resOutStream.print(str); } log(str); } diff --git a/src/eva2/server/stat/AbstractStatistics.java b/src/eva2/server/stat/AbstractStatistics.java index 2437b2c0..df1b62f3 100644 --- a/src/eva2/server/stat/AbstractStatistics.java +++ b/src/eva2/server/stat/AbstractStatistics.java @@ -90,7 +90,9 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter } public void addTextListener(InterfaceTextListener listener) { - if (!textListeners.contains(listener)) textListeners.add(listener); + if (!textListeners.contains(listener)) { + textListeners.add(listener); + } } public boolean removeTextListener(InterfaceTextListener listener) { diff --git a/src/eva2/server/stat/StatisticsStandalone.java b/src/eva2/server/stat/StatisticsStandalone.java index 0b9b06b6..414b9ced 100644 --- a/src/eva2/server/stat/StatisticsStandalone.java +++ b/src/eva2/server/stat/StatisticsStandalone.java @@ -37,7 +37,7 @@ import eva2.tools.Mathematics; public class StatisticsStandalone extends AbstractStatistics implements InterfaceStatistics, Serializable { private static final long serialVersionUID = 2621394534751748968L; - private static String m_MyHostName = "not def"; + private static String m_MyHostName = "unknown"; private String m_InfoString; private ArrayList[]> m_Result; diff --git a/src/eva2/server/stat/StatsParameter.java b/src/eva2/server/stat/StatsParameter.java index 5551b3f9..0ecfa750 100644 --- a/src/eva2/server/stat/StatsParameter.java +++ b/src/eva2/server/stat/StatsParameter.java @@ -96,8 +96,11 @@ public class StatsParameter implements InterfaceStatisticsParameter, Serializabl */ public String toString() { String ret = "\r\nStatParameter:\r\nm_MultiRuns=" + m_MultiRuns + - "\r\nm_Textoutput=" + m_Textoutput + - "\r\nm_Plotoutput=" + m_Plotoutput; + "\nm_Textoutput=" + m_Textoutput + + "\nm_Plotoutput=" + m_Plotoutput + + "\nverbosity= " + outputVerbosity.getSelectedString() + + "\n" + outputTo.getSelectedString() + + "\n"; return ret; }