GAClass Module



Contents


Derived Types

type, public :: GA_annotaton

Components

TypeVisibility AttributesNameInitial
character(len=:), public, allocatable:: annotation

type, public :: GA_Individual_

Components

TypeVisibility AttributesNameInitial
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

TypeVisibility AttributesNameInitial
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 AttributesName
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 AttributesName
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 AttributesName
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 AttributesName
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 AttributesName
class(GA_), intent(in) :: obj
character(len=*), intent(in) :: KeyWord

public subroutine selectGA(obj, score, SurvivalRate)

Arguments

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

public subroutine crossGA(obj)

Arguments

Type IntentOptional AttributesName
class(GA_), intent(inout) :: obj

public subroutine mutateGA(obj, KeyWord, sigma)

Arguments

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