Hide Comments
Hide Comments

Comments (0)

Constrain the floating point, integer, and enumerations gene types (see GeneType ) to a valid range. The TRSGAGene class uses these properties to ensure that when you are writing a numeric value to a RSGeneticAlgorithm.TRSGAIndividual 's chromosome, the value is in a valid range. Note that this won't stop mutations or anything else that operates on the bits directly from giving invalid values.

Namespace: RSGeneticAlgorithm

expandingSyntax

Delphi

published
  property MinValue: Double read FMinValue write SetMinValue nodefault;
 

Property Value

Type: Double

expandingExamples

Here is example code for creating an integer gene:

Delphi

begin
      with RSGeneticAlgorithm1.Genes.Add do
      begin
           GeneType := gtInteger;
           Size := BitsRequired( NUM_QUEENS-1 );
           MaxValue := NUM_QUEENS - 1; // MinValue is 0
      end;
 end;

expandingSee Also

Comments (0)