Further code cleanup
refs #2 - Removed old comments - Fixed typos - Removed unused code
This commit is contained in:
parent
857fd35977
commit
c93b3ae0ff
@ -45,8 +45,6 @@ public class EvAInfo {
|
|||||||
public static final String infoTitle = productName + " Information";
|
public static final String infoTitle = productName + " Information";
|
||||||
public static final String copyrightYear = "2010-2014";
|
public static final String copyrightYear = "2010-2014";
|
||||||
|
|
||||||
////////////// Property handling...
|
|
||||||
|
|
||||||
private static Properties evaProperties;
|
private static Properties evaProperties;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@ -102,8 +100,4 @@ public class EvAInfo {
|
|||||||
public static String propDefaultModule() {
|
public static String propDefaultModule() {
|
||||||
return getProperty("DefaultModule");
|
return getProperty("DefaultModule");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String propShowModules() {
|
|
||||||
return getProperty("ShowModules");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -19,8 +19,6 @@ import java.util.logging.Logger;
|
|||||||
/**
|
/**
|
||||||
* Some miscellaneous functions to help with Beans, reflection, conversion and
|
* Some miscellaneous functions to help with Beans, reflection, conversion and
|
||||||
* generic display.
|
* generic display.
|
||||||
*
|
|
||||||
* @author mkron, Holger Ulmer, Felix Streichert, Hannes Planatscher
|
|
||||||
*/
|
*/
|
||||||
public class BeanInspector {
|
public class BeanInspector {
|
||||||
private static final Logger LOGGER = Logger.getLogger(BeanInspector.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(BeanInspector.class.getName());
|
||||||
@ -164,13 +162,11 @@ public class BeanInspector {
|
|||||||
}
|
}
|
||||||
int len = Array.getLength(obj);
|
int len = Array.getLength(obj);
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
// sbuf.append(toString(Array.get(obj, i)));
|
|
||||||
if (withNewlines) {
|
if (withNewlines) {
|
||||||
sbuf.append('\n');
|
sbuf.append('\n');
|
||||||
}
|
}
|
||||||
sbuf.append(toString(Array.get(obj, i), delim, tight, indentStr, indentDepth, withNewlines));
|
sbuf.append(toString(Array.get(obj, i), delim, tight, indentStr, indentDepth, withNewlines));
|
||||||
if (i < len - 1) {
|
if (i < len - 1) {
|
||||||
// sbuf.append(delim);
|
|
||||||
if (!tight) {
|
if (!tight) {
|
||||||
sbuf.append(" ");
|
sbuf.append(" ");
|
||||||
}
|
}
|
||||||
@ -216,7 +212,6 @@ public class BeanInspector {
|
|||||||
for (int ii = 0; ii < methods.length; ii++) { // check if the object has its own toString method, in this case use it
|
for (int ii = 0; ii < methods.length; ii++) { // check if the object has its own toString method, in this case use it
|
||||||
if ((methods[ii].getName().equals("toString") /*|| (methods[ii].getName().equals("getStringRepresentation"))*/) && (methods[ii].getParameterTypes().length == 0)) {
|
if ((methods[ii].getName().equals("toString") /*|| (methods[ii].getName().equals("getStringRepresentation"))*/) && (methods[ii].getParameterTypes().length == 0)) {
|
||||||
Object[] args = new Object[0];
|
Object[] args = new Object[0];
|
||||||
//args[0] = obj;
|
|
||||||
try {
|
try {
|
||||||
String ret = (String) methods[ii].invoke(obj, args);
|
String ret = (String) methods[ii].invoke(obj, args);
|
||||||
return makeIndent(indentStr, indentDepth) + ret;
|
return makeIndent(indentStr, indentDepth) + ret;
|
||||||
@ -292,8 +287,6 @@ public class BeanInspector {
|
|||||||
System.out.println("----");
|
System.out.println("----");
|
||||||
System.out.println(BeanInspector.toString(new Population(), ';', false, ">", 1, false));
|
System.out.println(BeanInspector.toString(new Population(), ';', false, ">", 1, false));
|
||||||
System.out.println(BeanInspector.toString(new GeneticAlgorithm(), ';', false, ">", 1, false));
|
System.out.println(BeanInspector.toString(new GeneticAlgorithm(), ';', false, ">", 1, false));
|
||||||
// System.out.println(BeanInspector.toString(new Population(), ',', false, "\t"));
|
|
||||||
// System.out.println(BeanInspector.toString(new GeneticAlgorithm(), ',', false, "\t"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -308,7 +301,6 @@ public class BeanInspector {
|
|||||||
public static Pair<String[], Object[]> getPublicPropertiesOf(Object target, boolean requireSetter, boolean showHidden) {
|
public static Pair<String[], Object[]> getPublicPropertiesOf(Object target, boolean requireSetter, boolean showHidden) {
|
||||||
BeanInfo Info = null;
|
BeanInfo Info = null;
|
||||||
PropertyDescriptor[] Properties = null;
|
PropertyDescriptor[] Properties = null;
|
||||||
// MethodDescriptor[] Methods = null;
|
|
||||||
try {
|
try {
|
||||||
Info = Introspector.getBeanInfo(target.getClass());
|
Info = Introspector.getBeanInfo(target.getClass());
|
||||||
Properties = Info.getPropertyDescriptors();
|
Properties = Info.getPropertyDescriptors();
|
||||||
@ -322,21 +314,15 @@ public class BeanInspector {
|
|||||||
Object[] valArray = new Object[Properties.length];
|
Object[] valArray = new Object[Properties.length];
|
||||||
for (int i = 0; i < Properties.length; i++) {
|
for (int i = 0; i < Properties.length; i++) {
|
||||||
if ((Properties[i].isHidden() && !showHidden) || Properties[i].isExpert()) {
|
if ((Properties[i].isHidden() && !showHidden) || Properties[i].isExpert()) {
|
||||||
// System.err.println(Properties[i].getDisplayName() + " is " + ( (Properties[i].isExpert())? "expert": "hidden"));
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String name = Properties[i].getDisplayName();
|
String name = Properties[i].getDisplayName();
|
||||||
//System.out.println("name = "+name );
|
|
||||||
//Class type = Properties[i].getPropertyType();
|
|
||||||
//System.out.println("type = "+type.getName() );
|
|
||||||
Method getter = Properties[i].getReadMethod();
|
Method getter = Properties[i].getReadMethod();
|
||||||
Method setter = Properties[i].getWriteMethod();
|
Method setter = Properties[i].getWriteMethod();
|
||||||
// Only display read/write properties.
|
// Only display read/write properties.
|
||||||
if (getter == null || (setter == null && requireSetter)) {
|
if (getter == null || (setter == null && requireSetter)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//System.out.println("name = "+name );
|
|
||||||
//System.out.println("type = "+type.getName() );
|
|
||||||
Object args[] = {};
|
Object args[] = {};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -375,7 +361,6 @@ public class BeanInspector {
|
|||||||
// then the properties
|
// then the properties
|
||||||
BeanInfo Info = null;
|
BeanInfo Info = null;
|
||||||
PropertyDescriptor[] Properties = null;
|
PropertyDescriptor[] Properties = null;
|
||||||
// MethodDescriptor[] Methods = null;
|
|
||||||
try {
|
try {
|
||||||
Info = Introspector.getBeanInfo(obj.getClass());
|
Info = Introspector.getBeanInfo(obj.getClass());
|
||||||
Properties = Info.getPropertyDescriptors();
|
Properties = Info.getPropertyDescriptors();
|
||||||
@ -390,17 +375,12 @@ public class BeanInspector {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String name = Properties[i].getDisplayName();
|
String name = Properties[i].getDisplayName();
|
||||||
//System.out.println("name = "+name );
|
|
||||||
// Class type = Properties[i].getPropertyType();
|
|
||||||
//System.out.println("type = "+type.getName() );
|
|
||||||
Method getter = Properties[i].getReadMethod();
|
Method getter = Properties[i].getReadMethod();
|
||||||
Method setter = Properties[i].getWriteMethod();
|
Method setter = Properties[i].getWriteMethod();
|
||||||
// Only display read/write properties.
|
// Only display read/write properties.
|
||||||
if (getter == null || setter == null) {
|
if (getter == null || setter == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//System.out.println("name = "+name );
|
|
||||||
//System.out.println("type = "+type.getName() );
|
|
||||||
Object args[] = {};
|
Object args[] = {};
|
||||||
try {
|
try {
|
||||||
Object value = getter.invoke(obj, args);
|
Object value = getter.invoke(obj, args);
|
||||||
@ -753,11 +733,11 @@ public class BeanInspector {
|
|||||||
if (val instanceof Integer) {
|
if (val instanceof Integer) {
|
||||||
return ((Integer) val).doubleValue();
|
return ((Integer) val).doubleValue();
|
||||||
} else if (val instanceof Double) {
|
} else if (val instanceof Double) {
|
||||||
return ((Double) val).doubleValue();
|
return (Double) val;
|
||||||
} else if (val instanceof Boolean) {
|
} else if (val instanceof Boolean) {
|
||||||
return (((Boolean) val) ? 1. : 0.);
|
return (((Boolean) val) ? 1. : 0.);
|
||||||
} else if (val instanceof Character) {
|
} else if (val instanceof Character) {
|
||||||
return ((Character) val).charValue();
|
return (Character) val;
|
||||||
} else if (val instanceof Byte) {
|
} else if (val instanceof Byte) {
|
||||||
return ((Byte) val).doubleValue();
|
return ((Byte) val).doubleValue();
|
||||||
} else if (val instanceof Short) {
|
} else if (val instanceof Short) {
|
||||||
@ -816,21 +796,21 @@ public class BeanInspector {
|
|||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
if ((destType == Integer.class) || (destType == int.class)) {
|
if ((destType == Integer.class) || (destType == int.class)) {
|
||||||
return new Integer(d.intValue());
|
return d.intValue();
|
||||||
} else if ((destType == Boolean.class) || (destType == boolean.class)) {
|
} else if ((destType == Boolean.class) || (destType == boolean.class)) {
|
||||||
return (d != 0) ? Boolean.TRUE : Boolean.FALSE;
|
return (d != 0) ? Boolean.TRUE : Boolean.FALSE;
|
||||||
} else if ((destType == Byte.class) || (destType == byte.class)) {
|
} else if ((destType == Byte.class) || (destType == byte.class)) {
|
||||||
return new Byte(d.byteValue());
|
return d.byteValue();
|
||||||
} else if ((destType == Short.class) || (destType == short.class)) {
|
} else if ((destType == Short.class) || (destType == short.class)) {
|
||||||
return new Short(d.shortValue());
|
return d.shortValue();
|
||||||
} else if ((destType == Long.class) || (destType == long.class)) {
|
} else if ((destType == Long.class) || (destType == long.class)) {
|
||||||
return new Long(d.longValue());
|
return d.longValue();
|
||||||
} else if ((destType == Float.class) || (destType == float.class)) {
|
} else if ((destType == Float.class) || (destType == float.class)) {
|
||||||
return new Float(d.floatValue());
|
return d.floatValue();
|
||||||
} else { // this makes hardly sense...
|
} else { // this makes hardly sense...
|
||||||
System.err.println("warning: converting from double to character or void...");
|
System.err.println("warning: converting from double to character or void...");
|
||||||
if ((destType == Character.class) || (destType == char.class)) {
|
if ((destType == Character.class) || (destType == char.class)) {
|
||||||
return new Character(d.toString().charAt(0));
|
return d.toString().charAt(0);
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -891,7 +871,6 @@ public class BeanInspector {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static Object decodeType(Class<?> destType, Object value) {
|
public static Object decodeType(Class<?> destType, Object value) {
|
||||||
// System.err.println("desttype: " + destType.toString() + ", val: " + value.getClass().toString());
|
|
||||||
if (destType.isAssignableFrom(value.getClass())) {
|
if (destType.isAssignableFrom(value.getClass())) {
|
||||||
// value is already of destType or assignable (subclass), so just return it
|
// value is already of destType or assignable (subclass), so just return it
|
||||||
return value;
|
return value;
|
||||||
@ -974,14 +953,10 @@ public class BeanInspector {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
PropertyDescriptor[] properties = bi.getPropertyDescriptors();
|
PropertyDescriptor[] properties = bi.getPropertyDescriptors();
|
||||||
// Method getter = null;
|
|
||||||
Method setter = null;
|
Method setter = null;
|
||||||
Class<?> type = null;
|
Class<?> type = null;
|
||||||
// System.err.println("looking at " + toString(obj));
|
|
||||||
for (int i = 0; i < properties.length; i++) {
|
for (int i = 0; i < properties.length; i++) {
|
||||||
if (properties[i].getDisplayName().equals(mem)) {
|
if (properties[i].getDisplayName().equals(mem)) {
|
||||||
// System.err.println("looking at " + properties[i].getDisplayName());
|
|
||||||
// getter = properties[i].getReadMethod();
|
|
||||||
setter = properties[i].getWriteMethod();
|
setter = properties[i].getWriteMethod();
|
||||||
type = properties[i].getPropertyType();
|
type = properties[i].getPropertyType();
|
||||||
break;
|
break;
|
||||||
@ -989,7 +964,6 @@ public class BeanInspector {
|
|||||||
}
|
}
|
||||||
if (setter != null) {
|
if (setter != null) {
|
||||||
try {
|
try {
|
||||||
// System.out.println("setting value...");
|
|
||||||
Object[] args = new Object[]{decodeType(type, val)};
|
Object[] args = new Object[]{decodeType(type, val)};
|
||||||
if (args[0] != null) {
|
if (args[0] != null) {
|
||||||
setter.invoke(obj, args);
|
setter.invoke(obj, args);
|
||||||
|
@ -1,14 +1,4 @@
|
|||||||
package eva2.gui;
|
package eva2.gui;
|
||||||
/*
|
|
||||||
* Title: EvA2
|
|
||||||
* Description:
|
|
||||||
* Copyright: Copyright (c) 2003
|
|
||||||
* Company: University of Tuebingen, Computer Architecture
|
|
||||||
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
|
|
||||||
* @version: $Revision: 10 $
|
|
||||||
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
|
|
||||||
* $Author: streiche $
|
|
||||||
*/
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
package eva2.gui;
|
package eva2.gui;
|
||||||
/*
|
|
||||||
* Title: EvA2 Description: Copyright: Copyright (c) 2003 Company: University of Tuebingen, Computer
|
|
||||||
* Architecture @author Holger Ulmer, Felix Streichert, Hannes Planatscher @version: $Revision: 10 $
|
|
||||||
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $ $Author: streiche $
|
|
||||||
*/
|
|
||||||
|
|
||||||
import eva2.gui.editor.ComponentFilter;
|
import eva2.gui.editor.ComponentFilter;
|
||||||
|
|
||||||
@ -11,6 +6,7 @@ import javax.swing.*;
|
|||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.event.InputEvent;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.beans.PropertyVetoException;
|
import java.beans.PropertyVetoException;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
@ -55,32 +51,35 @@ public class JExtDesktopPane extends JDesktopPane {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
windowMenu.add(actWindowTileVert = new ExtAction("Tile &Vertically", "Tiles all windows vertically",
|
actWindowTileVert = new ExtAction("Tile &Vertically", "Tiles all windows vertically",
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_COMMA, Event.CTRL_MASK)) {
|
KeyStroke.getKeyStroke(KeyEvent.VK_COMMA, InputEvent.CTRL_MASK)) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final ActionEvent event) {
|
public void actionPerformed(final ActionEvent event) {
|
||||||
tileWindows(SwingConstants.HORIZONTAL);
|
tileWindows(SwingConstants.HORIZONTAL);
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
windowMenu.add(actWindowTileVert);
|
||||||
|
|
||||||
windowMenu.add(actWindowTileHorz = new ExtAction("Tile &Horizontally", "Tiles all windows horizontically",
|
actWindowTileHorz = new ExtAction("Tile &Horizontally", "Tiles all windows horizontically",
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, Event.CTRL_MASK)) {
|
KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, InputEvent.CTRL_MASK)) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final ActionEvent event) {
|
public void actionPerformed(final ActionEvent event) {
|
||||||
tileWindows(SwingConstants.VERTICAL);
|
tileWindows(SwingConstants.VERTICAL);
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
windowMenu.add(actWindowTileHorz);
|
||||||
|
|
||||||
windowMenu.add(actWindowOverlap = new ExtAction("&Cascade Windows", "Cascades all visible windows",
|
actWindowOverlap = new ExtAction("&Cascade Windows", "Cascades all visible windows",
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_M, Event.CTRL_MASK)) {
|
KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_MASK)) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final ActionEvent event) {
|
public void actionPerformed(final ActionEvent event) {
|
||||||
overlapWindows();
|
overlapWindows();
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
windowMenu.add(actWindowOverlap);
|
||||||
|
|
||||||
windowMenu.addSeparator();
|
windowMenu.addSeparator();
|
||||||
desktopManager.WINDOW_LIST_START = 4;
|
desktopManager.WINDOW_LIST_START = 4;
|
||||||
@ -232,7 +231,7 @@ public class JExtDesktopPane extends JDesktopPane {
|
|||||||
} else {
|
} else {
|
||||||
f.setSelected(true);
|
f.setSelected(true);
|
||||||
}
|
}
|
||||||
} catch (PropertyVetoException exc) {
|
} catch (PropertyVetoException ignore) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -240,18 +239,17 @@ public class JExtDesktopPane extends JDesktopPane {
|
|||||||
@Override
|
@Override
|
||||||
public void addImpl(Component comp, Object constraints, int index) {
|
public void addImpl(Component comp, Object constraints, int index) {
|
||||||
super.addImpl(comp, constraints, index);
|
super.addImpl(comp, constraints, index);
|
||||||
//System.out.println("JExtDesktopPane.addImpl");
|
|
||||||
if (comp instanceof JInternalFrame) {
|
if (comp instanceof JInternalFrame) {
|
||||||
JInternalFrame docFrame = (JInternalFrame) comp;
|
JInternalFrame docFrame = (JInternalFrame) comp;
|
||||||
int frameIndex = windowMenu.getItemCount() - desktopManager.WINDOW_LIST_START + 1;
|
int frameIndex = windowMenu.getItemCount() - desktopManager.WINDOW_LIST_START + 1;
|
||||||
if (docFrame.getClientProperty(ExtDesktopManager.INDEX) != null) {
|
if (docFrame.getClientProperty(ExtDesktopManager.INDEX) != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
docFrame.putClientProperty(ExtDesktopManager.INDEX, new Integer(frameIndex));
|
docFrame.putClientProperty(ExtDesktopManager.INDEX, frameIndex);
|
||||||
JMenuItem m = new JMenuItem((frameIndex < 10 ? frameIndex + " " : "") + docFrame.getTitle());
|
JMenuItem m = new JMenuItem((frameIndex < 10 ? frameIndex + " " : "") + docFrame.getTitle());
|
||||||
if (frameIndex < 10) {
|
if (frameIndex < 10) {
|
||||||
m.setMnemonic((char) (0x30 + frameIndex));
|
m.setMnemonic((char) (0x30 + frameIndex));
|
||||||
m.setAccelerator(KeyStroke.getKeyStroke(0x30 + frameIndex, Event.ALT_MASK));
|
m.setAccelerator(KeyStroke.getKeyStroke(0x30 + frameIndex, InputEvent.ALT_MASK));
|
||||||
}
|
}
|
||||||
m.setToolTipText("Shows the window " + docFrame.getTitle());
|
m.setToolTipText("Shows the window " + docFrame.getTitle());
|
||||||
m.putClientProperty(ExtDesktopManager.FRAME, docFrame);
|
m.putClientProperty(ExtDesktopManager.FRAME, docFrame);
|
||||||
|
@ -5,10 +5,7 @@ import eva2.optimization.tools.FileTools;
|
|||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
import javax.swing.event.ChangeListener;
|
import javax.swing.event.ChangeListener;
|
||||||
import javax.swing.text.AbstractDocument;
|
import javax.swing.text.*;
|
||||||
import javax.swing.text.AttributeSet;
|
|
||||||
import javax.swing.text.BadLocationException;
|
|
||||||
import javax.swing.text.DocumentFilter;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
@ -367,7 +367,7 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
|
|
||||||
createActions();
|
createActions();
|
||||||
|
|
||||||
setSize(800, 600);
|
setSize(1024, 800);
|
||||||
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
|
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
|
||||||
setLocation((screenSize.width - this.getWidth()) / 2, (int) ((screenSize.height - this.getHeight()) / 2.5));
|
setLocation((screenSize.width - this.getWidth()) / 2, (int) ((screenSize.height - this.getHeight()) / 2.5));
|
||||||
|
|
||||||
@ -533,8 +533,8 @@ 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 | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
|
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
|
||||||
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
LOGGER.log(Level.INFO, "Could not set Look&Feel", ex);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Set Look and Feel */
|
/* Set Look and Feel */
|
||||||
|
@ -170,7 +170,7 @@ public class PropertySheetPanel extends JPanel implements PropertyChangeListener
|
|||||||
propertyTable.setRowHeight(20);
|
propertyTable.setRowHeight(20);
|
||||||
propertyTable.setDragEnabled(false);
|
propertyTable.setDragEnabled(false);
|
||||||
propertyTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
|
propertyTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
|
||||||
propertyTable.setIntercellSpacing(new Dimension(8, 0));
|
//propertyTable.setIntercellSpacing(new Dimension(8, 0));
|
||||||
|
|
||||||
// Close any child windows at this point
|
// Close any child windows at this point
|
||||||
removeAll();
|
removeAll();
|
||||||
|
@ -93,12 +93,12 @@ public class AbstractEAIndividualComparator implements Comparator<Object>, Seria
|
|||||||
*
|
*
|
||||||
* @param indyDataKey
|
* @param indyDataKey
|
||||||
* @param fitnessCriterion
|
* @param fitnessCriterion
|
||||||
* @param priorizeConstraints
|
* @param preferFeasible
|
||||||
* @see #AbstractEAIndividualComparator(int)
|
* @see #AbstractEAIndividualComparator(int)
|
||||||
* @see #AbstractEAIndividualComparator(String)
|
* @see #AbstractEAIndividualComparator(String)
|
||||||
*/
|
*/
|
||||||
public AbstractEAIndividualComparator(String indDataKey, int fitnessCriterion, boolean preferFeasible) {
|
public AbstractEAIndividualComparator(String indyDataKey, int fitnessCriterion, boolean preferFeasible) {
|
||||||
this.indyDataKey = indDataKey;
|
this.indyDataKey = indyDataKey;
|
||||||
this.fitCriterion = fitnessCriterion;
|
this.fitCriterion = fitnessCriterion;
|
||||||
this.preferFeasible = preferFeasible;
|
this.preferFeasible = preferFeasible;
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ public class Processor extends Thread implements InterfaceProcessor, InterfacePo
|
|||||||
|
|
||||||
this.optimizationParameters.getProblem().initializeProblem();
|
this.optimizationParameters.getProblem().initializeProblem();
|
||||||
this.optimizationParameters.getOptimizer().setProblem(this.optimizationParameters.getProblem());
|
this.optimizationParameters.getOptimizer().setProblem(this.optimizationParameters.getProblem());
|
||||||
this.optimizationParameters.getTerminator().init(this.optimizationParameters.getProblem());
|
this.optimizationParameters.getTerminator().initialize(this.optimizationParameters.getProblem());
|
||||||
maybeInitParamCtrl(optimizationParameters);
|
maybeInitParamCtrl(optimizationParameters);
|
||||||
if (this.createInitialPopulations) {
|
if (this.createInitialPopulations) {
|
||||||
this.optimizationParameters.getOptimizer().initialize();
|
this.optimizationParameters.getOptimizer().initialize();
|
||||||
|
@ -42,7 +42,7 @@ public class NoCrossover implements InterfaceCrossover, java.io.Serializable {
|
|||||||
for (int i = 0; i < partners.size(); i++) {
|
for (int i = 0; i < partners.size(); i++) {
|
||||||
result[i + 1] = (AbstractEAIndividual) ((AbstractEAIndividual) partners.get(i)).clone();
|
result[i + 1] = (AbstractEAIndividual) ((AbstractEAIndividual) partners.get(i)).clone();
|
||||||
}
|
}
|
||||||
//in case the crossover was successfull lets give the mutation operators a chance to mate the strategy parameters
|
//in case the crossover was successful lets give the mutation operators a chance to mate the strategy parameters
|
||||||
for (int i = 0; i < result.length; i++) {
|
for (int i = 0; i < result.length; i++) {
|
||||||
result[i].getMutationOperator().crossoverOnStrategyParameters(indy1, partners);
|
result[i].getMutationOperator().crossoverOnStrategyParameters(indy1, partners);
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,6 @@ import eva2.optimization.strategies.InterfaceOptimizer;
|
|||||||
* MOXMigration typically stands for multi-criterial migration.
|
* MOXMigration typically stands for multi-criterial migration.
|
||||||
* For multi-criterial optimization the migration scheme
|
* For multi-criterial optimization the migration scheme
|
||||||
* also may give the subdividing scheme.
|
* also may give the subdividing scheme.
|
||||||
* Created by IntelliJ IDEA.
|
|
||||||
* User: streiche
|
|
||||||
* Date: 15.09.2004
|
|
||||||
* Time: 14:45:15
|
|
||||||
* To change this template use File | Settings | File Templates.
|
|
||||||
*/
|
*/
|
||||||
public interface InterfaceMigration {
|
public interface InterfaceMigration {
|
||||||
|
|
||||||
@ -27,7 +22,7 @@ public interface InterfaceMigration {
|
|||||||
* Typically i'll need some initialization method for
|
* Typically i'll need some initialization method for
|
||||||
* every bit of code i write....
|
* every bit of code i write....
|
||||||
*/
|
*/
|
||||||
public void initMigration(InterfaceOptimizer[] islands);
|
public void initializeMigration(InterfaceOptimizer[] islands);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The migrate method can be called asychnronously or
|
* The migrate method can be called asychnronously or
|
||||||
|
@ -27,7 +27,7 @@ public class MOBestMigration implements InterfaceMigration, java.io.Serializable
|
|||||||
* every bit of code i write....
|
* every bit of code i write....
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initMigration(InterfaceOptimizer[] islands) {
|
public void initializeMigration(InterfaceOptimizer[] islands) {
|
||||||
// pff at a later stage i could initialize a topology here
|
// pff at a later stage i could initialize a topology here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ public class MOClusteringSeparation implements InterfaceMigration, java.io.Seria
|
|||||||
* every bit of code i write....
|
* every bit of code i write....
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initMigration(InterfaceOptimizer[] islands) {
|
public void initializeMigration(InterfaceOptimizer[] islands) {
|
||||||
// pff at a later stage i could initialize a topology here
|
// pff at a later stage i could initialize a topology here
|
||||||
if (this.reuseC) {
|
if (this.reuseC) {
|
||||||
this.kMeans.resetC();
|
this.kMeans.resetC();
|
||||||
|
@ -61,7 +61,7 @@ public class MOConeSeparation implements InterfaceMigration, java.io.Serializabl
|
|||||||
* every bit of code i write....
|
* every bit of code i write....
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initMigration(InterfaceOptimizer[] islands) {
|
public void initializeMigration(InterfaceOptimizer[] islands) {
|
||||||
// pff at a later stage i could initialize a topology here
|
// pff at a later stage i could initialize a topology here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class MOXMeansSeparation implements InterfaceMigration, java.io.Serializa
|
|||||||
* every bit of code i write....
|
* every bit of code i write....
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initMigration(InterfaceOptimizer[] islands) {
|
public void initializeMigration(InterfaceOptimizer[] islands) {
|
||||||
// pff at a later stage i could initialize a topology here
|
// pff at a later stage i could initialize a topology here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ public class SOBestMigration implements InterfaceMigration, java.io.Serializable
|
|||||||
* every bit of code i write....
|
* every bit of code i write....
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initMigration(InterfaceOptimizer[] islands) {
|
public void initializeMigration(InterfaceOptimizer[] islands) {
|
||||||
// pff at a later stage i could initialize a topology here
|
// pff at a later stage i could initialize a topology here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public class SOMONoMigration implements InterfaceMigration, java.io.Serializable
|
|||||||
* every bit of code i write....
|
* every bit of code i write....
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initMigration(InterfaceOptimizer[] islands) {
|
public void initializeMigration(InterfaceOptimizer[] islands) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,11 +8,6 @@ import eva2.optimization.population.Population;
|
|||||||
* a single double values, thus allowing weight aggregation, goal programming and
|
* a single double values, thus allowing weight aggregation, goal programming and
|
||||||
* so on. To allow logging the original double[] values are stored in the userData
|
* so on. To allow logging the original double[] values are stored in the userData
|
||||||
* using the key "MOFitness".
|
* using the key "MOFitness".
|
||||||
* Created by IntelliJ IDEA.
|
|
||||||
* User: streiche
|
|
||||||
* Date: 05.03.2004
|
|
||||||
* Time: 10:44:14
|
|
||||||
* To change this template use File | Settings | File Templates.
|
|
||||||
*/
|
*/
|
||||||
public interface InterfaceMOSOConverter {
|
public interface InterfaceMOSOConverter {
|
||||||
|
|
||||||
@ -43,11 +38,6 @@ public interface InterfaceMOSOConverter {
|
|||||||
*/
|
*/
|
||||||
public void setOutputDimension(int dim);
|
public void setOutputDimension(int dim);
|
||||||
|
|
||||||
// /** This method allows the problem to set the names of the output variables
|
|
||||||
// * @param dim Output names
|
|
||||||
// */
|
|
||||||
// public void setOutputNames(String[] dim);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method processes a single individual
|
* This method processes a single individual
|
||||||
*
|
*
|
||||||
|
@ -683,7 +683,7 @@ public class PostProcess {
|
|||||||
Pair<Integer, Boolean> stepsAbortedFlag = null;
|
Pair<Integer, Boolean> stepsAbortedFlag = null;
|
||||||
for (int i = 0; i < candidates.size(); i++) { // improve each single sub pop
|
for (int i = 0; i < candidates.size(); i++) { // improve each single sub pop
|
||||||
subPop = nmPops.get(i);
|
subPop = nmPops.get(i);
|
||||||
term.init(prob);
|
term.initialize(prob);
|
||||||
|
|
||||||
switch (method) {
|
switch (method) {
|
||||||
case nelderMead:
|
case nelderMead:
|
||||||
|
@ -12,11 +12,6 @@ import eva2.optimization.population.Population;
|
|||||||
* not implemented. All selection method should obey Deb's constraint
|
* not implemented. All selection method should obey Deb's constraint
|
||||||
* handling principle, first select feasible, only if all are infeasible
|
* handling principle, first select feasible, only if all are infeasible
|
||||||
* select the individuals with the smallest constraint violation.
|
* select the individuals with the smallest constraint violation.
|
||||||
* Created by IntelliJ IDEA.
|
|
||||||
* User: streiche
|
|
||||||
* Date: 18.03.2003
|
|
||||||
* Time: 11:24:22
|
|
||||||
* To change this template use Options | File Templates.
|
|
||||||
*/
|
*/
|
||||||
public interface InterfaceSelection {
|
public interface InterfaceSelection {
|
||||||
|
|
||||||
@ -51,12 +46,12 @@ public interface InterfaceSelection {
|
|||||||
/**
|
/**
|
||||||
* This method allows you to select >size< partners for a given Individual
|
* This method allows you to select >size< partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size);
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle the use of obeying the constraint violation principle
|
* Toggle the use of obeying the constraint violation principle
|
||||||
|
@ -77,13 +77,13 @@ public class SelectAll implements InterfaceSelection, java.io.Serializable {
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
/**********************************************************************************************************************
|
||||||
|
@ -160,17 +160,15 @@ public class SelectBestIndividuals implements InterfaceSelection, java.io.Serial
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method returns a global info string
|
* This method returns a global info string
|
||||||
*
|
*
|
||||||
|
@ -158,13 +158,13 @@ public class SelectEPTournaments implements InterfaceSelection, java.io.Serializ
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
/**********************************************************************************************************************
|
||||||
|
@ -105,13 +105,13 @@ public class SelectMOMAIIDominanceCounter implements InterfaceSelection, java.io
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
/**********************************************************************************************************************
|
||||||
|
@ -73,13 +73,13 @@ public class SelectMOMaxiMin implements InterfaceSelection, java.io.Serializable
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
/**********************************************************************************************************************
|
||||||
|
@ -143,13 +143,13 @@ public class SelectMONSGAIICrowedTournament implements InterfaceSelection, java.
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
/**********************************************************************************************************************
|
||||||
|
@ -97,13 +97,13 @@ public class SelectMONonDominated implements InterfaceSelection, java.io.Seriali
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -90,13 +90,13 @@ public class SelectMOPESA implements InterfaceSelection, java.io.Serializable {
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
/**********************************************************************************************************************
|
||||||
|
@ -126,13 +126,13 @@ public class SelectMOPESAII implements InterfaceSelection, java.io.Serializable
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
/**********************************************************************************************************************
|
||||||
|
@ -113,13 +113,13 @@ public class SelectMOSPEAII implements InterfaceSelection, java.io.Serializable
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
/**********************************************************************************************************************
|
||||||
|
@ -133,13 +133,13 @@ public class SelectParticleWheel implements InterfaceSelection, java.io.Serializ
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
/**********************************************************************************************************************
|
||||||
|
@ -96,18 +96,15 @@ public class SelectRandom implements InterfaceSelection, java.io.Serializable {
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already selected parent
|
* @param dad The already selected parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
|
@ -9,11 +9,6 @@ import eva2.tools.math.RNG;
|
|||||||
* also scaling invariant.
|
* also scaling invariant.
|
||||||
* In case of multiple fitness values the selection
|
* In case of multiple fitness values the selection
|
||||||
* critria is selected randomly for each selection event.
|
* critria is selected randomly for each selection event.
|
||||||
* Created by IntelliJ IDEA.
|
|
||||||
* User: streiche
|
|
||||||
* Date: 01.04.2003
|
|
||||||
* Time: 16:17:26
|
|
||||||
* To change this template use Options | File Templates.
|
|
||||||
*/
|
*/
|
||||||
public class SelectTournament implements InterfaceSelection, java.io.Serializable {
|
public class SelectTournament implements InterfaceSelection, java.io.Serializable {
|
||||||
|
|
||||||
@ -112,18 +107,15 @@ public class SelectTournament implements InterfaceSelection, java.io.Serializabl
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************
|
|
||||||
* These are for GUI
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* This method allows the CommonJavaObjectEditorPanel to read the
|
* This method allows the CommonJavaObjectEditorPanel to read the
|
||||||
* name to the current object.
|
* name to the current object.
|
||||||
|
@ -146,13 +146,13 @@ public class SelectXProbRouletteWheel implements InterfaceSelection, java.io.Ser
|
|||||||
* This method allows you to select partners for a given Individual
|
* This method allows you to select partners for a given Individual
|
||||||
*
|
*
|
||||||
* @param dad The already seleceted parent
|
* @param dad The already seleceted parent
|
||||||
* @param avaiablePartners The mating pool.
|
* @param availablePartners The mating pool.
|
||||||
* @param size The number of partners needed.
|
* @param size The number of partners needed.
|
||||||
* @return The selected partners.
|
* @return The selected partners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
|
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
|
||||||
return this.selectFrom(avaiablePartners, size);
|
return this.selectFrom(availablePartners, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,12 +38,12 @@ public class CombinedTerminator implements InterfaceTerminator, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(InterfaceOptimizationProblem prob) {
|
public void initialize(InterfaceOptimizationProblem prob) {
|
||||||
if (t1 != null) {
|
if (t1 != null) {
|
||||||
t1.init(prob);
|
t1.initialize(prob);
|
||||||
}
|
}
|
||||||
if (t2 != null) {
|
if (t2 != null) {
|
||||||
t2.init(prob);
|
t2.initialize(prob);
|
||||||
}
|
}
|
||||||
msg = "Not terminated.";
|
msg = "Not terminated.";
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import eva2.optimization.population.InterfaceSolutionSet;
|
|||||||
import eva2.optimization.population.PopulationInterface;
|
import eva2.optimization.population.PopulationInterface;
|
||||||
import eva2.problems.InterfaceOptimizationProblem;
|
import eva2.problems.InterfaceOptimizationProblem;
|
||||||
import eva2.util.annotation.Description;
|
import eva2.util.annotation.Description;
|
||||||
|
import eva2.util.annotation.Parameter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@ -20,13 +21,14 @@ public class EvaluationTerminator implements InterfaceTerminator,
|
|||||||
/**
|
/**
|
||||||
* Number of fitness calls on the problem which is optimized.
|
* Number of fitness calls on the problem which is optimized.
|
||||||
*/
|
*/
|
||||||
|
@Parameter(name = "Max. Fitness Calls", description = "Number of calls to fitness function.")
|
||||||
protected int maxFitnessCalls = 1000;
|
protected int maxFitnessCalls = 1000;
|
||||||
|
|
||||||
public EvaluationTerminator() {
|
public EvaluationTerminator() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(InterfaceOptimizationProblem prob) {
|
public void initialize(InterfaceOptimizationProblem prob) {
|
||||||
msg = "Not terminated.";
|
msg = "Not terminated.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,14 +76,4 @@ public class EvaluationTerminator implements InterfaceTerminator,
|
|||||||
//System.out.println("getFitnessCalls"+maxFitnessCalls);
|
//System.out.println("getFitnessCalls"+maxFitnessCalls);
|
||||||
return maxFitnessCalls;
|
return maxFitnessCalls;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the tip text for this property
|
|
||||||
*
|
|
||||||
* @return tip text for this property
|
|
||||||
*/
|
|
||||||
public String fitnessCallsTipText() {
|
|
||||||
return "number of calls to fitness function.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -23,7 +23,7 @@ public class FitnessValueTerminator implements InterfaceTerminator,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(InterfaceOptimizationProblem prob) {
|
public void initialize(InterfaceOptimizationProblem prob) {
|
||||||
msg = "Not terminated.";
|
msg = "Not terminated.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public class GenerationTerminator implements InterfaceTerminator, Serializable {
|
|||||||
private String msg = "";
|
private String msg = "";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(InterfaceOptimizationProblem prob) {
|
public void initialize(InterfaceOptimizationProblem prob) {
|
||||||
msg = "Not terminated.";
|
msg = "Not terminated.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ public class HistoryConvergenceTerminator implements InterfaceTerminator, Serial
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(InterfaceOptimizationProblem prob) {
|
public void initialize(InterfaceOptimizationProblem prob) {
|
||||||
msg = "Not terminated.";
|
msg = "Not terminated.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,8 +6,6 @@ import eva2.problems.InterfaceOptimizationProblem;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for a termination criterion.
|
* Interface for a termination criterion.
|
||||||
*
|
|
||||||
* @author mkron, streiche
|
|
||||||
*/
|
*/
|
||||||
public interface InterfaceTerminator {
|
public interface InterfaceTerminator {
|
||||||
/**
|
/**
|
||||||
@ -25,5 +23,5 @@ public interface InterfaceTerminator {
|
|||||||
|
|
||||||
public String lastTerminationMessage();
|
public String lastTerminationMessage();
|
||||||
|
|
||||||
public void init(InterfaceOptimizationProblem prob);
|
public void initialize(InterfaceOptimizationProblem prob);
|
||||||
}
|
}
|
@ -29,7 +29,7 @@ public class KnownOptimaFoundTerminator implements InterfaceTerminator, Serializ
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(InterfaceOptimizationProblem prob) {
|
public void initialize(InterfaceOptimizationProblem prob) {
|
||||||
if (prob != null) {
|
if (prob != null) {
|
||||||
if (prob instanceof InterfaceMultimodalProblemKnown) {
|
if (prob instanceof InterfaceMultimodalProblemKnown) {
|
||||||
mProblem = (InterfaceMultimodalProblemKnown) prob;
|
mProblem = (InterfaceMultimodalProblemKnown) prob;
|
||||||
|
@ -43,8 +43,8 @@ public class ParetoMetricTerminator extends PopulationMeasureTerminator implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(InterfaceOptimizationProblem prob) {
|
public void initialize(InterfaceOptimizationProblem prob) {
|
||||||
super.init(prob);
|
super.initialize(prob);
|
||||||
if (prob instanceof AbstractMultiObjectiveOptimizationProblem) {
|
if (prob instanceof AbstractMultiObjectiveOptimizationProblem) {
|
||||||
moProb = (AbstractMultiObjectiveOptimizationProblem) prob;
|
moProb = (AbstractMultiObjectiveOptimizationProblem) prob;
|
||||||
} else {
|
} else {
|
||||||
|
@ -28,8 +28,8 @@ public class PhenotypeConvergenceTerminator extends PopulationMeasureTerminator
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(InterfaceOptimizationProblem prob) {
|
public void initialize(InterfaceOptimizationProblem prob) {
|
||||||
super.init(prob);
|
super.initialize(prob);
|
||||||
// oldPhenNorm = 0;
|
// oldPhenNorm = 0;
|
||||||
oldIndy = null;
|
oldIndy = null;
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ public abstract class PopulationMeasureTerminator implements InterfaceTerminator
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(InterfaceOptimizationProblem prob) {
|
public void initialize(InterfaceOptimizationProblem prob) {
|
||||||
firstTime = true;
|
firstTime = true;
|
||||||
msg = "Not terminated.";
|
msg = "Not terminated.";
|
||||||
// oldFit = null;
|
// oldFit = null;
|
||||||
|
@ -1031,7 +1031,7 @@ public class Population extends ArrayList implements PopulationInterface, Clonea
|
|||||||
* @return The index of the best (worst) individual.
|
* @return The index of the best (worst) individual.
|
||||||
*/
|
*/
|
||||||
public int getIndexOfBestOrWorstIndividual(boolean bBest, Comparator<Object> comparator) {
|
public int getIndexOfBestOrWorstIndividual(boolean bBest, Comparator<Object> comparator) {
|
||||||
ArrayList<?> sorted = sortBy(comparator);
|
ArrayList<?> sorted = getSorted(comparator);
|
||||||
if (bBest) {
|
if (bBest) {
|
||||||
return indexOf(sorted.get(0));
|
return indexOf(sorted.get(0));
|
||||||
} else {
|
} else {
|
||||||
|
@ -12,8 +12,6 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Do some statistical tests on a set of job results. Note that the plausibility (comparability of the
|
* Do some statistical tests on a set of job results. Note that the plausibility (comparability of the
|
||||||
* jobs) is not tested here.
|
* jobs) is not tested here.
|
||||||
*
|
|
||||||
* @author mkron
|
|
||||||
*/
|
*/
|
||||||
public class EvAStatisticalEvaluation {
|
public class EvAStatisticalEvaluation {
|
||||||
|
|
||||||
@ -230,9 +228,6 @@ public class EvAStatisticalEvaluation {
|
|||||||
if (dat1 != null && dat2 != null) {
|
if (dat1 != null && dat2 != null) {
|
||||||
t = Mathematics.tTestEqSizeEqVar(dat1, dat2);
|
t = Mathematics.tTestEqSizeEqVar(dat1, dat2);
|
||||||
}
|
}
|
||||||
// MannWhitneyTest mwt = new MannWhitneyTest(job1.getDoubleDataColumn(field), job2.getDoubleDataColumn(field));
|
|
||||||
// double t = mwt.getSP();
|
|
||||||
// t = roundTo2DecimalPlaces(t);
|
|
||||||
return "" + t;
|
return "" + t;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,7 +238,6 @@ public class EvAStatisticalEvaluation {
|
|||||||
if (dat1 != null && dat2 != null) {
|
if (dat1 != null && dat2 != null) {
|
||||||
t = Mathematics.tTestUnEqSizeEqVar(dat1, dat2);
|
t = Mathematics.tTestUnEqSizeEqVar(dat1, dat2);
|
||||||
}
|
}
|
||||||
// t = roundTo2DecimalPlaces(t);
|
|
||||||
return "" + t;
|
return "" + t;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,7 +248,6 @@ public class EvAStatisticalEvaluation {
|
|||||||
if (dat1 != null && dat2 != null) {
|
if (dat1 != null && dat2 != null) {
|
||||||
t = Mathematics.tTestUnEqSizeUnEqVar(dat1, dat2);
|
t = Mathematics.tTestUnEqSizeUnEqVar(dat1, dat2);
|
||||||
}
|
}
|
||||||
// t = roundTo2DecimalPlaces(t);
|
|
||||||
return "" + t;
|
return "" + t;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,8 +259,6 @@ public class EvAStatisticalEvaluation {
|
|||||||
Object obj = ReflectPackage.instantiateWithParams("jsc.independentsamples.MannWhitneyTest", new Object[]{dat1, dat2}, null);
|
Object obj = ReflectPackage.instantiateWithParams("jsc.independentsamples.MannWhitneyTest", new Object[]{dat1, dat2}, null);
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
Object sp = BeanInspector.callIfAvailable(obj, "getSP", new Object[]{});
|
Object sp = BeanInspector.callIfAvailable(obj, "getSP", new Object[]{});
|
||||||
// System.out.println(BeanInspector.niceToString(obj));
|
|
||||||
// System.out.println("SP val is " + sp);
|
|
||||||
t = (Double) sp;
|
t = (Double) sp;
|
||||||
} else {
|
} else {
|
||||||
System.err.println("For the MannWhitney test, the JSC package is required on the class path!");
|
System.err.println("For the MannWhitney test, the JSC package is required on the class path!");
|
||||||
|
@ -162,16 +162,16 @@ public class GenericStatistics implements Serializable {
|
|||||||
String desc = fields[i].toString(); //System.out.println("desc "+desc);
|
String desc = fields[i].toString(); //System.out.println("desc "+desc);
|
||||||
int istransient = desc.indexOf("transient");
|
int istransient = desc.indexOf("transient");
|
||||||
|
|
||||||
Object FieldValue = null;
|
Object fieldValue = null;
|
||||||
if (istransient == -1 || fields[i].getName().equals("elementData")) { // the elementdatahack
|
if (istransient == -1 || fields[i].getName().equals("elementData")) { // the elementdatahack
|
||||||
fields[i].setAccessible(true);
|
fields[i].setAccessible(true);
|
||||||
try {
|
try {
|
||||||
FieldValue = fields[i].get(target);
|
fieldValue = fields[i].get(target);
|
||||||
if (FieldValue instanceof Double) {
|
if (fieldValue instanceof Double) {
|
||||||
data[index] = ((Double) FieldValue).doubleValue();
|
data[index] = (Double) fieldValue;
|
||||||
}
|
}
|
||||||
if (FieldValue instanceof Integer) {
|
if (fieldValue instanceof Integer) {
|
||||||
data[index] = ((Integer) FieldValue).doubleValue();
|
data[index] = ((Integer) fieldValue).doubleValue();
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
@ -35,14 +35,6 @@ public enum GraphSelectionEnum {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static boolean doPlotCurrentBest(StringSelection sel) {
|
|
||||||
// return sel.isSelected(GraphSelectionEnum.currentBest.ordinal());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public static boolean doPlotRunBest(StringSelection sel) {
|
|
||||||
// return sel.isSelected(GraphSelectionEnum.runBest.ordinal());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
public static boolean doPlotWorst(StringSelection sel) {
|
public static boolean doPlotWorst(StringSelection sel) {
|
||||||
return sel.isSelected(GraphSelectionEnum.currentWorst.ordinal());
|
return sel.isSelected(GraphSelectionEnum.currentWorst.ordinal());
|
||||||
}
|
}
|
||||||
@ -51,14 +43,6 @@ public enum GraphSelectionEnum {
|
|||||||
return sel.isSelected(GraphSelectionEnum.meanFit.ordinal());
|
return sel.isSelected(GraphSelectionEnum.meanFit.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static boolean doPlotCurrentBestFeasible(StringSelection sel) {
|
|
||||||
// return sel.isSelected(GraphSelectionEnum.currentBestFeasible.ordinal());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public static boolean doPlotRunBestFeasible(StringSelection sel) {
|
|
||||||
// return sel.isSelected(GraphSelectionEnum.runBestFeasible.ordinal());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
public static boolean doPlotAvgEucDist(StringSelection sel) {
|
public static boolean doPlotAvgEucDist(StringSelection sel) {
|
||||||
return sel.isSelected(GraphSelectionEnum.avgEucPopDistance.ordinal());
|
return sel.isSelected(GraphSelectionEnum.avgEucPopDistance.ordinal());
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,6 @@ import java.util.List;
|
|||||||
* framework should guarantee that the job is removed as a statistics listener.
|
* framework should guarantee that the job is removed as a statistics listener.
|
||||||
* <p/>
|
* <p/>
|
||||||
* A job contains data fields of a multi-run experiment and header strings describing the data.
|
* A job contains data fields of a multi-run experiment and header strings describing the data.
|
||||||
*
|
|
||||||
* @author mkron
|
|
||||||
*/
|
*/
|
||||||
public class OptimizationJob implements Serializable, InterfaceStatisticsListener {
|
public class OptimizationJob implements Serializable, InterfaceStatisticsListener {
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ public class StatisticsWithGUI extends AbstractStatistics implements Serializabl
|
|||||||
private Graph[][] fitnessGraph;
|
private Graph[][] fitnessGraph;
|
||||||
private Graph[][] statGraph;
|
private Graph[][] statGraph;
|
||||||
private String graphInfoString;
|
private String graphInfoString;
|
||||||
protected int plotCounter;
|
|
||||||
private JTextoutputFrameInterface proxyPrinter;
|
private JTextoutputFrameInterface proxyPrinter;
|
||||||
/*
|
/*
|
||||||
* List of descriptor strings and optional indices. strictly its redundant
|
* List of descriptor strings and optional indices. strictly its redundant
|
||||||
@ -135,7 +134,6 @@ public class StatisticsWithGUI extends AbstractStatistics implements Serializabl
|
|||||||
for (int i = 0; i < fitnessGraph.length; i++) {
|
for (int i = 0; i < fitnessGraph.length; i++) {
|
||||||
fitnessGraph[i] = new Graph[graphCount];
|
fitnessGraph[i] = new Graph[graphCount];
|
||||||
for (int j = 0; j < fitnessGraph[i].length; j++) {
|
for (int j = 0; j < fitnessGraph[i].length; j++) {
|
||||||
// String[] d = (String[]) description.get(i);
|
|
||||||
// this is where the column string for ascii export is created! Uah!
|
// this is where the column string for ascii export is created! Uah!
|
||||||
fitnessGraph[i][j] =
|
fitnessGraph[i][j] =
|
||||||
fitnessFrame[i].getNewGraph(graphDesc.get(j).head + "_"
|
fitnessFrame[i].getNewGraph(graphDesc.get(j).head + "_"
|
||||||
@ -166,12 +164,6 @@ public class StatisticsWithGUI extends AbstractStatistics implements Serializabl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean isValidGraph = fitnessFrame[graph].isValid();
|
boolean isValidGraph = fitnessFrame[graph].isValid();
|
||||||
if (!isValidGraph) {
|
|
||||||
// this happens if the user closed the plot window.
|
|
||||||
// if the plots are reinitialized immediately, the user might get angry, so wait (till next opt start)
|
|
||||||
// EVAERROR.WARNING("fitness graph is invalid, trying to reinitialize...");
|
|
||||||
// initPlots(getDescription());
|
|
||||||
}
|
|
||||||
if (isValidGraph) {
|
if (isValidGraph) {
|
||||||
fitnessGraph[graph][subGraph].setConnectedPoint(x, y);
|
fitnessGraph[graph][subGraph].setConnectedPoint(x, y);
|
||||||
}
|
}
|
||||||
@ -242,6 +234,5 @@ public class StatisticsWithGUI extends AbstractStatistics implements Serializabl
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -131,7 +131,7 @@ public class EvolutionStrategyIPOP extends EvolutionStrategies implements Interf
|
|||||||
// update the stagnation time in the terminator
|
// update the stagnation time in the terminator
|
||||||
if (!isStagnationTimeUserDef() && (fitConvTerm != null)) {
|
if (!isStagnationTimeUserDef() && (fitConvTerm != null)) {
|
||||||
fitConvTerm.setStagnationTime(calcDefaultStagnationTime());
|
fitConvTerm.setStagnationTime(calcDefaultStagnationTime());
|
||||||
fitConvTerm.init(getProblem());
|
fitConvTerm.initialize(getProblem());
|
||||||
}
|
}
|
||||||
bestList.add(best);
|
bestList.add(best);
|
||||||
best = null;
|
best = null;
|
||||||
|
@ -116,7 +116,7 @@ public class IslandModelEA implements InterfacePopulationChangedEventListener, I
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
this.migration.initMigration(this.islands);
|
this.migration.initializeMigration(this.islands);
|
||||||
Population pop;
|
Population pop;
|
||||||
this.population.incrGeneration(); // the island-initialization has increased the island-pop generations.
|
this.population.incrGeneration(); // the island-initialization has increased the island-pop generations.
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ public class IslandModelEA implements InterfacePopulationChangedEventListener, I
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
this.migration.initMigration(this.islands);
|
this.migration.initializeMigration(this.islands);
|
||||||
Population pop;
|
Population pop;
|
||||||
for (int i = 0; i < this.islands.length; i++) {
|
for (int i = 0; i < this.islands.length; i++) {
|
||||||
pop = (Population) this.islands[i].getPopulation().clone();
|
pop = (Population) this.islands[i].getPopulation().clone();
|
||||||
|
@ -33,10 +33,6 @@ public abstract class AbstractObjectEditor implements PropertyEditor, java.beans
|
|||||||
public GeneralGenericObjectEditorPanel objectEditorPanel;
|
public GeneralGenericObjectEditorPanel objectEditorPanel;
|
||||||
public Hashtable editorTable = new Hashtable();
|
public Hashtable editorTable = new Hashtable();
|
||||||
|
|
||||||
/**
|
|
||||||
* ****************************** java.beans.PropertyChangeListener ************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addPropertyChangeListener(PropertyChangeListener l) {
|
public void addPropertyChangeListener(PropertyChangeListener l) {
|
||||||
if (propertyChangeSupport == null) {
|
if (propertyChangeSupport == null) {
|
||||||
|
@ -9,13 +9,7 @@ import java.awt.*;
|
|||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by IntelliJ IDEA.
|
|
||||||
* User: streiche
|
|
||||||
* Date: 09.06.2005
|
|
||||||
* Time: 13:01:18
|
|
||||||
* To change this template use File | Settings | File Templates.
|
|
||||||
*/
|
*/
|
||||||
public class FileTools {
|
public class FileTools {
|
||||||
|
|
||||||
|
@ -359,31 +359,6 @@ public class BasicResourceLoader implements ResourceLoader {
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public InputStream getStreamFromClassPath(String resourceLocation) {
|
|
||||||
// String[] dynCP = ReflectPackage.getValidCPArray();
|
|
||||||
// Vector<String> found = new Vector<String>();
|
|
||||||
// for (int i=0; i<dynCP.length; i++) {
|
|
||||||
// System.out.println("reading element "+dynCP[i]);
|
|
||||||
// if (dynCP[i].endsWith(".jar")) {
|
|
||||||
// // those should be found somewhere else
|
|
||||||
//// getClassesFromJarFltr(set, dynCP[i], pckg, includeSubs, reqSuperCls);
|
|
||||||
// } else {
|
|
||||||
// String absRes = dynCP[i];
|
|
||||||
// if (!absRes.endsWith("/")) absRes += "/";
|
|
||||||
// absRes += resourceLocation;
|
|
||||||
// System.out.println("reading from files: "+dynCP[i]);
|
|
||||||
// InputStream in = getStreamFromFile(absRes);
|
|
||||||
// if (in != null) found.add(absRes);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (found.size() == 0) return null;
|
|
||||||
// if (found.size()>1) {
|
|
||||||
// System.err.println("Warning, more than one instance of " + resourceLocation + " were found, returning first of:");
|
|
||||||
// for (int i=0; i<found.size(); i++) System.err.println(found.get(i));
|
|
||||||
// }
|
|
||||||
// return getStreamFromFile(found.get(0));
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the byte data from a file at the given resource location.
|
* Gets the byte data from a file at the given resource location.
|
||||||
*
|
*
|
||||||
@ -626,6 +601,4 @@ public class BasicResourceLoader implements ResourceLoader {
|
|||||||
}
|
}
|
||||||
return userProps;
|
return userProps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,29 +3,19 @@ package eva2.tools;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
/**
|
|
||||||
* Title: EvA2
|
|
||||||
* Description:
|
|
||||||
* Copyright: Copyright (c) 2003
|
|
||||||
* Company: University of Tuebingen, Computer Architecture
|
|
||||||
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
|
|
||||||
* @version: $Revision: 245 $
|
|
||||||
* $Date: 2007-11-08 17:24:53 +0100 (Thu, 08 Nov 2007) $
|
|
||||||
* $Author: mkron $
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class EVAERROR {
|
public class EVAERROR {
|
||||||
private static final Logger logger = Logger.getLogger(EVAERROR.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(EVAERROR.class.getName());
|
||||||
private static transient HashMap<String, Boolean> errorMap = null;
|
private static transient HashMap<String, Boolean> errorMap = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static void EXIT(String message) {
|
public static void EXIT(String message) {
|
||||||
logger.log(Level.SEVERE, message);
|
LOGGER.log(Level.SEVERE, message);
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +23,7 @@ public class EVAERROR {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static void EXIT(String message, Exception ex) {
|
public static void EXIT(String message, Exception ex) {
|
||||||
logger.log(Level.SEVERE, message, ex);
|
LOGGER.log(Level.SEVERE, message, ex);
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +31,7 @@ public class EVAERROR {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static void WARNING(String message) {
|
public static void WARNING(String message) {
|
||||||
logger.log(Level.WARNING, message);
|
LOGGER.log(Level.WARNING, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,7 +46,7 @@ public class EVAERROR {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!errorMap.containsKey(message)) {
|
if (!errorMap.containsKey(message)) {
|
||||||
logger.log(Level.SEVERE, message);
|
LOGGER.log(Level.SEVERE, message);
|
||||||
errorMap.put(message, true);
|
errorMap.put(message, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,15 +18,6 @@ import java.util.Vector;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* MultirunRefiner
|
* MultirunRefiner
|
||||||
* Description: This is a small programm .
|
|
||||||
* Copyright: Copyright (c) 2001
|
|
||||||
* Company: University of Tuebingen, Computer Architecture
|
|
||||||
*
|
|
||||||
* @author Felix Streichert
|
|
||||||
* @version: $Revision: 10 $
|
|
||||||
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
|
|
||||||
* $Author: streiche $
|
|
||||||
* @since JDK 1.3.0_02
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MultirunRefiner {
|
public class MultirunRefiner {
|
||||||
|
@ -29,14 +29,8 @@ package eva2.tools;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO description.
|
* TODO description.
|
||||||
*
|
|
||||||
* @.author wegnerj
|
|
||||||
* @.license GPL
|
|
||||||
* @.cvsversion $Revision: 1.8 $, $Date: 2005/02/17 16:48:44 $
|
|
||||||
*/
|
*/
|
||||||
public interface ResourceLoader {
|
public interface ResourceLoader {
|
||||||
//~ Methods ////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the byte data from a file at the given resource location.
|
* Gets the byte data from a file at the given resource location.
|
||||||
*
|
*
|
||||||
@ -44,8 +38,4 @@ public interface ResourceLoader {
|
|||||||
* @return the byte array of file.
|
* @return the byte array of file.
|
||||||
*/
|
*/
|
||||||
byte[] getBytesFromResourceLocation(String rawResrcLoc);
|
byte[] getBytesFromResourceLocation(String rawResrcLoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
|
||||||
//END OF FILE.
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
|
@ -9,8 +9,6 @@ import java.util.regex.Pattern;
|
|||||||
/**
|
/**
|
||||||
* Utility class to provide simplification functions
|
* Utility class to provide simplification functions
|
||||||
* for working with Strings.
|
* for working with Strings.
|
||||||
*
|
|
||||||
* @author Fabian Becker, Marcel Kronfeld
|
|
||||||
*/
|
*/
|
||||||
public final class StringTools {
|
public final class StringTools {
|
||||||
|
|
||||||
@ -103,13 +101,6 @@ public final class StringTools {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static void main(String[] args) {
|
|
||||||
// System.out.println(toHTML("Hallo-asdfsadfsafdsadfo, dies ist ein doller test text!", 15));
|
|
||||||
// System.out.println(toHTML("Set the interval of data output for intermediate verbosity (in generations).", 15));
|
|
||||||
// System.out.println(toHTML("Set the interval of data output for intermediate verbosity (in generations).", 25));
|
|
||||||
// System.out.println(toHTML("Set the interval of data output for intermediate verbosity (in generations).", 30));
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse an array of Strings as an argument list. Take the argument list, a set of keys together
|
* Parse an array of Strings as an argument list. Take the argument list, a set of keys together
|
||||||
* with their arities. Returns for each key a value depending on arity and whether it was found.
|
* with their arities. Returns for each key a value depending on arity and whether it was found.
|
||||||
|
@ -8,17 +8,7 @@ package eva2.tools;
|
|||||||
|
|
||||||
import javax.swing.filechooser.FileFilter;
|
import javax.swing.filechooser.FileFilter;
|
||||||
|
|
||||||
/**
|
/**A simple File Filter for *.txt files.
|
||||||
* TXTFileFilter
|
|
||||||
* Description: A simple File Filter for *.txt files.
|
|
||||||
* Copyright: Copyright (c) 2001
|
|
||||||
* Company: University of Tuebingen, Computer Architecture
|
|
||||||
*
|
|
||||||
* @author Felix Streichert
|
|
||||||
* @version: $Revision: 10 $
|
|
||||||
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
|
|
||||||
* $Author: streiche $
|
|
||||||
* @since JDK 1.3.0_02
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class TXTFileFilter extends FileFilter {
|
public class TXTFileFilter extends FileFilter {
|
||||||
|
@ -5,16 +5,6 @@ import java.io.InputStreamReader;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>Title: EvA2</p>
|
|
||||||
* <p>Description: </p>
|
|
||||||
* <p>Copyright: Copyright (c) 2003</p>
|
|
||||||
* <p>Company: </p>
|
|
||||||
*
|
|
||||||
* @author not attributable
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class URLGetter {
|
public class URLGetter {
|
||||||
public URLGetter() {
|
public URLGetter() {
|
||||||
|
|
||||||
|
@ -12,25 +12,12 @@
|
|||||||
|
|
||||||
package eva2.tools.diagram;
|
package eva2.tools.diagram;
|
||||||
|
|
||||||
/*============================================================================
|
|
||||||
* IMPORTS
|
|
||||||
*============================================================================*/
|
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
|
|
||||||
/*============================================================================
|
|
||||||
* CLASS DECLARATION
|
|
||||||
*============================================================================*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the color values for a legend-style color bar.
|
* Calculates the color values for a legend-style color bar.
|
||||||
*/
|
*/
|
||||||
public class ColorBarCalculator {
|
public class ColorBarCalculator {
|
||||||
/*--------------------------------------------------------------------------
|
|
||||||
* static public final member variables
|
|
||||||
*--------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
static public final int BLUE_TO_RED = 0;
|
static public final int BLUE_TO_RED = 0;
|
||||||
static public final int GREY_SCALE = 1;
|
static public final int GREY_SCALE = 1;
|
||||||
static public final int BLUE_SCALE = 2;
|
static public final int BLUE_SCALE = 2;
|
||||||
@ -38,25 +25,13 @@ public class ColorBarCalculator {
|
|||||||
// GREY_SCALE returns luminance values in [0.1;0.9], GREY_EXTENDED_SCALE in [0.0;1.0]
|
// GREY_SCALE returns luminance values in [0.1;0.9], GREY_EXTENDED_SCALE in [0.0;1.0]
|
||||||
static public final int GREY_EXTENDED_SCALE = 4;
|
static public final int GREY_EXTENDED_SCALE = 4;
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------
|
|
||||||
* private member variables
|
|
||||||
*--------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
private int color_scale = BLUE_TO_RED;
|
private int color_scale = BLUE_TO_RED;
|
||||||
private boolean inverseScale = false;
|
private boolean inverseScale = false;
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------
|
|
||||||
* constructor
|
|
||||||
*--------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
public ColorBarCalculator(int color_scale) {
|
public ColorBarCalculator(int color_scale) {
|
||||||
this.color_scale = color_scale;
|
this.color_scale = color_scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------
|
|
||||||
* public methods
|
|
||||||
*--------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
public void setColorScale(int color_scale) {
|
public void setColorScale(int color_scale) {
|
||||||
this.color_scale = color_scale;
|
this.color_scale = color_scale;
|
||||||
}
|
}
|
||||||
@ -122,10 +97,6 @@ public class ColorBarCalculator {
|
|||||||
return inverseScale;
|
return inverseScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------
|
|
||||||
* static public methods
|
|
||||||
*--------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns color for the given float-value, which must be in the range from 0 to 1.
|
* Returns color for the given float-value, which must be in the range from 0 to 1.
|
||||||
* Warning: Creates new color object, better use the method 'getRGB' if possible.
|
* Warning: Creates new color object, better use the method 'getRGB' if possible.
|
||||||
@ -141,9 +112,4 @@ public class ColorBarCalculator {
|
|||||||
float hue = value * (value + value * 0.8F) / 2.65F - 1F;
|
float hue = value * (value + value * 0.8F) / 2.65F - 1F;
|
||||||
return Color.HSBtoRGB(hue, 0.6F, 1F);
|
return Color.HSBtoRGB(hue, 0.6F, 1F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* END OF FILE
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
@ -22,10 +22,6 @@ import eva2.tools.math.Jama.util.Maths;
|
|||||||
|
|
||||||
public class EigenvalueDecomposition implements java.io.Serializable {
|
public class EigenvalueDecomposition implements java.io.Serializable {
|
||||||
|
|
||||||
/* ------------------------
|
|
||||||
Class variables
|
|
||||||
* ------------------------ */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Row and column dimension (square matrix).
|
* Row and column dimension (square matrix).
|
||||||
*
|
*
|
||||||
|
@ -17,10 +17,6 @@ package eva2.tools.math.Jama;
|
|||||||
|
|
||||||
public class LUDecomposition implements java.io.Serializable {
|
public class LUDecomposition implements java.io.Serializable {
|
||||||
|
|
||||||
/* ------------------------
|
|
||||||
Class variables
|
|
||||||
* ------------------------ */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array for internal storage of decomposition.
|
* Array for internal storage of decomposition.
|
||||||
*
|
*
|
||||||
|
@ -68,10 +68,6 @@ public class Matrix implements Cloneable, Serializable {
|
|||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 3672826349694248499L;
|
private static final long serialVersionUID = 3672826349694248499L;
|
||||||
|
|
||||||
/* ------------------------
|
|
||||||
Class variables
|
|
||||||
* ------------------------ */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array for internal storage of elements.
|
* Array for internal storage of elements.
|
||||||
*
|
*
|
||||||
@ -87,10 +83,6 @@ public class Matrix implements Cloneable, Serializable {
|
|||||||
*/
|
*/
|
||||||
private int m, n;
|
private int m, n;
|
||||||
|
|
||||||
/* ------------------------
|
|
||||||
Constructors
|
|
||||||
* ------------------------ */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct an m-by-n matrix of zeros.
|
* Construct an m-by-n matrix of zeros.
|
||||||
*
|
*
|
||||||
@ -213,11 +205,6 @@ public class Matrix implements Cloneable, Serializable {
|
|||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------
|
|
||||||
Public Methods
|
|
||||||
* ------------------------ */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a matrix from a copy of a 2-D array.
|
* Construct a matrix from a copy of a 2-D array.
|
||||||
*
|
*
|
||||||
@ -309,9 +296,6 @@ public class Matrix implements Cloneable, Serializable {
|
|||||||
double[][] C = new double[m][n];
|
double[][] C = new double[m][n];
|
||||||
for (int i = 0; i < m; i++) {
|
for (int i = 0; i < m; i++) {
|
||||||
System.arraycopy(A[i], 0, C[i], 0, n);
|
System.arraycopy(A[i], 0, C[i], 0, n);
|
||||||
// for (int j = 0; j < n; j++) {
|
|
||||||
// C[i][j] = A[i][j];
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
return C;
|
return C;
|
||||||
}
|
}
|
||||||
@ -1396,11 +1380,6 @@ public class Matrix implements Cloneable, Serializable {
|
|||||||
return new Matrix(A);
|
return new Matrix(A);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------
|
|
||||||
Private Methods
|
|
||||||
* ------------------------ */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if size(A) == size(B) *
|
* Check if size(A) == size(B) *
|
||||||
*/
|
*/
|
||||||
|
@ -12,20 +12,12 @@
|
|||||||
|
|
||||||
package eva2.tools.print;
|
package eva2.tools.print;
|
||||||
|
|
||||||
/*==========================================================================*
|
|
||||||
* IMPORTS
|
|
||||||
*==========================================================================*/
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.awt.print.PageFormat;
|
import java.awt.print.PageFormat;
|
||||||
import java.awt.print.Printable;
|
import java.awt.print.Printable;
|
||||||
|
|
||||||
/*==========================================================================*
|
|
||||||
* CLASS DECLARATION
|
|
||||||
*==========================================================================*/
|
|
||||||
|
|
||||||
public class PagePrinter {
|
public class PagePrinter {
|
||||||
Component c;
|
Component c;
|
||||||
Graphics g;
|
Graphics g;
|
||||||
@ -150,8 +142,4 @@ public class PagePrinter {
|
|||||||
}
|
}
|
||||||
return Printable.PAGE_EXISTS;
|
return Printable.PAGE_EXISTS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* END OF FILE
|
|
||||||
****************************************************************************/
|
|
Loading…
x
Reference in New Issue
Block a user