Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmop ¶
type Cmop struct {
ObjectiveCount, ConstraintCount, DecisionVariables int
ConstraintTypes []ConstraintType
DecisionInterval [][]float64
Evaluate func(Genotype) Fitness
Name, TrueParetoFrontFilename string
// contains filtered or unexported fields
}
Cmop is a interface describing a multi objective optimisation problem
func (*Cmop) TrueParetoFront ¶
TrueParetoFront returns the true paretofront in the form of a 2d array. If no datafile for the pareto front is available, the function will return nil.
type ConstraintType ¶
type ConstraintType int
// CMOP is a interface describing a multi objective optimisation problem
type CMOP interface { NumberOfObjectives() int NumberOfConstraints() int Name() string Calculate(Genotype) Fitness }
ConstraintType describes which type of constraint it is. Either a equals-or-less-than or equals-or-greater-than constraint.
const ( //EqualsOrLessThanZero the constraint is a less-than-or-equals-zero constraint EqualsOrLessThanZero ConstraintType = iota + 1 //EqualsOrGreaterThanZero the constraint is a less-than-or-greater-zero constraint EqualsOrGreaterThanZero ConstraintType = iota + 1 )
type Fitness ¶
type Fitness struct {
ObjectiveCount, ConstraintCount int
ObjectiveValues, ConstraintValues []float64
ConstraintTypes []ConstraintType
}
func (Fitness) Feasible ¶
Feasible returns true if an individual is feasible or false if it's infeasible, according to it's constraint values.
func (Fitness) TotalViolation ¶
TotalViolation returns the total constraint violation of all constraints.
type Individual ¶
type Individual interface { Genotype() Genotype //TODO: se på måter å gjøre dette mer generelt senere Fitness() Fitness UpdateFitness() Fitness Copy() Individual Initialise() }
Individual is an interface describing an individual in a population
type MOEA ¶
type MOEA interface { MaxFuncEvals() int MaxViolation() float64 Population() []Individual Initialise() FunctionEvaluations() int FeasibleRatio() float64 Archive() []Individual Evolve(Stage) CHM() CHM }
MOEA is an interface describing Multi Objective Evolutionary Algorithms
type Stage ¶
type Stage interface { Name() string Type() StageType //TODO Fix this in the structs SetOver() IsOver() bool }
Stage interface defines all the menthods needed to be a stage. Might be overkill to have this as an interface and not a single struct