edu.ucsb.cs.jicos.applications.branchandbound
Interface Solution

All Superinterfaces:
java.io.Serializable

public interface Solution
extends java.io.Serializable


Method Summary
 Q getChildren(Environment environment)
          returns an LinkedList of the Solution objects that are the children of this Solution.
 int getLowerBound(java.lang.Object input)
          returns the lower bound on the cost of any complete Solution that is an extension of this partial Solution.
 boolean isAtomic(Task myTask)
          returns true if and only if this solution should be explored directly by a Host (as opposed to being further decomposed).
 boolean isComplete()
          returns true if and only if the partial Solution is, in fact, complete.
 java.lang.String toString()
          returns a String representation of this partial solution.
 

Method Detail

getChildren

Q getChildren(Environment environment)
returns an LinkedList of the Solution objects that are the children of this Solution.

Parameters:
environment - The environment of the current Task, which contains the computation input and shared object. For example, in a traveling salesman problem, the input could be a distance matrix and the shared is or has the current upperBound for this problem.
Returns:
an Q of [partial] Solution objects that represent the children of the node in the search tree represented by this [partial] Solution.

getLowerBound

int getLowerBound(java.lang.Object input)
returns the lower bound on the cost of any complete Solution that is an extension of this partial Solution.

Parameters:
input - An Object, typically environment.getInput(), which may be used in the computation of the lower bound.
Returns:
the lower bound on the cost of any complete Solution that is an extension of this partial Solution.

isAtomic

boolean isAtomic(Task myTask)
returns true if and only if this solution should be explored directly by a Host (as opposed to being further decomposed).

Parameters:
myTask - a reference to the task encapsulating this partial solution. This may be used when the question of whether or not the solution is atomic depends on task properties, such as whether this task has been assigned more than once (suggesting that it may be big).
Returns:
true if and only if this solution should be explored directly by a Host (as opposed to being further decomposed).

isComplete

boolean isComplete()
returns true if and only if the partial Solution is, in fact, complete.

Returns:
true if and only if the partial Solution is, in fact, complete.

toString

java.lang.String toString()
returns a String representation of this partial solution.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this partial solution.


Jicos: http://cs.ucsb.edu/projects/jicos