61b1a801c1bdea453dc3140c57f36f8e9ceded9f
[debian/openrocket] / src / net / sf / openrocket / optimization / rocketoptimization / RocketOptimizationParameter.java
1 package net.sf.openrocket.optimization.rocketoptimization;
2
3 import net.sf.openrocket.document.Simulation;
4
5 /**
6  * A parameter of a rocket or simulation that can be optimized
7  * (for example max. altitude or velocity).
8  * 
9  * @author Sampo Niskanen <sampo.niskanen@iki.fi>
10  */
11 public interface RocketOptimizationParameter {
12         
13         /**
14          * Return the label name for this optimization parameter.
15          * 
16          * @return      the name for the optimization parameter (e.g. "Flight altitude")
17          */
18         public String getName();
19         
20         /**
21          * Compute the value for this optimization parameter for the simulation.
22          * The return value can be any double value.
23          * 
24          * @param simulation    the simulation
25          * @return                              the parameter value (any double value)
26          */
27         public double computeValue(Simulation simulation);
28         
29 }