net.sourceforge.cilib.problem
Class MOOptimisationProblem

java.lang.Object
  extended by net.sourceforge.cilib.problem.MOOptimisationProblem
All Implemented Interfaces:
Serializable, Iterable<OptimisationProblem>, Collection<OptimisationProblem>, List<OptimisationProblem>, OptimisationProblem, Problem, Cloneable

public class MOOptimisationProblem
extends Object
implements OptimisationProblem, List<OptimisationProblem>

Author:
Edwin Peer
See Also:
Serialized Form

Field Summary
protected  List<OptimisationProblem> problems
           
 
Constructor Summary
MOOptimisationProblem()
           
MOOptimisationProblem(MOOptimisationProblem copy)
           
 
Method Summary
 void accept(ProblemVisitor visitor)
          Accept the provided Visitor and perform the Visitor.visit(Object) method.
 void add(int index, OptimisationProblem problem)
           
 boolean add(OptimisationProblem problem)
           
 boolean addAll(Collection<? extends OptimisationProblem> problems)
           
 boolean addAll(int index, Collection<? extends OptimisationProblem> problems)
           
 void changeEnvironment()
          Change the environment.
 void clear()
           
 boolean contains(Object object)
           
 boolean containsAll(Collection<?> objects)
           
 OptimisationProblem get(int index)
           
 DomainRegistry getBehaviouralDomain()
          Returns the domain component that describes the search space of the needed behavioral characteristics of the problem.
 MOOptimisationProblem getClone()
          Create a cloned copy of the current object and return it.
 DataSetBuilder getDataSetBuilder()
          Get the associated DataSetBuilder.
 DomainRegistry getDomain()
          Returns the domain component that describes the search space for this problem.
 Fitness getFitness(int index, Type solution, boolean count)
           
 MOFitness getFitness(Type[] solutions, boolean count)
           
 MOFitness getFitness(Type solution, boolean count)
          Returns the fitness of a potential solution to this problem.
 int getFitnessEvaluations()
          Returns the number of times the underlying fitness function has been evaluated.
 int indexOf(Object object)
           
 boolean isEmpty()
           
 Iterator<OptimisationProblem> iterator()
           
 int lastIndexOf(Object object)
           
 ListIterator<OptimisationProblem> listIterator()
           
 ListIterator<OptimisationProblem> listIterator(int index)
           
 OptimisationProblem remove(int index)
           
 boolean remove(Object object)
           
 boolean removeAll(Collection<?> objects)
           
 boolean retainAll(Collection<?> objects)
           
 OptimisationProblem set(int index, OptimisationProblem problem)
           
 void setDataSetBuilder(DataSetBuilder dataSetBuilder)
          Set the DataSetBuilder for this optimistion problem.
 int size()
           
 List<OptimisationProblem> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Field Detail

problems

protected List<OptimisationProblem> problems
Constructor Detail

MOOptimisationProblem

public MOOptimisationProblem()

MOOptimisationProblem

public MOOptimisationProblem(MOOptimisationProblem copy)
Method Detail

getClone

public MOOptimisationProblem getClone()
Description copied from interface: OptimisationProblem
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface OptimisationProblem
Specified by:
getClone in interface Problem
Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

getFitness

public MOFitness getFitness(Type[] solutions,
                            boolean count)

getFitness

public MOFitness getFitness(Type solution,
                            boolean count)
Description copied from interface: OptimisationProblem
Returns the fitness of a potential solution to this problem. The solution object is described by the domain of this problem, see OptimisationProblem.getDomain(). An instance of InferiorFitness should be returned if the solution falls outside the search space of this problem.

Specified by:
getFitness in interface OptimisationProblem
Parameters:
solution - The potential solution found by the optimisation algorithm.
count - True if this call should contribute to the fitness evaluation count, see OptimisationProblem.getFitnessEvaluations().
Returns:
The fitness of the solution.

getFitness

public Fitness getFitness(int index,
                          Type solution,
                          boolean count)

getFitnessEvaluations

public int getFitnessEvaluations()
Description copied from interface: OptimisationProblem
Returns the number of times the underlying fitness function has been evaluated.

Specified by:
getFitnessEvaluations in interface OptimisationProblem
Returns:
The number fitness evaluations.

getDomain

public DomainRegistry getDomain()
Description copied from interface: OptimisationProblem
Returns the domain component that describes the search space for this problem.

Specified by:
getDomain in interface OptimisationProblem
Returns:
A DomainRegistry object representing the search space.

getBehaviouralDomain

public DomainRegistry getBehaviouralDomain()
Description copied from interface: OptimisationProblem
Returns the domain component that describes the search space of the needed behavioral characteristics of the problem. This is mainly used for ECs, however, the use of behavioral parameters with PSO will be investigated.

