1 package net.sf.openrocket.optimization.rocketoptimization;
3 import net.sf.openrocket.document.Simulation;
4 import net.sf.openrocket.util.Pair;
7 * An interface defining a function domain which limits allowed function values.
9 * @author Sampo Niskanen <sampo.niskanen@iki.fi>
11 public interface SimulationDomain {
14 * Return a value determining whether the simulation is within the domain limits
15 * of an optimization process. If the returned value is negative or zero, the
16 * simulation is within the domain; if the value is positive, the returned value
17 * is an indication of how far from the domain the value is; if the returned value
18 * is NaN, the simulation is outside of the domain.
20 * @param simulation the simulation to check.
21 * @return the double parameter is the domain indication;
22 * a negative value or zero if the simulation is in the domain,
23 * a positive value or NaN if not. The second is a human-readable
24 * indication of the domain (may be null).
26 public Pair<Double, Double> getDistanceToDomain(Simulation simulation);