java.lang.Object
com.adriangarcia.metaheuristics.tsmbfoa.Tsmbfoa
All Implemented Interfaces:
Foraging

public class Tsmbfoa extends Object implements Foraging
Tsmbfoa class allows the creation of an object to initiate the bacteria foraging process for CNOP optimization. This class is implemented by Foraging.
Version:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty constructor method that initializes the instances of the objects used inside the class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    chemotaxis(Configurator bacterium, Problem problem, Function function)
    In the chemotaxis method the chemotaxis process of TS-MBFOA is performed, where two swims are interleaved, in each cycle one exploitation or exploration swim is performed.
    void
    eliminationDispersal(Configurator bacterium, Problem problem, Function function)
    In the eliminationDispersal method, the worst bacterium is eliminated from the population based on feasibility rules and a new one is randomly generated.
    protected int
    Method that returns the value count.
    int
    This method returns the generational number.
    protected boolean
    Return to TS-MBFOA stop condition.
    void
    The grouping method is a TS-MBFOA process, which is applied in the middle cycle of the chemotaxic process.
    protected void
    increaseCount(int value)
    This method increments an auxiliary counter for the generations.
    protected void
    increaseGeneration(int value)
    This method increases the number of TS-MBFOA generations.
    void
    In the reproduction method, the bacteria are ordered based on the constraint management technique, eliminating the worst Sb - Sr bacteria and duplicating the best ones.
    protected void
    setCount(int count)
    Method that assigns value to the count.
    protected void
    setGeneration(int generation)
    Method that assigns value to the generation.
    void
    updateStepSize(Configurator bacterium, Problem problem)
    The updateStepSize method updates the TS-MBFOA step size.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Tsmbfoa

      public Tsmbfoa()
      Empty constructor method that initializes the instances of the objects used inside the class.
  • Method Details

    • chemotaxis

      public void chemotaxis(Configurator bacterium, Problem problem, Function function)
      Description copied from interface: Foraging
      In the chemotaxis method the chemotaxis process of TS-MBFOA is performed, where two swims are interleaved, in each cycle one exploitation or exploration swim is performed.
      Specified by:
      chemotaxis in interface Foraging
      Parameters:
      bacterium - object of the class Configurator
      problem - object of the class Problem
      function - object of the class Function
    • grouping

      public void grouping()
      Description copied from interface: Foraging
      The grouping method is a TS-MBFOA process, which is applied in the middle cycle of the chemotaxic process.
      Specified by:
      grouping in interface Foraging
    • reproduction

      public void reproduction(Configurator bacterium)
      Description copied from interface: Foraging
      In the reproduction method, the bacteria are ordered based on the constraint management technique, eliminating the worst Sb - Sr bacteria and duplicating the best ones.
      Specified by:
      reproduction in interface Foraging
      Parameters:
      bacterium - object of the class Configurator
    • eliminationDispersal

      public void eliminationDispersal(Configurator bacterium, Problem problem, Function function)
      Description copied from interface: Foraging
      In the eliminationDispersal method, the worst bacterium is eliminated from the population based on feasibility rules and a new one is randomly generated.
      Specified by:
      eliminationDispersal in interface Foraging
      Parameters:
      bacterium - object of the class Configurator
      problem - object of the class Problem
      function - object of the class Function
    • updateStepSize

      public void updateStepSize(Configurator bacterium, Problem problem)
      Description copied from interface: Foraging
      The updateStepSize method updates the TS-MBFOA step size.
      Specified by:
      updateStepSize in interface Foraging
      Parameters:
      bacterium - object of the class Configurator
      problem - object of the class Problem
    • getGeneration

      public int getGeneration()
      This method returns the generational number. A generation consists of a a generation consists of a chemotaxis process, grouping, reproduction and elimination-dispersal.
      Returns:
      the generation
    • increaseGeneration

      protected void increaseGeneration(int value)
      This method increases the number of TS-MBFOA generations.
      Parameters:
      value - generational number
    • getInstruction

      protected boolean getInstruction(Configurator configurator)
      Return to TS-MBFOA stop condition.
      Parameters:
      configurator - object of the class Configurator
      Returns:
      true or false if (counter + (sb * nc)) <= evaluations
    • increaseCount

      protected void increaseCount(int value)
      This method increments an auxiliary counter for the generations.
      Parameters:
      value - the count to set
    • setGeneration

      protected void setGeneration(int generation)
      Method that assigns value to the generation.
      Parameters:
      generation - the generation to set
    • setCount

      protected void setCount(int count)
      Method that assigns value to the count.
      Parameters:
      count - the count to set
    • getCount

      protected int getCount()
      Method that returns the value count.
      Returns:
      the count