Specified by:
getBehaviouralDomain in interface OptimisationProblem
Returns:
The domain of the behavioral component

getDataSetBuilder

public DataSetBuilder getDataSetBuilder()
Description copied from interface: OptimisationProblem
Get the associated DataSetBuilder.

Specified by:
getDataSetBuilder in interface OptimisationProblem
Returns:
The currently associated DataSetBuilder.

setDataSetBuilder

public void setDataSetBuilder(DataSetBuilder dataSetBuilder)
Description copied from interface: OptimisationProblem
Set the DataSetBuilder for this optimistion problem.

Specified by:
setDataSetBuilder in interface OptimisationProblem
Parameters:
dataSetBuilder - The DataSetBuilder to be set on the current OptimisationProblem.

accept

public void accept(ProblemVisitor visitor)
Description copied from interface: OptimisationProblem
Accept the provided Visitor and perform the Visitor.visit(Object) method.

Specified by:
accept in interface OptimisationProblem
Parameters:
visitor - The visitor which has operations to perform.

changeEnvironment

public void changeEnvironment()
Description copied from interface: Problem
Change the environment. TODO: this might need to be refactored.

Specified by:
changeEnvironment in interface Problem

add

public boolean add(OptimisationProblem problem)
Specified by:
add in interface Collection<OptimisationProblem>
Specified by:
add in interface List<OptimisationProblem>

addAll

public boolean addAll(Collection<? extends OptimisationProblem> problems)
Specified by:
addAll in interface Collection<OptimisationProblem>
Specified by:
addAll in interface List<OptimisationProblem>

clear

public void clear()
Specified by:
clear in interface Collection<OptimisationProblem>
Specified by:
clear in interface List<OptimisationProblem>

contains

public boolean contains(Object object)
Specified by:
contains in interface Collection<OptimisationProblem>
Specified by:
contains in interface List<OptimisationProblem>

containsAll

public boolean containsAll(Collection<?> objects)
Specified by:
containsAll in interface Collection<OptimisationProblem>
Specified by:
containsAll in interface List<OptimisationProblem>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<OptimisationProblem>
Specified by:
isEmpty in interface List<OptimisationProblem>

iterator

public Iterator<OptimisationProblem> iterator()
Specified by:
iterator in interface Iterable<OptimisationProblem>
Specified by:
iterator in interface Collection<OptimisationProblem>
Specified by:
iterator in interface List<OptimisationProblem>

remove

public boolean remove(Object object)
Specified by:
remove in interface Collection<OptimisationProblem>
Specified by:
remove in interface List<OptimisationProblem>

removeAll

public boolean removeAll(Collection<?> objects)
Specified by:
removeAll in interface Collection<OptimisationProblem>
Specified by:
removeAll in interface List<OptimisationProblem>

retainAll

public boolean retainAll(Collection<?> objects)
Specified by:
retainAll in interface Collection<OptimisationProblem>
Specified by:
retainAll in interface List<OptimisationProblem>

size

public int size()
Specified by:
size in interface Collection<OptimisationProblem>
Specified by:
size in interface List<OptimisationProblem>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<OptimisationProblem>
Specified by:
toArray in interface List<OptimisationProblem>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<OptimisationProblem>
Specified by:
toArray in interface List<OptimisationProblem>

add

public void add(int index,
                OptimisationProblem problem)
Specified by:
add in interface List<OptimisationProblem>

addAll

public boolean addAll(int index,
                      Collection<? extends OptimisationProblem> problems)
Specified by:
addAll in interface List<OptimisationProblem>

get

public OptimisationProblem get(int index)
Specified by:
get in interface List<OptimisationProblem>

indexOf

public int indexOf(Object object)
Specified by:
indexOf in interface List<OptimisationProblem>

lastIndexOf

public int lastIndexOf(Object object)
Specified by:
lastIndexOf in interface List<OptimisationProblem>

listIterator

public ListIterator<OptimisationProblem> listIterator()
Specified by:
listIterator in interface List<OptimisationProblem>

listIterator

public ListIterator<OptimisationProblem> listIterator(int index)
Specified by:
listIterator in interface List<OptimisationProblem>

remove

public OptimisationProblem remove(int index)
Specified by:
remove in interface List<OptimisationProblem>

set

public OptimisationProblem set(int index,
                               OptimisationProblem problem)
Specified by:
set in interface List<OptimisationProblem>

subList

public List<OptimisationProblem> subList(int fromIndex,
                                         int toIndex)
Specified by:
subList in interface List<OptimisationProblem>


Copyright © 2009 CIRG. All Rights Reserved.