1 package net.sf.openrocket.optimization.rocketoptimization;
3 import net.sf.openrocket.document.Simulation;
4 import net.sf.openrocket.optimization.general.OptimizationException;
7 * A parameter of a rocket or simulation that can be optimized
8 * (for example max. altitude or velocity).
10 * @author Sampo Niskanen <sampo.niskanen@iki.fi>
12 public interface OptimizableParameter {
15 * Return the label name for this optimization parameter.
17 * @return the name for the optimization parameter (e.g. "Flight altitude")
19 public String getName();
22 * Compute the value for this optimization parameter for the simulation.
23 * The return value can be any double value.
25 * This method can return NaN in case of a problem computing
27 * @param simulation the simulation
28 * @return the parameter value (any double value)
29 * @throws OptimizationException if an error occurs preventing the optimization from continuing
31 public double computeValue(Simulation simulation) throws OptimizationException;