GAClass Module



Derived Types

type, public ::  GA_annotaton

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: annotation

type, public ::  GA_Individual_

Components

Type Visibility Attributes Name Initial
real(kind=real64), public, allocatable :: realParameter(:)
integer(kind=int32), public, allocatable :: intParameter(:)
type(GA_annotaton), public, allocatable :: realAnnotaton(:)
type(GA_annotaton), public, allocatable :: intAnnotaton(:)
logical, public, allocatable :: realRegistered(:)
logical, public, allocatable :: intRegistered(:)

Type-Bound Procedures

procedure, public :: init => initGA_Individual

type, public ::  GA_

Components

Type Visibility Attributes Name Initial
type(GA_Individual_), public, allocatable :: plants(:)
real(kind=real64), public, allocatable :: score(:)
integer(kind=int32), public, allocatable :: selected(:)
real(kind=real64), public, allocatable :: selectedScore(:)
integer(kind=int32), public :: num_individual
logical, public :: initialized = .false.
logical, public :: registered = .false.
logical, public :: realRegistered = .false.
logical, public :: intRegistered = .false.

Type-Bound Procedures

procedure, public :: init => initGA
procedure, public :: setup => setupGA
procedure, public :: show => showGA
procedure, public :: parse => parseGA
procedure, public :: select => selectGA
procedure, public :: cross => crossGA
procedure, public :: mutate => mutateGA

Functions

public function parseGA(obj, KeyWord) result(ret)

Arguments

Type IntentOptional Attributes Name
class(GA_), intent(in) :: obj
character(len=*), intent(in) :: KeyWord

Return Value real(kind=real64), allocatable, (:)


Subroutines

public subroutine initGA_Individual(obj, num_real, num_int)

Arguments

Type IntentOptional Attributes Name
class(GA_Individual_), intent(inout) :: obj
integer(kind=int32), intent(in) :: num_real
integer(kind=int32), intent(in) :: num_int

public subroutine initGA(obj, num_individual, num_real, num_int)

Arguments

Type IntentOptional Attributes Name
class(GA_), intent(inout) :: obj
integer(kind=int32), intent(in) :: num_individual
integer(kind=int32), intent(in) :: num_real
integer(kind=int32), intent(in) :: num_int

public subroutine setupGA(obj, DataType, DataID, DataRange, DataAnnotation)

Arguments

Type IntentOptional Attributes Name
class(GA_), intent(inout) :: obj
integer(kind=int32), intent(in) :: DataType
integer(kind=int32), intent(in) :: DataID
real(kind=real32), intent(in) :: DataRange(2)
character(len=*), intent(in) :: DataAnnotation

public subroutine showGA(obj, KeyWord)

Arguments

Type IntentOptional Attributes Name
class(GA_), intent(in) :: obj
character(len=*), intent(in) :: KeyWord

public subroutine selectGA(obj, score, SurvivalRate)

Arguments

Type IntentOptional Attributes Name
class(GA_), intent(inout) :: obj
real(kind=real64), intent(in) :: score(:)
real(kind=real64), intent(in) :: SurvivalRate

public subroutine crossGA(obj)

Arguments

Type IntentOptional Attributes Name
class(GA_), intent(inout) :: obj

public subroutine mutateGA(obj, KeyWord, sigma)

Arguments

Type IntentOptional Attributes Name
class(GA_), intent(inout) :: obj
character(len=*), intent(in) :: KeyWord
real(kind=real64), intent(in) :: sigma