jmetal.problems
Class OneZeroMax

java.lang.Object
  extended by jmetal.core.Problem
      extended by jmetal.problems.OneZeroMax
All Implemented Interfaces:
java.io.Serializable

public class OneZeroMax
extends Problem

Class representing problem OneZeroMax. The problem consist of maximizing the number of '1's and '0's in a binary string.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jmetal.core.Problem
length_, lowerLimit_, numberOfConstraints_, numberOfObjectives_, numberOfVariables_, problemName_, solutionType_, upperLimit_
 
Constructor Summary
OneZeroMax(java.lang.String solutionType)
          Creates a new OneZeroMax problem instance
OneZeroMax(java.lang.String solutionType, java.lang.Integer numberOfBits)
          Creates a new OneZeroMax problem instance
 
Method Summary
 void evaluate(Solution solution)
          Evaluates a solution
 
Methods inherited from class jmetal.core.Problem
evaluateConstraints, getLength, getLowerLimit, getName, getNumberOfBits, getNumberOfConstraints, getNumberOfObjectives, getNumberOfVariables, getPrecision, getPrecision, getSolutionType, getUpperLimit, setNumberOfVariables, setPrecision, setSolutionType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneZeroMax

public OneZeroMax(java.lang.String solutionType)
           throws java.lang.ClassNotFoundException
Creates a new OneZeroMax problem instance

Parameters:
solutionType - Solution type
Throws:
java.lang.ClassNotFoundException

OneZeroMax

public OneZeroMax(java.lang.String solutionType,
                  java.lang.Integer numberOfBits)
Creates a new OneZeroMax problem instance

Parameters:
solutionType - Solution type
numberOfBits - Length of the problem
Method Detail

evaluate

public void evaluate(Solution solution)
Evaluates a solution

Specified by:
evaluate in class Problem
Parameters:
solution - The solution to evaluate