optimization bug fixes
This commit is contained in:
parent
784c76091b
commit
20603d8be6
@ -1,3 +1,7 @@
|
||||
2011-08-12 Sampo Niskanen
|
||||
|
||||
* Released version 1.1.7
|
||||
|
||||
2011-08-08 Sampo Niskanen
|
||||
|
||||
* Enhanced one-dimensional optimization algorithm
|
||||
|
@ -1,3 +1,11 @@
|
||||
OpenRocket 1.1.7 (2011-08-12):
|
||||
-------------------------------
|
||||
|
||||
This release contains automatic rocket design optimization
|
||||
functionality. However, be cautious when using it and take the
|
||||
results with a grain of salt.
|
||||
|
||||
|
||||
OpenRocket 1.1.6 (2011-07-22):
|
||||
-------------------------------
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
# The OpenRocket build version
|
||||
|
||||
build.version=1.1.7pre
|
||||
build.version=1.1.7
|
||||
|
||||
|
||||
# The source of the package. When building a package for a specific
|
||||
|
@ -63,6 +63,7 @@
|
||||
<copy todir="${dist.dir}/">
|
||||
<fileset dir="." includes="LICENSE.TXT README.TXT ChangeLog ReleaseNotes build.properties fileformat.txt" />
|
||||
<fileset dir="." includes="datafiles/ pix/ l10n/" />
|
||||
<fileset dir="src/" includes="META-INF/" />
|
||||
</copy>
|
||||
<mkdir dir="${jar.dir}"/>
|
||||
<jar destfile="${jar.file}" basedir="${dist.dir}">
|
||||
@ -86,7 +87,7 @@
|
||||
<mkdir dir="${build.dir}/${pkgname}"/>
|
||||
<mkdir dir="${jar.dir}"/>
|
||||
<copy todir="${build.dir}/${pkgname}">
|
||||
<fileset dir="." includes="*">
|
||||
<fileset dir="." includes="*" excludes="*.log">
|
||||
<type type="file"/>
|
||||
</fileset>
|
||||
<fileset dir="." includes="datafiles/ lib/ lib-test/ pix/ src/ test/ l10n/"/>
|
||||
|
@ -559,7 +559,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
||||
|
||||
|
||||
label = new JLabel(trans.get("status.evalCount"));
|
||||
tip = trans.get("status.evalCount");
|
||||
tip = trans.get("status.evalCount.ttip");
|
||||
label.setToolTipText(tip);
|
||||
sub.add(label, "gapright unrel");
|
||||
|
||||
@ -832,10 +832,9 @@ public class GeneralOptimizationDialog extends JDialog {
|
||||
Point newPoint = latest.getNewPoint();
|
||||
|
||||
FunctionEvaluationData pointValue = evaluationHistory.get(newPoint);
|
||||
if (pointValue != null) {
|
||||
if (pointValue != null && pointValue.getParameterValue() != null) {
|
||||
bestValue = pointValue.getParameterValue().getValue();
|
||||
} else {
|
||||
log.error("History does not contain point " + newPoint);
|
||||
bestValue = Double.NaN;
|
||||
}
|
||||
|
||||
|
@ -111,9 +111,6 @@ public class MultidirectionalSearchOptimizer implements FunctionOptimizer, Stati
|
||||
functionExecutor.compute(expansion);
|
||||
|
||||
// Check reflection acceptance
|
||||
System.err.println("stepsize = " + step);
|
||||
System.err.println("Simplex = " + simplex);
|
||||
System.err.println("Reflection = " + reflection);
|
||||
log.debug("Computing reflection");
|
||||
functionExecutor.waitFor(reflection);
|
||||
|
||||
|
@ -107,7 +107,6 @@ public class GoldenSectionSearchOptimizer implements FunctionOptimizer, Statisti
|
||||
*/
|
||||
guessAC = section1(a, c);
|
||||
guessBD = section2(b, d);
|
||||
System.err.println("Queueing " + guessAC + " and " + guessBD);
|
||||
if (Double.isNaN(fd) || fa < fd) {
|
||||
guessedAC = true;
|
||||
functionExecutor.compute(guessAC);
|
||||
@ -200,11 +199,9 @@ public class GoldenSectionSearchOptimizer implements FunctionOptimizer, Statisti
|
||||
}
|
||||
|
||||
if (guessAC != null) {
|
||||
System.err.println("Aborting " + guessAC);
|
||||
functionExecutor.abort(guessAC);
|
||||
}
|
||||
if (guessBD != null) {
|
||||
System.err.println("Aborting " + guessBD);
|
||||
functionExecutor.abort(guessBD);
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,6 @@ public abstract class AbstractSimulationModifier implements SimulationModifier {
|
||||
* @return the value in SI units
|
||||
*/
|
||||
protected double toBaseValue(double value) {
|
||||
System.out.println("value=" + value + " minValue=" + minValue + " maxValue=" + maxValue);
|
||||
return MathUtil.map(value, 0.0, 1.0, minValue, maxValue);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
package net.sf.openrocket.optimization.rocketoptimization.modifiers;
|
||||
|
||||
import net.sf.openrocket.document.Simulation;
|
||||
import net.sf.openrocket.logging.LogHelper;
|
||||
import net.sf.openrocket.optimization.general.OptimizationException;
|
||||
import net.sf.openrocket.startup.Application;
|
||||
import net.sf.openrocket.unit.UnitGroup;
|
||||
import net.sf.openrocket.util.BugException;
|
||||
import net.sf.openrocket.util.MathUtil;
|
||||
@ -15,6 +17,7 @@ import net.sf.openrocket.util.Reflection.Method;
|
||||
* @author Sampo Niskanen <sampo.niskanen@iki.fi>
|
||||
*/
|
||||
public abstract class GenericModifier<T> extends AbstractSimulationModifier {
|
||||
private static final LogHelper log = Application.getLogger();
|
||||
|
||||
private final double multiplier;
|
||||
|
||||
@ -79,7 +82,7 @@ public abstract class GenericModifier<T> extends AbstractSimulationModifier {
|
||||
throw new OptimizationException("BUG: getModifiedObject() returned null");
|
||||
}
|
||||
double siValue = toBaseValue(scaledValue) / multiplier;
|
||||
System.out.println("Setting setter=" + setter + " modifiable=" + modifiable + " siValue=" + siValue + "scaledValue=" + scaledValue);
|
||||
log.verbose("Setting setter=" + setter + " modifiable=" + modifiable + " siValue=" + siValue + "scaledValue=" + scaledValue);
|
||||
setter.invoke(modifiable, siValue);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user