MOEA Framework 2.12
API Specification

org.moeaframework.util.distributed
Class FutureSolution

java.lang.Object
  extended by org.moeaframework.core.Solution
      extended by org.moeaframework.util.distributed.FutureSolution
All Implemented Interfaces:
Serializable

public class FutureSolution
extends Solution

Represents a Solution evaluated asynchronously. Calls to

will block until the asynchronous evaluation completes. This behavior is achieved by assigning a Future through the setFuture(Future) method prior to submitting this solution for evaluation.

See Also:
Serialized Form

Method Summary
 FutureSolution copy()
          Returns an independent copy of this solution.
 double getConstraint(int index)
          Returns the constraint at the specified index.
 double[] getConstraints()
          Returns an array containing the constraints of this solution.
 double getObjective(int index)
          Returns the objective at the specified index.
 double[] getObjectives()
          Returns an array containing the objectives of this solution.
 
Methods inherited from class org.moeaframework.core.Solution
addAttributes, clearAttributes, deepCopy, getAttribute, getAttributes, getNumberOfConstraints, getNumberOfObjectives, getNumberOfVariables, getVariable, hasAttribute, removeAttribute, setAttribute, setConstraint, setConstraints, setObjective, setObjectives, setVariable, violatesConstraints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

copy

public FutureSolution copy()
Description copied from class: Solution
Returns an independent copy of this solution. It is required that x.copy() is completely independent from x . This means any method invoked on x.copy() in no way alters the state of x and vice versa. It is typically the case that x.copy().getClass() == x.getClass() and x.copy().equals(x)

Note that a solution's attributes are not copied, as the attributes are generally specific to each instance.

Overrides:
copy in class Solution
Returns:
an independent copy of this solution

getObjectives

public double[] getObjectives()
Description copied from class: Solution
Returns an array containing the objectives of this solution. Modifying the returned array will not modify the internal state of this solution.

Overrides:
getObjectives in class Solution
Returns:
an array containing the objectives of this solution

getConstraint

public double getConstraint(int index)
Description copied from class: Solution
Returns the constraint at the specified index.

Overrides:
getConstraint in class Solution
Parameters:
index - index of the variable to be returned
Returns:
the constraint at the specified index

getConstraints

public double[] getConstraints()
Description copied from class: Solution
Returns an array containing the constraints of this solution. Modifying the returned array will not modify the internal state of this solution.

Overrides:
getConstraints in class Solution
Returns:
an array containing the constraints of this solution

getObjective

public double getObjective(int index)
Description copied from class: Solution
Returns the objective at the specified index.

Overrides:
getObjective in class Solution
Parameters:
index - index of the objective to return
Returns:
the objective at the specified index

MOEA Framework 2.12
API Specification

Copyright 2009-2016 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Visit us on Github!