optimization bug fixes
authorplaa <plaa@180e2498-e6e9-4542-8430-84ac67f01cd8>
Fri, 12 Aug 2011 19:53:00 +0000 (19:53 +0000)
committerplaa <plaa@180e2498-e6e9-4542-8430-84ac67f01cd8>
Fri, 12 Aug 2011 19:53:00 +0000 (19:53 +0000)
git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@151 180e2498-e6e9-4542-8430-84ac67f01cd8

ChangeLog
ReleaseNotes
build.properties
build.xml
src/net/sf/openrocket/gui/dialogs/optimization/GeneralOptimizationDialog.java
src/net/sf/openrocket/optimization/general/multidim/MultidirectionalSearchOptimizer.java
src/net/sf/openrocket/optimization/general/onedim/GoldenSectionSearchOptimizer.java
src/net/sf/openrocket/optimization/rocketoptimization/modifiers/AbstractSimulationModifier.java
src/net/sf/openrocket/optimization/rocketoptimization/modifiers/GenericModifier.java

index 71e4ddcfc7dbe8352ac19c496f1f5da25b5c2680..b1435b8bbbf2233a2e5c77a08089b1263a5e3637 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-08-12  Sampo Niskanen
+
+       * Released version 1.1.7
+
 2011-08-08  Sampo Niskanen
 
        * Enhanced one-dimensional optimization algorithm
index b0c4eeec9c908090f7a7a1d5a8cd157f919de531..9eb4dfdb89b2e0f63eaa72d857dc865fce963859 100644 (file)
@@ -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):
 -------------------------------
 
index c99946b5a029b3f70e2ad4d1603a7f71d5c31f79..b321d08ec284c66d43721b909280f10bc5679c16 100644 (file)
@@ -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
index c716a528daccb06f073d3aa57c7853700e9b6590..0ebe47092b7dc3a9b1d2c9d4aea9d590726f3b4f 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -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/"/>
index de5ad2cacdc893cc04fce4c1c914177fc20ea5e7..0ef35e2e7f242eac632fc9079dee62729805806b 100644 (file)
@@ -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;
                                }
                                
index d50618a32e2779c226323e4f465aaa81c422e012..d4d04fc9d5ca96d5a8bcdde76516f6a1e0d61cbf 100644 (file)
@@ -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);
                                
index 853ffbf5d631500f79396e14e74b6af3cfff8c23..906eea572d12ef24cff155a756e34730c72d5a91 100644 (file)
@@ -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);
                }
                
index f680dda70d720c6ed587d168dee3c3c4e7a1bcb5..46c167d480978f90630d172c26588ab2d97e9686 100644 (file)
@@ -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);
        }
        
index ec931108d5297ee44f5b2891f7b5208db54f28a0..07724c8fd4c6b3586a3c408051ba8d573fefd53b 100644 (file)
@@ -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);
        }