scalation.minima

GeneticAlgorithm

class GeneticAlgorithm extends AnyRef

This class performs local search to find minima of functions defined on integer vector domains (z^n).

minimize f(x) subject to g(x) <= 0, x in Z^n

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. GeneticAlgorithm
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GeneticAlgorithm(f: (VectorI) ⇒ Double, x0: VectorI, vMax: Int = 100, g: (VectorI) ⇒ Double = null, maxStep: Int = 5)

    f

    the objective function to be minimize (f maps an integer vector to a double)

    x0

    the starting point for the search (seed for GA)

    g

    the constraint function to be satisfied, if any

    maxStep

    the maximum/starting step size (make larger for larger domains)

Type Members

  1. type Vec_Func = (VectorI, Double)

    Pair consisting of an integer vector and its functional value (a double)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def crossOver: Unit

    For each individual in the population, cross it with some other individual.

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def fg(x: VectorI): Double

    The objective function f re-scaled by a weighted penalty, if constrained.

    The objective function f re-scaled by a weighted penalty, if constrained.

    x

    the coordinate values of the currrent point

  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def fitnessCrossOver: Unit

    For each individual in the population, cross it with some other individual.

    For each individual in the population, cross it with some other individual. Let the crossover be dependent of the fitness of the individual.

  14. def fittest: (VectorI, Double)

    Find the fittest individual (smallest value of objective function).

  15. def genPopulation: Unit

    Generate an initial population of individuals.

  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. def mutate: Unit

    Randomly select individuals for mutation (change a value at one position).

  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def printPopulation: Unit

    Print the current population

  24. def solve: (VectorI, Double)

    Solve the minimization problem using a genetic algorithm.

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped