Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- type SingleObjectiveProblem fn = (ProblemType, fn)
- type MultiObjectiveProblem fn = [SingleObjectiveProblem fn]
- type MultiPhenotype a = (Genome a, [Objective])
- evalAllObjectives :: forall fn gt a. (ObjectiveFunction fn a, GenomeState gt a) => MultiObjectiveProblem fn -> [gt] -> [MultiPhenotype a]
- takeObjectiveValues :: MultiPhenotype a -> [Objective]
- stepNSGA2 :: forall fn a. ObjectiveFunction fn a => MultiObjectiveProblem fn -> SelectionOp a -> CrossoverOp a -> MutationOp a -> StepGA Rand a
- stepNSGA2bt :: forall fn a. ObjectiveFunction fn a => MultiObjectiveProblem fn -> CrossoverOp a -> MutationOp a -> StepGA Rand a
- stepConstrainedNSGA2 :: forall fn a b c. (ObjectiveFunction fn a, Real b, Real c) => [Constraint a b] -> ([Constraint a b] -> Genome a -> c) -> MultiObjectiveProblem fn -> SelectionOp a -> CrossoverOp a -> MutationOp a -> StepGA Rand a
- stepConstrainedNSGA2bt :: forall fn a b c. (ObjectiveFunction fn a, Real b, Real c) => [Constraint a b] -> ([Constraint a b] -> Genome a -> c) -> MultiObjectiveProblem fn -> CrossoverOp a -> MutationOp a -> StepGA Rand a
- hypervolume :: forall fn a. ObjectiveFunction fn a => MultiObjectiveProblem fn -> [Objective] -> [MultiPhenotype a] -> Double
Types
type SingleObjectiveProblem fn = (ProblemType, fn) Source #
type MultiObjectiveProblem fn = [SingleObjectiveProblem fn] Source #
type MultiPhenotype a = (Genome a, [Objective]) Source #
An individual with all objective functions evaluated.
Evaluation
:: (ObjectiveFunction fn a, GenomeState gt a) | |
=> MultiObjectiveProblem fn | a list of |
-> [gt] | a population of |
-> [MultiPhenotype a] |
Calculate multiple objective per every genome in the population.
takeObjectiveValues :: MultiPhenotype a -> [Objective] Source #
NSGA-II: A non-dominated sorting genetic algorithm
:: ObjectiveFunction fn a | |
=> MultiObjectiveProblem fn | a list of |
-> SelectionOp a | |
-> CrossoverOp a | |
-> MutationOp a | |
-> StepGA Rand a |
A single step of the NSGA-II algorithm (Non-Dominated Sorting Genetic Algorithm for Multi-Objective Optimization).
The next population is selected from a common pool of parents and
their children minimizing the non-domination rank and maximizing
the crowding distance within the same rank.
The first generation of children is produced without taking
crowding into account.
Every solution is assigned a single objective value which is its
sequence number after sorting with the crowded comparison operator.
The smaller value corresponds to solutions which are not worse
the one with the bigger value. Use evalAllObjectives
to restore
individual objective values.
Reference: Deb, K., Pratap, A., Agarwal, S., & Meyarivan, T. A. M. T. (2002). A fast and elitist multiobjective genetic algorithm: NSGA-II. Evolutionary Computation, IEEE Transactions on, 6(2), 182-197.
Deb et al. used a binary tournament selection, base on crowded
comparison operator. To achieve the same effect, use
stepNSGA2bt
(or stepNSGA2
with tournamentSelect
Minimizing 2 n
, where n
is the size of the population).
:: ObjectiveFunction fn a | |
=> MultiObjectiveProblem fn | a list of |
-> CrossoverOp a | |
-> MutationOp a | |
-> StepGA Rand a |
A single step of NSGA-II algorithm with binary tournament selection.
See also stepNSGA2
.
:: (ObjectiveFunction fn a, Real b, Real c) | |
=> [Constraint a b] | constraints |
-> ([Constraint a b] -> Genome a -> c) | non-negative degree of violation |
-> MultiObjectiveProblem fn | a list of |
-> SelectionOp a | |
-> CrossoverOp a | |
-> MutationOp a | |
-> StepGA Rand a |
A single step of the constrained NSGA-II algorithm, which uses a constraint-domination rule:
“A solution i
is said to constrain-dominate a solution j
, if any of the
following is true: 1) Solution i
is feasible and j
is not. 2) Solutions
i
and j
are both infeasible but solution i
has a smaller overall constraint
violation. 3) Solutions i
and j
are feasible, and solution i
dominates solution j
.”
Reference: (Deb, 2002).
stepConstrainedNSGA2bt Source #
:: (ObjectiveFunction fn a, Real b, Real c) | |
=> [Constraint a b] | constraints |
-> ([Constraint a b] -> Genome a -> c) | non-negative degree of violation |
-> MultiObjectiveProblem fn | a list of |
-> CrossoverOp a | |
-> MutationOp a | |
-> StepGA Rand a |
A single step of the constrained NSGA-II algorithm with binary tournament
selection. See also stepConstrainedNSGA2
.
Performance metrics
:: ObjectiveFunction fn a | |
=> MultiObjectiveProblem fn | multiobjective problem |
-> [Objective] | reference point (the worst point) |
-> [MultiPhenotype a] | a set of solutions to evaluate |
-> Double | hypervolume |
Calculate the hypervolume indicator using WFG algorithm.
Reference: While, L., Bradstreet, L., & Barone, L. (2012). A fast way of calculating exact hypervolumes. Evolutionary Computation, IEEE Transactions on, 16(1), 86-95.