1 package net.sf.openrocket.optimization.rocketoptimization;
3 import net.sf.openrocket.document.Simulation;
4 import net.sf.openrocket.optimization.general.OptimizationException;
5 import net.sf.openrocket.unit.UnitGroup;
8 * A parameter of a rocket or simulation that can be optimized
9 * (for example max. altitude or velocity).
11 * @author Sampo Niskanen <sampo.niskanen@iki.fi>
13 public interface OptimizableParameter {
16 * Return the label name for this optimization parameter.
18 * @return the name for the optimization parameter (e.g. "Flight altitude")
20 public String getName();
23 * Compute the value for this optimization parameter for the simulation.
24 * The return value can be any double value.
26 * This method can return NaN in case of a problem computing
28 * @param simulation the simulation
29 * @return the parameter value (any double value)
30 * @throws OptimizationException if an error occurs preventing the optimization from continuing
32 public double computeValue(Simulation simulation) throws OptimizationException, InterruptedException;
36 * Return the unit group associated with the computed value.
37 * @return the unit group of the computed value.
39 public UnitGroup getUnitGroup();