Cleanup of unused code. Removed further traces of TRACE.
This commit is contained in:
parent
5c77484a11
commit
827b107d44
@ -63,7 +63,7 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
|
|
||||||
// if not null, the module is loaded automatically and no other can be selected
|
// if not null, the module is loaded automatically and no other can be selected
|
||||||
private String useDefaultModule = null; //"Genetic_Optimization";
|
private String useDefaultModule = null; //"Genetic_Optimization";
|
||||||
private boolean localMode = false;
|
|
||||||
|
|
||||||
// measuring optimization runtime
|
// measuring optimization runtime
|
||||||
private long startTime = 0;
|
private long startTime = 0;
|
||||||
@ -471,8 +471,8 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
LOGGER.log(Level.INFO, "Working directory is: {0}", System.getProperty("user.dir"));
|
LOGGER.log(Level.FINE, "Working directory is: {0}", System.getProperty("user.dir"));
|
||||||
LOGGER.log(Level.INFO, "Class path is: {0}", System.getProperty("java.class.path", "."));
|
LOGGER.log(Level.FINE, "Class path is: {0}", System.getProperty("java.class.path", "."));
|
||||||
|
|
||||||
if (!(configurationPane.isVisible())) {
|
if (!(configurationPane.isVisible())) {
|
||||||
configurationPane.setVisible(true);
|
configurationPane.setVisible(true);
|
||||||
@ -529,7 +529,7 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// Properties for Mac OS X support.
|
// Properties for Mac OS X support.
|
||||||
if ((System.getProperty("mrj.version") != null)
|
if ((System.getProperty("mrj.version") != null)
|
||||||
|| (System.getProperty("os.name").toLowerCase().indexOf("mac") != -1)) {
|
|| (System.getProperty("os.name").toLowerCase().contains("mac"))) {
|
||||||
/*
|
/*
|
||||||
* Note: the xDock name property must be set before parsing
|
* Note: the xDock name property must be set before parsing
|
||||||
* command-line arguments! See above!
|
* command-line arguments! See above!
|
||||||
@ -545,13 +545,7 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
System.setProperty("com.apple.mrj.application.live-resize", "true");
|
System.setProperty("com.apple.mrj.application.live-resize", "true");
|
||||||
try {
|
try {
|
||||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
|
||||||
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
|
||||||
} catch (InstantiationException e) {
|
|
||||||
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
|
||||||
} catch (UnsupportedLookAndFeelException e) {
|
|
||||||
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -689,7 +683,7 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
};
|
};
|
||||||
|
|
||||||
actQuit = new ExtAction("&Quit", "Quit EvA2 workbench",
|
actQuit = new ExtAction("&Quit", "Quit EvA2 workbench",
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_Q, Event.CTRL_MASK)) {
|
KeyStroke.getKeyStroke(KeyEvent.VK_Q, InputEvent.CTRL_MASK)) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final ActionEvent event) {
|
public void actionPerformed(final ActionEvent event) {
|
||||||
@ -698,7 +692,7 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
};
|
};
|
||||||
|
|
||||||
actPreferences = new ExtAction("&Preferences", "Show preferences dialog",
|
actPreferences = new ExtAction("&Preferences", "Show preferences dialog",
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.CTRL_MASK)) {
|
KeyStroke.getKeyStroke(KeyEvent.VK_P, InputEvent.CTRL_MASK)) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final ActionEvent event) {
|
public void actionPerformed(final ActionEvent event) {
|
||||||
@ -740,16 +734,6 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
private void buildMenu() {
|
private void buildMenu() {
|
||||||
JMenuBar menuBar = new JMenuBar();
|
JMenuBar menuBar = new JMenuBar();
|
||||||
setJMenuBar(menuBar);
|
setJMenuBar(menuBar);
|
||||||
JExtMenu menuModule = new JExtMenu("&Module");
|
|
||||||
//menuModule.add(actModuleLoad);
|
|
||||||
|
|
||||||
JExtMenu menuSelHosts = new JExtMenu("&Select Hosts");
|
|
||||||
//menuSelHosts.setToolTipText("Select a host for the server application");
|
|
||||||
//menuSelHosts.add(actHost);
|
|
||||||
//menuSelHosts.add(actAvailableHost);
|
|
||||||
//menuSelHosts.addSeparator();
|
|
||||||
//menuSelHosts.add(actKillHost);
|
|
||||||
//menuSelHosts.add(actKillAllHosts);
|
|
||||||
|
|
||||||
JExtMenu menuHelp = new JExtMenu("&Help");
|
JExtMenu menuHelp = new JExtMenu("&Help");
|
||||||
menuHelp.add(actHelp);
|
menuHelp.add(actHelp);
|
||||||
@ -762,10 +746,6 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
//menuOptions.add(menuSelHosts);
|
//menuOptions.add(menuSelHosts);
|
||||||
menuOptions.addSeparator();
|
menuOptions.addSeparator();
|
||||||
menuOptions.add(actQuit);
|
menuOptions.add(actQuit);
|
||||||
// this is accessible if no default module is given
|
|
||||||
//if (showLoadModules) {
|
|
||||||
// menuBar.add(menuModule);
|
|
||||||
//}
|
|
||||||
|
|
||||||
menuBar.add(menuOptions);
|
menuBar.add(menuOptions);
|
||||||
menuBar.add(((JExtDesktopPane) desktopPane).getWindowMenu());
|
menuBar.add(((JExtDesktopPane) desktopPane).getWindowMenu());
|
||||||
@ -830,7 +810,6 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newModuleAdapter.setConnection(!localMode);
|
|
||||||
newModuleAdapter.addOptimizationStateListener(this);
|
newModuleAdapter.addOptimizationStateListener(this);
|
||||||
try {
|
try {
|
||||||
if (withGUI) {
|
if (withGUI) {
|
||||||
|
@ -18,8 +18,6 @@ abstract public class AbstractModuleAdapter implements ModuleAdapter, Serializab
|
|||||||
protected int instanceNumber;
|
protected int instanceNumber;
|
||||||
protected String adapterName;
|
protected String adapterName;
|
||||||
protected InterfaceProcessor processor;
|
protected InterfaceProcessor processor;
|
||||||
protected String hostName = "not defined";
|
|
||||||
protected boolean hasConnection = true;
|
|
||||||
protected ModuleAdapter remoteModuleAdapter = null;
|
protected ModuleAdapter remoteModuleAdapter = null;
|
||||||
private List<OptimizationStateListener> optimizationStateListeners;
|
private List<OptimizationStateListener> optimizationStateListeners;
|
||||||
|
|
||||||
@ -47,14 +45,6 @@ abstract public class AbstractModuleAdapter implements ModuleAdapter, Serializab
|
|||||||
processor.startOptimization();
|
processor.startOptimization();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Restart optimization on processor.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void restartOptimization() {
|
|
||||||
processor.restartOptimization();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop optimization on processor.
|
* Stop optimization on processor.
|
||||||
*/
|
*/
|
||||||
@ -104,11 +94,7 @@ abstract public class AbstractModuleAdapter implements ModuleAdapter, Serializab
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOptRunning() {
|
public boolean isOptRunning() {
|
||||||
if ((processor != null) && (processor instanceof Processor)) {
|
return (processor != null) && (processor instanceof Processor) && ((Processor) processor).isOptimizationRunning();
|
||||||
return ((Processor) processor).isOptimizationRunning();
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -118,25 +104,6 @@ abstract public class AbstractModuleAdapter implements ModuleAdapter, Serializab
|
|||||||
public void addOptimizationStateListener(OptimizationStateListener remoteListener) {
|
public void addOptimizationStateListener(OptimizationStateListener remoteListener) {
|
||||||
optimizationStateListeners.add(remoteListener);
|
optimizationStateListeners.add(remoteListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void setConnection(boolean flag) {
|
|
||||||
hasConnection = flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns whether the module has a connection.
|
|
||||||
*
|
|
||||||
* @return true if the adapter has a connection.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean hasConnection() {
|
|
||||||
return hasConnection;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -30,8 +30,6 @@ public interface ModuleAdapter extends OptimizationStateListener {
|
|||||||
*/
|
*/
|
||||||
OptimizationJob scheduleJob();
|
OptimizationJob scheduleJob();
|
||||||
|
|
||||||
void restartOptimization();
|
|
||||||
|
|
||||||
void stopOptimization();
|
void stopOptimization();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,8 +47,4 @@ public interface ModuleAdapter extends OptimizationStateListener {
|
|||||||
boolean startPostProcessing();
|
boolean startPostProcessing();
|
||||||
|
|
||||||
void addOptimizationStateListener(OptimizationStateListener x);
|
void addOptimizationStateListener(OptimizationStateListener x);
|
||||||
|
|
||||||
void setConnection(boolean flag);
|
|
||||||
|
|
||||||
boolean hasConnection();
|
|
||||||
}
|
}
|
@ -57,9 +57,6 @@ public abstract class AbstractSynchronousOptimizationProblem extends
|
|||||||
@Override
|
@Override
|
||||||
protected void changeProblemAt(double problemTime) {
|
protected void changeProblemAt(double problemTime) {
|
||||||
incProblemTime(shiftPerChange);
|
incProblemTime(shiftPerChange);
|
||||||
if (TRACE) {
|
|
||||||
System.out.println("problem shiftet at " + problemTime + " per " + shiftPerChange);
|
|
||||||
}
|
|
||||||
evalsSinceChange = 0.;
|
evalsSinceChange = 0.;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,9 +76,6 @@ public abstract class AbstractSynchronousOptimizationProblem extends
|
|||||||
*/
|
*/
|
||||||
protected void setConstantProblemEvals(double constEvals) {
|
protected void setConstantProblemEvals(double constEvals) {
|
||||||
constantProblemEvals = constEvals;
|
constantProblemEvals = constEvals;
|
||||||
if (TRACE) {
|
|
||||||
System.out.println("setConstantProblemEvals: " + constEvals);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -53,10 +53,6 @@ public class DynJumpProblem extends AbstractDynTransProblem {
|
|||||||
protected void changeProblemAt(double problemTime) {
|
protected void changeProblemAt(double problemTime) {
|
||||||
super.changeProblemAt(problemTime);
|
super.changeProblemAt(problemTime);
|
||||||
makeTranslation();
|
makeTranslation();
|
||||||
/* prooving results */
|
|
||||||
if (TRACE) {
|
|
||||||
writeFile();
|
|
||||||
}
|
|
||||||
++changeCounter;
|
++changeCounter;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,13 +106,6 @@ public class DynJumpProblem extends AbstractDynTransProblem {
|
|||||||
/* Update previousMovement */
|
/* Update previousMovement */
|
||||||
previousMovement[i] = shift[i];
|
previousMovement[i] = shift[i];
|
||||||
}
|
}
|
||||||
if (TRACE) {
|
|
||||||
System.out.print("Jumped to ");
|
|
||||||
for (int i = 0; i < getProblemDimension(); i++) {
|
|
||||||
System.out.print(" " + translation[i]);
|
|
||||||
}
|
|
||||||
System.out.println();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user