From 717a047bb73af0935fe9d6b259dd2c25632050a0 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sat, 20 Jan 2024 21:58:40 +0000 Subject: [PATCH] build based on 2e2802f --- dev/algorithms/index.html | 34 ++++++++--------- dev/api/index.html | 38 +++++++++---------- dev/contributing/index.html | 2 +- dev/examples/index.html | 10 ++--- dev/faq/index.html | 2 +- dev/index.html | 4 +- dev/indicators/index.html | 6 +-- dev/mcdm/index.html | 8 ++-- dev/problems/index.html | 2 +- dev/references/index.html | 2 +- dev/search/index.html | 2 +- dev/tutorials/create-metaheuristic/index.html | 2 +- dev/tutorials/n-queens/index.html | 4 +- dev/tutorials/parallelization/index.html | 2 +- dev/tutorials/simple-tutorial/index.html | 4 +- dev/visualization/index.html | 2 +- 16 files changed, 62 insertions(+), 62 deletions(-) diff --git a/dev/algorithms/index.html b/dev/algorithms/index.html index fef5bb3e..a532cf73 100644 --- a/dev/algorithms/index.html +++ b/dev/algorithms/index.html @@ -34,7 +34,7 @@ minimizer: [-0.00017150889316537758, -0.007955828028420616, 0.022538733289139145] f calls: 30000 total time: 0.1334 s -+============================+source

Differential Evolution

DE is an evolutionary algorithm based on vector differences. See [2] for more details.

Metaheuristics.DEType
DE(;
++============================+
source

Differential Evolution

DE is an evolutionary algorithm based on vector differences. See [2] for more details.

Metaheuristics.DEType
DE(;
     N  = 0,
     F  = 1.0,
     CR = 0.5,
@@ -60,7 +60,7 @@
   minimizer: [3.2777877981303293e-13, 3.7650459509488005e-13, -7.871487597385812e-13]
     f calls: 30000
  total time: 0.0319 s
-+============================+
source

Particle Swarm Optimization

PSO is a population-based optimization technique inspired by the motion of bird flocks and schooling fish by [3].

Metaheuristics.PSOType
PSO(;
++============================+
source

Particle Swarm Optimization

PSO is a population-based optimization technique inspired by the motion of bird flocks and schooling fish by [3].

Metaheuristics.PSOType
PSO(;
     N  = 0,
     C1 = 2.0,
     C2 = 2.0,
@@ -86,7 +86,7 @@
   minimizer: [-3.055334698085433e-20, -8.666986835846171e-21, -3.8118413472544027e-20]
     f calls: 30000
  total time: 0.1365 s
-+============================+
source

Artificial Bee Colony

A powerful and efficient algorithm for numerical function optimization: artificial bee colony (ABC) algorithm by [4].

Metaheuristics.ABCType
ABC(;
++============================+
source

Artificial Bee Colony

A powerful and efficient algorithm for numerical function optimization: artificial bee colony (ABC) algorithm by [4].

Metaheuristics.ABCType
ABC(;
     N = 50,
     Ne = div(N+1, 2),
     No = div(N+1, 2),
@@ -112,7 +112,7 @@
   minimizer: [8.257485723496422e-5, 0.0002852795196258074, -3.5620824723352315e-5]
     f calls: 30039
  total time: 0.0432 s
-+============================+
source

MOEA/D-DE

Multiobjective optimization problems with complicated Pareto sets by [5].

Metaheuristics.MOEAD_DEType
MOEAD_DE(weights ;
++============================+
source

MOEA/D-DE

Multiobjective optimization problems with complicated Pareto sets by [5].

Metaheuristics.MOEAD_DEType
MOEAD_DE(weights ;
     F = 0.5,
     CR = 1.0,
     λ = Array{Vector{Float64}}[], # ref. points
@@ -151,7 +151,7 @@
 status_moead = optimize(f, bounds, moead_de)
 
 # show results
-display(status_moead)
source

Gravitational Search Algorithm

Chaotic gravitational constants for the gravitational search algorithm by [6]

Metaheuristics.CGSAType
CGSA(;
+display(status_moead)
source

Gravitational Search Algorithm

Chaotic gravitational constants for the gravitational search algorithm by [6]

Metaheuristics.CGSAType
CGSA(;
     N::Int    = 30,
     chValueInitial::Real   = 20,
     chaosIndex::Real   = 9,
@@ -181,7 +181,7 @@
   minimizer: [-8.8507563788141e-6, -1.3050111801923072e-5, 2.7688577445980026e-5]
     f calls: 40000
  total time: 1.0323 s
-+============================+
source

Simulated Annealing

Physics-inspired algorithm for optimization by [7].

Metaheuristics.SAType
    SA(;
++============================+
source

Simulated Annealing

Physics-inspired algorithm for optimization by [7].

Metaheuristics.SAType
    SA(;
         x_initial::Vector = zeros(0),
         N::Int = 500,
         tol_fun::Real= 1e-4,
@@ -206,7 +206,7 @@
   minimizer: [4.4638292404181215e-35, -1.738939846089388e-36, -9.542441152683457e-37]
     f calls: 29802
  total time: 0.0965 s
-+============================+
source

Whale Optimization Algorithm

The Whale Optimization Algorithm inspired by humpback whales proposed in [8].

Metaheuristics.WOAType
WOA(;N = 30, information = Information(), options = Options())

Parameters for the Whale Optimization Algorithm. N is the population size (number of whales).

Example

julia> f(x) = sum(x.^2)
++============================+
source

Whale Optimization Algorithm

The Whale Optimization Algorithm inspired by humpback whales proposed in [8].

Metaheuristics.WOAType
WOA(;N = 30, information = Information(), options = Options())

Parameters for the Whale Optimization Algorithm. N is the population size (number of whales).

Example

julia> f(x) = sum(x.^2)
 f (generic function with 1 method)
 
 julia> optimize(f, [-1 -1 -1; 1 1 1.0], WOA())
@@ -226,7 +226,7 @@
     f calls: 50000
  total time: 0.0588 s
 +============================+
-
source

NSGA-II

A fast and elitist multiobjective genetic algorithm: NSGA-II by [9].

Metaheuristics.NSGA2Type
NSGA2(;
+
source

NSGA-II

A fast and elitist multiobjective genetic algorithm: NSGA-II by [9].

Metaheuristics.NSGA2Type
NSGA2(;
     N = 100,
     η_cr = 20,
     p_cr = 0.9,
@@ -254,7 +254,7 @@
 status = optimize(f, bounds, nsga2)
 
 # show results
-display(status)
source

NSGA-III

An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part I: Solving Problems With Box Constraints by [10].

Metaheuristics.NSGA3Type
NSGA3(;
+display(status)
source

NSGA-III

An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part I: Solving Problems With Box Constraints by [10].

Metaheuristics.NSGA3Type
NSGA3(;
     N = 100,
     η_cr = 20,
     p_cr = 0.9,
@@ -278,7 +278,7 @@
 status = optimize(f, bounds, nsga3)
 
 # show results
-display(status)
source

SMS-EMOA

An EMO algorithm using the hypervolume measure as a selection criterion by [11].

Metaheuristics.SMS_EMOAType
SMS_EMOA(;
+display(status)
source

SMS-EMOA

An EMO algorithm using the hypervolume measure as a selection criterion by [11].

Metaheuristics.SMS_EMOAType
SMS_EMOA(;
     N = 100,
     η_cr = 20,
     p_cr = 0.9,
@@ -307,7 +307,7 @@
 status = optimize(f, bounds, sms_emoa)
 
 # show results
-display(status)
source

SPEA2

Improved strength Pareto evolutionary algorithm by [12].

Metaheuristics.SPEA2Type
SPEA2(;
+display(status)
source

SPEA2

Improved strength Pareto evolutionary algorithm by [12].

Metaheuristics.SPEA2Type
SPEA2(;
     N = 100,
     η_cr = 20,
     p_cr = 0.9,
@@ -335,7 +335,7 @@
 status = optimize(f, bounds, nsga2)
 
 # show results
-display(status)
source

BCA

Bilevel Centers Algorithm has been proposed to solve bilevel optimization problems. See BilevelHeuristics.BCA for details.

MCCGA

Machine-coded Compact Genetic Algorithms for real-valued optimization problems by [13].

Metaheuristics.MCCGAType
MCCGA(;N, maxsamples)

Parameters:

  • N population size. Default is 100.
  • maxsamples maximum number of samples. Default is 10000.

Description

MCCGA method implements the Machine-coded genetic algorithms for real valued optimization problems. The algorithm is based on the concept of a compact genetic algorithm but with a machine-coded representation using IEEE-754 floating point encoding standard. In the first stage of the algorithm, maxsamples number of samples are generated within the range of function domain. This process is required to obtain a vector of probabilities for each single bit of the IEEE-754 representation. In classical CGAs, the initial vector of probabilities is generated using the constant probability of 0.5 whereas in MCCGA, the probability of ith bit having a value of 1 depends on the function domain. The second step performs a CGA search but with IEEE-754 bits again. Since CGA does not use a population of solutions but a single vector of probabilities, the parameter N does not really mean number of solutions. Instead, it means the amount of mutation in each iteration, e.g. 1/N. In the last stage, a local search is performed for fine-tuning. In this implementation, Hooke & Jeeves direct search algorithm is used.

References

  • Moser, Irene. "Hooke-Jeeves Revisited." 2009 IEEE Congress on Evolutionary Computation. IEEE, 2009.
  • Harik, G. R., Lobo, F. G., & Goldberg, D. E. (1999). The compact genetic algorithm. IEEE transactions on evolutionary computation, 3(4), 287-297.
  • Satman, M. H. & Akadal, E. (2020). Machine Coded Compact Genetic Algorithms for Real Parameter Optimization Problems . Alphanumeric Journal , 8 (1) , 43-58 . DOI: 10.17093/alphanumeric.576919
  • Mehmet Hakan Satman, Emre Akadal, Makine Kodlu Hibrit Kompakt Genetik Algoritmalar Optimizasyon Yöntemi, Patent, TR, 2022/01, 2018-GE-510239

Example


+display(status)
source

BCA

Bilevel Centers Algorithm has been proposed to solve bilevel optimization problems. See BilevelHeuristics.BCA for details.

MCCGA

Machine-coded Compact Genetic Algorithms for real-valued optimization problems by [13].

Metaheuristics.MCCGAType
MCCGA(;N, maxsamples)

Parameters:

  • N population size. Default is 100.
  • maxsamples maximum number of samples. Default is 10000.

Description

MCCGA method implements the Machine-coded genetic algorithms for real valued optimization problems. The algorithm is based on the concept of a compact genetic algorithm but with a machine-coded representation using IEEE-754 floating point encoding standard. In the first stage of the algorithm, maxsamples number of samples are generated within the range of function domain. This process is required to obtain a vector of probabilities for each single bit of the IEEE-754 representation. In classical CGAs, the initial vector of probabilities is generated using the constant probability of 0.5 whereas in MCCGA, the probability of ith bit having a value of 1 depends on the function domain. The second step performs a CGA search but with IEEE-754 bits again. Since CGA does not use a population of solutions but a single vector of probabilities, the parameter N does not really mean number of solutions. Instead, it means the amount of mutation in each iteration, e.g. 1/N. In the last stage, a local search is performed for fine-tuning. In this implementation, Hooke & Jeeves direct search algorithm is used.

References

  • Moser, Irene. "Hooke-Jeeves Revisited." 2009 IEEE Congress on Evolutionary Computation. IEEE, 2009.
  • Harik, G. R., Lobo, F. G., & Goldberg, D. E. (1999). The compact genetic algorithm. IEEE transactions on evolutionary computation, 3(4), 287-297.
  • Satman, M. H. & Akadal, E. (2020). Machine Coded Compact Genetic Algorithms for Real Parameter Optimization Problems . Alphanumeric Journal , 8 (1) , 43-58 . DOI: 10.17093/alphanumeric.576919
  • Mehmet Hakan Satman, Emre Akadal, Makine Kodlu Hibrit Kompakt Genetik Algoritmalar Optimizasyon Yöntemi, Patent, TR, 2022/01, 2018-GE-510239

Example


 julia> f, bounds, solutions = Metaheuristics.TestProblems.rastrigin();
 
 julia> result = optimize(f, bounds, MCCGA())
@@ -363,7 +363,7 @@
     f calls: 6012
  total time: 1.5233 s
 stop reason: Other stopping criteria.
-+============================+
source

GA

Metaheuristics.GAType
GA(;
++============================+
source

GA

Metaheuristics.GAType
GA(;
     N = 100,
     p_mutation  = 1e-5,
     p_crossover = 0.5,
@@ -441,7 +441,7 @@
     f calls: 49900
  total time: 0.5775 s
 stop reason: Maximum number of iterations exceeded.
-+============================+
source

CCMO

A Coevolutionary Framework for Constrained Multiobjective Optimization Problems proposed by [14].

Metaheuristics.CCMOType
CCMO(base_optimizer; infromation, options)

Parameters for CCMO algorithm. base_algorithm only supports NSGA2().

A feasible solution is such that g_i(x) ≤ 0 and h_j(x) = 0.

Example

julia> f, bounds, pf = Metaheuristics.TestProblems.MTP();
++============================+
source

CCMO

A Coevolutionary Framework for Constrained Multiobjective Optimization Problems proposed by [14].

Metaheuristics.CCMOType
CCMO(base_optimizer; infromation, options)

Parameters for CCMO algorithm. base_algorithm only supports NSGA2().

A feasible solution is such that g_i(x) ≤ 0 and h_j(x) = 0.

Example

julia> f, bounds, pf = Metaheuristics.TestProblems.MTP();
 
 julia> ccmo = CCMO(NSGA2(N=100, p_m=0.001));
 
@@ -493,8 +493,8 @@
   feasibles: 100 / 100 in final population
  total time: 7.0616 s
 stop reason: Maximum number of iterations exceeded.
-+============================+
source

$\varepsilon$DE

$\varepsilon$ Constrained Differential Evolution with Gradient-Based Mutation and Feasible Elites by [15].

Gradient mutation

Gradient mutation is not implemented here.

Metaheuristics.εDEType
εDE(cp = 5, DE_kargs...)
-epsilonDE(cp = 5, DE_kargs...)

Parameters for ε Differential Evolution for constrained optimization.

See DE for more details about DE parameters (DE_kargs).

This implementation is not implementing the gradient-based repair method.

source

BRKGA

Biased Random Key Genetic Algorithm by [16].

Metaheuristics.BRKGAFunction
BRKGA(num_elites = 20, num_mutants = 10, num_offsprings = 70, bias = 0.7)

Biased Random Key Genetic Algorithm (BRKGA).

Example

julia> target_perm = collect(reverse(1:10))
++============================+
source

$\varepsilon$DE

$\varepsilon$ Constrained Differential Evolution with Gradient-Based Mutation and Feasible Elites by [15].

Gradient mutation

Gradient mutation is not implemented here.

Metaheuristics.εDEType
εDE(cp = 5, DE_kargs...)
+epsilonDE(cp = 5, DE_kargs...)

Parameters for ε Differential Evolution for constrained optimization.

See DE for more details about DE parameters (DE_kargs).

This implementation is not implementing the gradient-based repair method.

source

BRKGA

Biased Random Key Genetic Algorithm by [16].

Metaheuristics.BRKGAFunction
BRKGA(num_elites = 20, num_mutants = 10, num_offsprings = 70, bias = 0.7)

Biased Random Key Genetic Algorithm (BRKGA).

Example

julia> target_perm = collect(reverse(1:10))
 10-element Vector{Int64}:
  10
   9
@@ -532,4 +532,4 @@
   4
   3
   2
-  1
source
+ 1source diff --git a/dev/api/index.html b/dev/api/index.html index f34d91f5..f8222deb 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -24,12 +24,12 @@ minimizer: [-1.5135301653303966e-111, 3.8688354844737692e-112, 3.082095708730726e-112] f calls: 29989 total time: 0.1543 s -+============================+source
Metaheuristics.optimize!Function
optimize!(f, search_space, method;logger)

Perform an iteration of method, and save the results in method.status.

Example

f, bounds, _ = Metaheuristics.TestProblems.sphere();
++============================+
source
Metaheuristics.optimize!Function
optimize!(f, search_space, method;logger)

Perform an iteration of method, and save the results in method.status.

Example

f, bounds, _ = Metaheuristics.TestProblems.sphere();
 method = ECA()
 while !Metaheuristics.should_stop(method)
     optimize!(f, bounds, method)
 end
-result = Metaheuristics.get_result(method)

See also optimize.

source
Metaheuristics.StateType
State datatype

State is used to store the current metaheuristic status. In fact, the optimize function returns a State.

  • best_sol Stores the best solution found so far.
  • population is an Array{typeof(best_sol)} for population-based algorithms.
  • f_calls is the number of objective functions evaluations.
  • g_calls is the number of inequality constraints evaluations.
  • h_calls is the number of equality constraints evaluations.
  • iteration is the current iteration.
  • success_rate percentage of new generated solutions better that their parents.
  • convergence used save the State at each iteration.
  • start_time saves the time() before the optimization process.
  • final_time saves the time() after the optimization process.
  • stop if true, then stops the optimization process.

Example

julia> f(x) = sum(x.^2)
+result = Metaheuristics.get_result(method)

See also optimize.

source
Metaheuristics.StateType
State datatype

State is used to store the current metaheuristic status. In fact, the optimize function returns a State.

  • best_sol Stores the best solution found so far.
  • population is an Array{typeof(best_sol)} for population-based algorithms.
  • f_calls is the number of objective functions evaluations.
  • g_calls is the number of inequality constraints evaluations.
  • h_calls is the number of equality constraints evaluations.
  • iteration is the current iteration.
  • success_rate percentage of new generated solutions better that their parents.
  • convergence used save the State at each iteration.
  • start_time saves the time() before the optimization process.
  • final_time saves the time() after the optimization process.
  • stop if true, then stops the optimization process.

Example

julia> f(x) = sum(x.^2)
 f (generic function with 1 method)
 
 julia> bounds = [  -10.0 -10 -10; # lower bounds
@@ -54,7 +54,7 @@
 3-element Array{Float64,1}:
  -7.691251412064516e-83
   1.0826961235605951e-82
- -8.358428300092186e-82
source
Metaheuristics.InformationType
Information Structure

Information can be used to store the true optimum in order to stop a metaheuristic early.

Properties:

  • f_optimum known minimum.
  • x_optimum known minimizer.

If Options is provided, then optimize will stop when |f(x) - f(x_optimum)| < Options.f_tol or ‖ x - x_optimum ‖ < Options.x_tol (euclidean distance).

Example

If you want an approximation to the minimum with accuracy of 1e-3 (|f(x) - f(x*)| < 1e-3), then you may use Information.

julia> f(x) = sum(x.^2)
+ -8.358428300092186e-82
source
Metaheuristics.InformationType
Information Structure

Information can be used to store the true optimum in order to stop a metaheuristic early.

Properties:

  • f_optimum known minimum.
  • x_optimum known minimizer.

If Options is provided, then optimize will stop when |f(x) - f(x_optimum)| < Options.f_tol or ‖ x - x_optimum ‖ < Options.x_tol (euclidean distance).

Example

If you want an approximation to the minimum with accuracy of 1e-3 (|f(x) - f(x*)| < 1e-3), then you may use Information.

julia> f(x) = sum(x.^2)
 f (generic function with 1 method)
 
 julia> bounds = [  -10.0 -10 -10; # lower bounds
@@ -76,7 +76,7 @@
 | solution.x = [0.022811671589729583, 0.007052331140376011, -0.008951836265056107]
 | f calls: 474
 | Total time: 0.0106 s
-+============================+
source
Metaheuristics.OptionsType
Options(;
++============================+
source
Metaheuristics.OptionsType
Options(;
     x_tol::Real = 1e-8,
     f_tol::Real = 1e-12,
     f_tol_rel::Real = eps(),
@@ -103,7 +103,7 @@
  -10.0  -10.0  -10.0
   10.0   10.0   10.0
 
-julia> state = optimize(f, bounds, ECA(options=options));
source
Metaheuristics.convergenceFunction
convergence(state)

get the data (touple with the number of function evaluations and fuction values) to plot the convergence graph.

Example

julia> f(x) = sum(x.^2)
+julia> state = optimize(f, bounds, ECA(options=options));
source
Metaheuristics.convergenceFunction
convergence(state)

get the data (touple with the number of function evaluations and fuction values) to plot the convergence graph.

Example

julia> f(x) = sum(x.^2)
 f (generic function with 1 method)
 
 julia> bounds = [  -10.0 -10 -10; # lower bounds
@@ -121,14 +121,14 @@
 | Total time: 0.3300 s
 +============================+
 
-julia> n_fes, fxs = convergence(state);
source
Metaheuristics.minimizerFunction
minimizer(state)

Returns the approximation to the minimizer (argmin f(x)) stored in state.

source
Base.minimumMethod
minimum(state::Metaheuristics.State)

Returns the approximation to the minimum (min f(x)) stored in state.

source
Metaheuristics.TerminationStatusCodeType
TerminationStatusCode

An Enum of possible => values for State. Possible values:

  • ITERATION_LIMIT
  • TIME_LIMIT
  • EVALUATIONS_LIMIT
  • ACCURACY_LIMIT
  • OBJECTIVE_VARIANCE_LIMIT
  • OBJECTIVE_DIFFERENCE_LIMIT
  • OTHER_LIMIT
  • UNKNOWN_STOP_REASON

See also termination_status_message.

source
Metaheuristics.termination_status_messageFunction
termination_status_message(status)

Return a string of the message related to the status.

See TerminationStatusCode

Example:

julia> termination_status_message(Metaheuristics.ITERATION_LIMIT)
+julia> n_fes, fxs = convergence(state);
source
Metaheuristics.minimizerFunction
minimizer(state)

Returns the approximation to the minimizer (argmin f(x)) stored in state.

source
Base.minimumMethod
minimum(state::Metaheuristics.State)

Returns the approximation to the minimum (min f(x)) stored in state.

source
Metaheuristics.TerminationStatusCodeType
TerminationStatusCode

An Enum of possible => values for State. Possible values:

  • ITERATION_LIMIT
  • TIME_LIMIT
  • EVALUATIONS_LIMIT
  • ACCURACY_LIMIT
  • OBJECTIVE_VARIANCE_LIMIT
  • OBJECTIVE_DIFFERENCE_LIMIT
  • OTHER_LIMIT
  • UNKNOWN_STOP_REASON

See also termination_status_message.

source
Metaheuristics.termination_status_messageFunction
termination_status_message(status)

Return a string of the message related to the status.

See TerminationStatusCode

Example:

julia> termination_status_message(Metaheuristics.ITERATION_LIMIT)
 "Maximum number of iterations exceeded."
 
 julia> termination_status_message(optimize(f, bounds))
 "Maximum number of iterations exceeded."
 
 julia> termination_status_message(ECA())
-"Unknown stop reason."
source

Methods for Solutions/Individuals

Metaheuristics.positionsFunction
positions(state)

If state.population has N solutions, then returns a N×d Matrix.

source
Metaheuristics.fvalsFunction
fvals(state)

If state.population has N solutions, then returns a Vector with the objective function values from items in state.population.

source
Metaheuristics.nfesFunction
nfes(state)

get the number of function evaluations.

source
Metaheuristics.create_childFunction
Metaheuristics.create_child(x, fx)

Constructor for a solution depending on the result of fx.

Example

julia> import Metaheuristics
+"Unknown stop reason."
source

Methods for Solutions/Individuals

Metaheuristics.positionsFunction
positions(state)

If state.population has N solutions, then returns a N×d Matrix.

source
Metaheuristics.fvalsFunction
fvals(state)

If state.population has N solutions, then returns a Vector with the objective function values from items in state.population.

source
Metaheuristics.nfesFunction
nfes(state)

get the number of function evaluations.

source
Metaheuristics.create_childFunction
Metaheuristics.create_child(x, fx)

Constructor for a solution depending on the result of fx.

Example

julia> import Metaheuristics
 
 julia> Metaheuristics.create_child(rand(3), 1.0)
 | f(x) = 1
@@ -166,15 +166,15 @@
        -3 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ 
           └────────────────────────────────────────┘ 
           -3                                       4
-                             f_1
source
Metaheuristics.get_positionFunction
get_position(solution)

Get the position vector.

source
get_position(bee)

Get the position vector of a bee when optimize using ABC algorithm.

source
Metaheuristics.fvalFunction
fval(solution)

Get the objective function value (fitness) of a solution.

source
fval(solution)

Get the fitness of a bee when optimize using ABC algorithm.

source
Metaheuristics.gvalFunction
gval(solution)

Get the inequality constraints of a solution.

source
Metaheuristics.hvalFunction
hval(solution)

Get the equality constraints of a solution.

source
Metaheuristics.is_feasibleFunction
is_feasible(solution)

Returns true if solution is feasible, otherwise returns false.

source
Metaheuristics.is_betterFunction
is_better(A, B)
+                             f_1
source
Metaheuristics.get_positionFunction
get_position(solution)

Get the position vector.

source
get_position(bee)

Get the position vector of a bee when optimize using ABC algorithm.

source
Metaheuristics.fvalFunction
fval(solution)

Get the objective function value (fitness) of a solution.

source
fval(solution)

Get the fitness of a bee when optimize using ABC algorithm.

source
Metaheuristics.gvalFunction
gval(solution)

Get the inequality constraints of a solution.

source
Metaheuristics.hvalFunction
hval(solution)

Get the equality constraints of a solution.

source
Metaheuristics.is_feasibleFunction
is_feasible(solution)

Returns true if solution is feasible, otherwise returns false.

source
Metaheuristics.is_betterFunction
is_better(A, B)
 return true if A is better than B in a minimization problem.
-Feasibility rules and dominated criteria are used in comparison.
source
Metaheuristics.dominatesFunction
does A dominate B?
source
Metaheuristics.compareFunction
compare(a, b)
+Feasibility rules and dominated criteria are used in comparison.
source
Metaheuristics.dominatesFunction
does A dominate B?
source
Metaheuristics.compareFunction
compare(a, b)
 compares whether two vectors are dominated or not.
 Output:
 `1` if argument 1 (a) dominates argument 2 (b).
 `2` if argument 2 (b) dominates argument 1 (a).
 `3` if both arguments 1 (a) and 2 (b) are incomparable.
-`0` if both arguments 1 (a) and 2 (b) are equal.
source
Metaheuristics.gen_initial_stateFunction
gen_initial_state(problem,parameters,information,options)

Generate an initial state, i.e., compute uniformly distributed random vectors in bounds, after that are evaluated in objective function. This method require that parameters.N is valid attribute.

source
Metaheuristics.set_user_solutions!Function
set_user_solutions!(optimizer, x, fx;verbose=true)

Provide initial solutions to the optimizer.

  • x can be a Vector and fx a function or fx = f(x)
  • x can be a matrix containing solutions in rows.

Example

julia> f(x) = abs(x[1]) + x[2]  + x[3]^2 # objective function
+`0` if both arguments 1 (a) and 2 (b) are equal.
source
Metaheuristics.gen_initial_stateFunction
gen_initial_state(problem,parameters,information,options)

Generate an initial state, i.e., compute uniformly distributed random vectors in bounds, after that are evaluated in objective function. This method require that parameters.N is valid attribute.

source
Metaheuristics.set_user_solutions!Function
set_user_solutions!(optimizer, x, fx;verbose=true)

Provide initial solutions to the optimizer.

  • x can be a Vector and fx a function or fx = f(x)
  • x can be a matrix containing solutions in rows.

Example

julia> f(x) = abs(x[1]) + x[2]  + x[3]^2 # objective function
 f (generic function with 1 method)
 
 julia> algo  = ECA(N = 61); # optimizer
@@ -197,22 +197,22 @@
     f calls: 25132
  total time: 0.0856 s
 stop reason: Small difference of objective function values.
-+============================+
source

Variation

Metaheuristics.SBXType
SBX(;η, p, bounds)

Simulated Binomial Crossover.

source
Metaheuristics.SBX_crossoverFunction
SBX_crossover(vector1, vector2, bounds, η=15, p_variable = 0.9)

Simulated binomial crossover for given two Vectors{Real}.

source
Metaheuristics.ECA_operatorFunction
ECA_operator(population, K, η_max)

Compute a solution using ECA variation operator, K is the number of solutions used to calculate the center of mass and η_max is the maximum stepsize.

source
Metaheuristics.DE_crossoverFunction
DE_crossover(x, u, CR)

Binomial crossover between x and u for Differential Evolution with probability CR, i.e., v[j] = u[j] if rand() < CR, otherwise v[j] = x[j]. Return v.

source
Metaheuristics.polynomial_mutation!Function
polynomial_mutation!(vector, bounds, η=20, prob = 1 / length(vector))

Polynomial Mutation applied to a vector of real numbers.

source
Metaheuristics.DE_mutationFunction
DE_mutation(population, F = 1.0, strategy = :rand1)

Generate a Vector computed from population used in Differential Evolution. Parameters: F is the stepsize, strategy can be one the following :best1, :rand2, :randToBest1 or :best2.

source
Metaheuristics.MOEAD_DE_reproductionFunction
MOEAD_DE_reproduction(a, b, c, F, CR, p_m, η, bounds)

Perform Differential Evolution operators and polynomial mutation using three vectors a, b, c and parameters F, CR, p_m, η, i.e., stepsize, crossover and mutation probability.

source
Metaheuristics.binary_tournamentFunction
binary_tournament(population)

Apply binary tournament to obtain a solution from from population.

source
Metaheuristics.GA_reproductionFunction
GA_reproduction(pa::AbstractVector{T},
++============================+
source

Variation

Metaheuristics.SBXType
SBX(;η, p, bounds)

Simulated Binomial Crossover.

source
Metaheuristics.SBX_crossoverFunction
SBX_crossover(vector1, vector2, bounds, η=15, p_variable = 0.9)

Simulated binomial crossover for given two Vectors{Real}.

source
Metaheuristics.ECA_operatorFunction
ECA_operator(population, K, η_max)

Compute a solution using ECA variation operator, K is the number of solutions used to calculate the center of mass and η_max is the maximum stepsize.

source
Metaheuristics.DE_crossoverFunction
DE_crossover(x, u, CR)

Binomial crossover between x and u for Differential Evolution with probability CR, i.e., v[j] = u[j] if rand() < CR, otherwise v[j] = x[j]. Return v.

source
Metaheuristics.polynomial_mutation!Function
polynomial_mutation!(vector, bounds, η=20, prob = 1 / length(vector))

Polynomial Mutation applied to a vector of real numbers.

source
Metaheuristics.DE_mutationFunction
DE_mutation(population, F = 1.0, strategy = :rand1)

Generate a Vector computed from population used in Differential Evolution. Parameters: F is the stepsize, strategy can be one the following :best1, :rand2, :randToBest1 or :best2.

source
Metaheuristics.MOEAD_DE_reproductionFunction
MOEAD_DE_reproduction(a, b, c, F, CR, p_m, η, bounds)

Perform Differential Evolution operators and polynomial mutation using three vectors a, b, c and parameters F, CR, p_m, η, i.e., stepsize, crossover and mutation probability.

source
Metaheuristics.binary_tournamentFunction
binary_tournament(population)

Apply binary tournament to obtain a solution from from population.

source
Metaheuristics.GA_reproductionFunction
GA_reproduction(pa::AbstractVector{T},
                 pb::AbstractVector{T},
                 bounds;
                 η_cr = 20,
                 η_m  = 15,
                 p_cr = 0.9,
-                p_m  = 0.1)

Crate two solutions by applying SBX to parents pa and pb and polynomial mutation to offspring. Return two vectors.

source
Metaheuristics.GA_reproduction_halfFunction
GA_reproduction_half(pa::AbstractVector{T},
+                p_m  = 0.1)

Crate two solutions by applying SBX to parents pa and pb and polynomial mutation to offspring. Return two vectors.

source
Metaheuristics.GA_reproduction_halfFunction
GA_reproduction_half(pa::AbstractVector{T},
                 pb::AbstractVector{T},
                 bounds;
                 η_cr = 20,
                 η_m  = 15,
                 p_cr = 0.9,
-                p_m  = 0.1)

Same that GA_reproduction but only returns one offspring.

source
Metaheuristics.RandomBinaryType
RandomBinary(;N)

Create random binary individuals.

source
Metaheuristics.RandomPermutationType
RandomPermutation(;N)

Create individuals in random permutations.

source
Metaheuristics.TournamentSelectionType
TournamentSelection(;K=2, N=0)

Perform the K-tournament selection and return N elements.

source
Metaheuristics.RouletteWheelSelectionType
RouletteWheelSelection(;N=0)

Perform Roulette Wheel Selection and return N elements.

source
Metaheuristics.UniformCrossoverType
UniformCrossover(;p = 0.5)

Uniform crossover a.k.a. Binomial crossover. Suitable for binary representation.

source
Metaheuristics.OrderCrossoverType
OrderCrossover()

Order crossover for representation where order is important. Suitable for permutation representation.

source
Metaheuristics.BitFlipMutationType
BitFlipMutation(;p = 1e-2)

Flip each bit with probability p.

source
Metaheuristics.SlightMutationType
SlightMutation

Fogel, D. B. (1988). An evolutionary approach to the traveling salesman problem. Biological Cybernetics, 60(2), 139-144.

source
Metaheuristics.PolynomialMutationType
PolynomialMutation(;η, p, bounds)

Polynomial mutation.

source
Metaheuristics.GenerationalReplacementType
GenerationalReplacement()

Generational replacement.

source
Metaheuristics.ElitistReplacementType
ElitistReplacement()

Offspring is inserted in population to keep the best individuals (keep population size).

source
Metaheuristics.RankAndCrowdingType
RankAndCrowding()

Perform environmental_selection! based non-dominated ranking and crowding distance.

source

Population

Metaheuristics.get_bestFunction
get_best(population)
-return best element in population according to the `is_better` function.
source
Metaheuristics.argworstFunction
argworst(population)
-return the index of the worst element in population
source
Metaheuristics.argbestFunction
argworst(population)
-return the index of the worst element in population
source
Metaheuristics.nadirFunction
nadir(points)

Computes the nadir point from a provided array of Vectors or a population or row vectors in a Matrix.

source
Metaheuristics.idealFunction
ideal(points)

Computes the ideal point from a provided array of Vectors or a population or row vectors in a Matrix.

source
Metaheuristics.non_dominated_sortFunction
non_dominated_sort(population)

Return a vector of integers r containing in r[i] the rank for population[i].

source
Metaheuristics.get_frontsFunction
get_fronts(population, computed_ranks = true)

Return each sub-front in an array. If computed_ranks == true, this method assumes that fast_non_dominated_sort!(population) has been called before.

source
Metaheuristics.fast_non_dominated_sort!Function
fast_non_dominated_sort!(population)

Sort population using the fast non dominated sorting algorithm. Note that s.rank is updated for each solution s ∈ population.

source
Metaheuristics.get_non_dominated_solutions_permFunction
get_non_dominated_solutions_perm(population)

Return a vector of integers v such that population[v] are the non dominated solutions contained in population.

source
Metaheuristics.get_non_dominated_solutionsFunction
get_non_dominated_solutions(population)

Return the non dominated solutions contained in population.

source

Stopping Criteria

Metaheuristics.diff_checkFunction
diff_check(status, information, options; d = options.f_tol, p = 0.5)

Check the difference between best and worst objective function values in current population (where at least %p of solution are feasible). Return true when such difference is <= d, otherwise return false.

Ref. Zielinski, K., & Laur, R. (n.d.). Stopping Criteria for Differential Evolution in Constrained Single-Objective Optimization. Studies in Computational Intelligence, 111–138. doi:10.1007/978-3-540-68830-34 (https://doi.org/10.1007/978-3-540-68830-34)

source
Metaheuristics.call_limit_stop_checkFunction
call_limit_stop_check(status, information, options)

Limit the number of function evaluations, i.e., return status.f_calls >= options.f_calls_limit.

source
Metaheuristics.iteration_stop_checkFunction
iteration_stop_check(status, information, options)

Used to limit the number of iterations.

source
Metaheuristics.time_stop_checkFunction
time_stop_check(status, information, options)

Used to limit the time (in seconds), i.e., status.overall_time >= options.time_limit.

source
Metaheuristics.accuracy_stop_checkFunction
accuracy_stop_check(status, information, options)

If the optimum is provided, then check if the accuracy is met via abs(status.best_sol.f - information.f_optimum) < options.f_tol.

source
Metaheuristics.var_stop_checkFunction
var_stop_check(status, information, options)

Check if the variance is close to zero in objective space.

source

Sampling

Metaheuristics.sampleFunction
sample(method, [bounds])

Return a matrix with data by rows generated by using method (real representation) in inclusive interval [0, 1]. Here, method can be LatinHypercubeSampling, Grid or RandomInBounds.

Example

julia> sample(LatinHypercubeSampling(10,2))
+                p_m  = 0.1)

Same that GA_reproduction but only returns one offspring.

source
Metaheuristics.RandomBinaryType
RandomBinary(;N)

Create random binary individuals.

source
Metaheuristics.RandomPermutationType
RandomPermutation(;N)

Create individuals in random permutations.

source
Metaheuristics.TournamentSelectionType
TournamentSelection(;K=2, N=0)

Perform the K-tournament selection and return N elements.

source
Metaheuristics.RouletteWheelSelectionType
RouletteWheelSelection(;N=0)

Perform Roulette Wheel Selection and return N elements.

source
Metaheuristics.UniformCrossoverType
UniformCrossover(;p = 0.5)

Uniform crossover a.k.a. Binomial crossover. Suitable for binary representation.

source
Metaheuristics.OrderCrossoverType
OrderCrossover()

Order crossover for representation where order is important. Suitable for permutation representation.

source
Metaheuristics.BitFlipMutationType
BitFlipMutation(;p = 1e-2)

Flip each bit with probability p.

source
Metaheuristics.SlightMutationType
SlightMutation

Fogel, D. B. (1988). An evolutionary approach to the traveling salesman problem. Biological Cybernetics, 60(2), 139-144.

source
Metaheuristics.PolynomialMutationType
PolynomialMutation(;η, p, bounds)

Polynomial mutation.

source
Metaheuristics.GenerationalReplacementType
GenerationalReplacement()

Generational replacement.

source
Metaheuristics.ElitistReplacementType
ElitistReplacement()

Offspring is inserted in population to keep the best individuals (keep population size).

source
Metaheuristics.RankAndCrowdingType
RankAndCrowding()

Perform environmental_selection! based non-dominated ranking and crowding distance.

source

Population

Metaheuristics.get_bestFunction
get_best(population)
+return best element in population according to the `is_better` function.
source
Metaheuristics.argworstFunction
argworst(population)
+return the index of the worst element in population
source
Metaheuristics.argbestFunction
argworst(population)
+return the index of the worst element in population
source
Metaheuristics.nadirFunction
nadir(points)

Computes the nadir point from a provided array of Vectors or a population or row vectors in a Matrix.

source
Metaheuristics.idealFunction
ideal(points)

Computes the ideal point from a provided array of Vectors or a population or row vectors in a Matrix.

source
Metaheuristics.non_dominated_sortFunction
non_dominated_sort(population)

Return a vector of integers r containing in r[i] the rank for population[i].

source
Metaheuristics.get_frontsFunction
get_fronts(population, computed_ranks = true)

Return each sub-front in an array. If computed_ranks == true, this method assumes that fast_non_dominated_sort!(population) has been called before.

source
Metaheuristics.fast_non_dominated_sort!Function
fast_non_dominated_sort!(population)

Sort population using the fast non dominated sorting algorithm. Note that s.rank is updated for each solution s ∈ population.

source
Metaheuristics.get_non_dominated_solutions_permFunction
get_non_dominated_solutions_perm(population)

Return a vector of integers v such that population[v] are the non dominated solutions contained in population.

source
Metaheuristics.get_non_dominated_solutionsFunction
get_non_dominated_solutions(population)

Return the non dominated solutions contained in population.

source

Stopping Criteria

Metaheuristics.diff_checkFunction
diff_check(status, information, options; d = options.f_tol, p = 0.5)

Check the difference between best and worst objective function values in current population (where at least %p of solution are feasible). Return true when such difference is <= d, otherwise return false.

Ref. Zielinski, K., & Laur, R. (n.d.). Stopping Criteria for Differential Evolution in Constrained Single-Objective Optimization. Studies in Computational Intelligence, 111–138. doi:10.1007/978-3-540-68830-34 (https://doi.org/10.1007/978-3-540-68830-34)

source
Metaheuristics.call_limit_stop_checkFunction
call_limit_stop_check(status, information, options)

Limit the number of function evaluations, i.e., return status.f_calls >= options.f_calls_limit.

source
Metaheuristics.iteration_stop_checkFunction
iteration_stop_check(status, information, options)

Used to limit the number of iterations.

source
Metaheuristics.time_stop_checkFunction
time_stop_check(status, information, options)

Used to limit the time (in seconds), i.e., status.overall_time >= options.time_limit.

source
Metaheuristics.accuracy_stop_checkFunction
accuracy_stop_check(status, information, options)

If the optimum is provided, then check if the accuracy is met via abs(status.best_sol.f - information.f_optimum) < options.f_tol.

source
Metaheuristics.var_stop_checkFunction
var_stop_check(status, information, options)

Check if the variance is close to zero in objective space.

source

Sampling

Metaheuristics.sampleFunction
sample(method, [bounds])

Return a matrix with data by rows generated by using method (real representation) in inclusive interval [0, 1]. Here, method can be LatinHypercubeSampling, Grid or RandomInBounds.

Example

julia> sample(LatinHypercubeSampling(10,2))
 10×2 Matrix{Float64}:
  0.0705631  0.795046
  0.7127     0.0443734
@@ -236,7 +236,7 @@
   6.43987   -1.74596
  -1.3162    -4.50273
   9.45114   -7.13632
- -4.71696    5.0381
source
Metaheuristics.RandomInBoundsType
RandomInBounds

Initialize N solutions with random values in bounds. Suitable for integer and real coded problems.

source
Metaheuristics.LatinHypercubeSamplingType
LatinHypercubeSampling(nsamples, dim; iterations)

Create N solutions within a Latin Hypercube sample in bounds with dim.

Example

julia> sample(LatinHypercubeSampling(10,2))
+ -4.71696    5.0381
source
Metaheuristics.RandomInBoundsType
RandomInBounds

Initialize N solutions with random values in bounds. Suitable for integer and real coded problems.

source
Metaheuristics.LatinHypercubeSamplingType
LatinHypercubeSampling(nsamples, dim; iterations)

Create N solutions within a Latin Hypercube sample in bounds with dim.

Example

julia> sample(LatinHypercubeSampling(10,2))
 10×2 Matrix{Float64}:
  0.0705631  0.795046
  0.7127     0.0443734
@@ -260,7 +260,7 @@
   6.43987   -1.74596
  -1.3162    -4.50273
   9.45114   -7.13632
- -4.71696    5.0381
source
Metaheuristics.GridType
Grid(npartitions, dim)

Parameters to generate a grid with npartitions in a space with dim dimensions.

Example

julia> sample(Grid(5,2))
+ -4.71696    5.0381
source
Metaheuristics.GridType
Grid(npartitions, dim)

Parameters to generate a grid with npartitions in a space with dim dimensions.

Example

julia> sample(Grid(5,2))
 25×2 Matrix{Float64}:
  0.0   0.0
  0.25  0.0
@@ -280,4 +280,4 @@
   ⋮    
   0.0   1.0
   0.5   1.0
-  1.0   1.0

Note that the sample is with size npartitions^(dim).

source
+ 1.0 1.0

Note that the sample is with size npartitions^(dim).

source diff --git a/dev/contributing/index.html b/dev/contributing/index.html index 80892dd6..66ccf9c5 100644 --- a/dev/contributing/index.html +++ b/dev/contributing/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-184071594-1', {'page_path': location.pathname + location.search + location.hash}); -

Contributing

Please, be free to send me your PR, issue or any comment about this package for Julia.

You can contribute as follows:

+

Contributing

Please, be free to send me your PR, issue or any comment about this package for Julia.

You can contribute as follows:

diff --git a/dev/examples/index.html b/dev/examples/index.html index 2dc936fd..5269cdd4 100644 --- a/dev/examples/index.html +++ b/dev/examples/index.html @@ -34,7 +34,7 @@ Minimum: 1.98992 Minimizer: [4.9425e-09, -2.63681e-09, 5.26807e-10, …, -2.05997e-09] Function calls: 37800 - Total time: 1.8491 s + Total time: 1.6422 s Stop reason: Due to Convergence Termination criterion.

The minimum and minimizer:

minimum(result)
1.9899181141865938
minimizer(result)
10-element Vector{Float64}:
@@ -65,7 +65,7 @@
   Minimizer:       [0.957093, 0.915803]
   Function calls:  20010
   Feasibles:       30 / 30 in final population
-  Total time:      1.2850 s
+  Total time:      1.1898 s
   Stop reason:     Maximum objective function calls exceeded.

Multiobjective Optimization

To implement a multiobjective optimization problem and solve it, you can proceed as usual. Here, you need to provide constraints if they exist, otherwise put gx = [0.0]; hx = [0.0]; to indicate an unconstrained multiobjective problem.

julia> using UnicodePlots # to visualize in console (optional)
julia> using Metaheuristics
julia> function f(x) # objective functions v = 1.0 + sum(x .^ 2) @@ -106,7 +106,7 @@ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀f₁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ Function calls: 50100 Feasibles: 100 / 100 in final population - Total time: 3.3756 s + Total time: 3.2436 s Stop reason: Maximum objective function calls exceeded.

Bilevel Optimization

Bilevel optimization problems can be solved by using the package BilevelHeuristics.jl which extends Metaheuristics.jl for handling those hierarchical problems.

Defining objective functions corresponding to the BO problem.

Upper level (leader problem):

using BilevelHeuristics
 
 F(x, y) = sum(x.^2) + sum(y.^2)
@@ -145,7 +145,7 @@
   Minimum:         5.8527e-47
   Minimizer:       [1.6089e-47, 3.31929e-47, 3.04058e-24]
   Function calls:  15280
-  Total time:      0.1512 s
+  Total time:      0.1493 s
   Stop reason:     Due to Convergence Termination criterion.

Batch Evaluation

Evaluating multiple solutions at the same time can reduce computational time. To do that, define your function on an input N x D matrix and function values into matrices with outcomes in rows for all N solutions. Also, you need to put parallel_evaluation=true in the Options to indicate that your f is prepared for parallel evaluations.

f(X) = begin
     fx = sum(X.^2, dims=2)       # objective function ∑x²
     gx = sum(X.^2, dims=2) .-0.5 # inequality constraints ∑x² ≤ 0.5
@@ -206,4 +206,4 @@
 
 julia> optimize(f, bounds, Restart(ECA(), every=200))

Customization

The restart condition can be updated by overloading the restart_condition method:

function Metaheuristics.restart_condition(status, restart::Restart, information, options)
     st.iteration % params.every == 0
-end
source +endsource diff --git a/dev/faq/index.html b/dev/faq/index.html index 8304ecf4..b8dc6b75 100644 --- a/dev/faq/index.html +++ b/dev/faq/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-184071594-1', {'page_path': location.pathname + location.search + location.hash}); -

FAQ

Answers to Frequently Asked Questions:

How to solve combinatorial problems?

This package was initially developed for numerical optimization, but recent updates can handle combinatorial problems. The Genetic Algorithm framework (GA) can be used.

+

FAQ

Answers to Frequently Asked Questions:

How to solve combinatorial problems?

This package was initially developed for numerical optimization, but recent updates can handle combinatorial problems. The Genetic Algorithm framework (GA) can be used.

diff --git a/dev/index.html b/dev/index.html index b448da71..2400ea2f 100644 --- a/dev/index.html +++ b/dev/index.html @@ -11,7 +11,7 @@ Minimum: 0.994959 Minimizer: [-4.48345e-09, -9.30599e-10, 3.25831e-10, …, -0.994959] Function calls: 61810 - Total time: 0.2851 s + Total time: 0.3102 s Stop reason: Due to Convergence Termination criterion.

Optimize returns a State datatype which contains some information about the approximation. For instance, you may use mainly two functions to obtain such an approximation.

minimum(result)
0.9949590570932969
minimizer(result)
10-element Vector{Float64}:
@@ -34,4 +34,4 @@
   pages = {4723}, 
   author = {Jesús-Adolfo Mejía-de-Dios and Efrén Mezura-Montes}, 
   title = {Metaheuristics: A Julia Package for Single- and Multi-Objective Optimization}, 
- journal = {Journal of Open Source Software} }

or the citation string

Mejía-de-Dios et al., (2022). Metaheuristics: A Julia Package for Single- and Multi-Objective Optimization. Journal of Open Source Software, 7(78), 4723, https://doi.org/10.21105/joss.04723

in your scientific paper if you use Metaheristics.jl.

Acknowledgments

Jesús Mejía acknowledges support from the Mexican Council for Science and Technology (CONACyT) through a scholarship to pursue graduate studies at the University of Veracruz, MEXICO. This allowed the development of Metaheuristics.jl from August 2018 to July 2022.

+ journal = {Journal of Open Source Software} }

or the citation string

Mejía-de-Dios et al., (2022). Metaheuristics: A Julia Package for Single- and Multi-Objective Optimization. Journal of Open Source Software, 7(78), 4723, https://doi.org/10.21105/joss.04723

in your scientific paper if you use Metaheristics.jl.

Acknowledgments

Jesús Mejía acknowledges support from the Mexican Council for Science and Technology (CONACyT) through a scholarship to pursue graduate studies at the University of Veracruz, MEXICO. This allowed the development of Metaheuristics.jl from August 2018 to July 2022.

diff --git a/dev/indicators/index.html b/dev/indicators/index.html index 766563c9..ca54196d 100644 --- a/dev/indicators/index.html +++ b/dev/indicators/index.html @@ -45,7 +45,7 @@ f_1 julia> PerformanceIndicators.igd_plus(front, front) -0.0source

Generational Distance

Generational Distance in Julia

Metaheuristics.PerformanceIndicators.gdFunction
gd(front, true_pareto_front; p = 1)

Returns the Generational Distance.

Parameters

front and true_pareto_front can be:

  • N×m matrix where N is the number of points and m is the number of objectives.
  • State
  • Array{xFgh_indiv} (usually State.population)
source

Generational Distance Plus

Metaheuristics.PerformanceIndicators.gd_plusFunction
gd_plus(front, true_pareto_front; p = 1)

Returns the Generational Distance Plus.

Parameters

front and true_pareto_front can be:

  • N×m matrix where N is the number of points and m is the number of objectives.
  • State
  • Array{xFgh_indiv} (usually State.population)
source

Inverted Generational Distance

Inverted Generational Distance in Julia

Metaheuristics.PerformanceIndicators.igdFunction
igd(front, true_pareto_front; p = 1)

Returns the Inverted Generational Distance.

Parameters

front and true_pareto_front can be:

  • N×m matrix where N is the number of points and m is the number of objectives.
  • State
  • Array{xFgh_indiv} (usually State.population)
source

Inverted Generational Distance Plus

Metaheuristics.PerformanceIndicators.igd_plusFunction
igd_plus(front, true_pareto_front; p = 1)

Returns the Inverted Generational Distance Plus.

Parameters

front and true_pareto_front can be:

  • N×m matrix where N is the number of points and m is the number of objectives.
  • State
  • Array{xFgh_indiv} (usually State.population)
source

Spacing Indicator

Metaheuristics.PerformanceIndicators.spacingFunction
spacing(A)

Computes the Schott spacing indicator. spacing(A) == 0 means that vectors in A are uniformly distributed.

source

Covering Indicator ($C$-metric)

Metaheuristics.PerformanceIndicators.coveringFunction
covering(A, B)

Computes the covering indicator (percentage of vectors in B that are dominated by vectors in A) from two sets with non-dominated solutions.

A and B with size (n, m) where n is number of samples and m is the vector dimension.

Note that covering(A, B) == 1 means that all solutions in B are dominated by those in A. Moreover, covering(A, B) != covering(B, A) in general.

If A::State and B::State, then computes covering(A.population, B.population) after ignoring dominated solutions in each set.

source

Hypervolume

Hypervolume Indicator in Julia

Metaheuristics.PerformanceIndicators.hypervolumeFunction
hypervolume(front, reference_point)

Computes the hypervolume indicator, i.e., volume between points in front and reference_point.

Note that each point in front must (weakly) dominates to reference_point. Also, front is a non-dominated set.

If front::State and reference_point::Vector, then computes hypervolume(front.population, reference_point) after ignoring solutions in front that do not dominate reference_point.

source

Examples

Computing hypervolume indicator from vectors in a Matrix

julia> import Metaheuristics.PerformanceIndicators: hypervolume
julia> f1 = collect(0:10); # objective 1
julia> f2 = 10 .- collect(0:10); # objective 2
julia> front = [ f1 f2 ]11×2 Matrix{Int64}: +0.0
source

Generational Distance

Generational Distance in Julia

Metaheuristics.PerformanceIndicators.gdFunction
gd(front, true_pareto_front; p = 1)

Returns the Generational Distance.

Parameters

front and true_pareto_front can be:

  • N×m matrix where N is the number of points and m is the number of objectives.
  • State
  • Array{xFgh_indiv} (usually State.population)
source

Generational Distance Plus

Metaheuristics.PerformanceIndicators.gd_plusFunction
gd_plus(front, true_pareto_front; p = 1)

Returns the Generational Distance Plus.

Parameters

front and true_pareto_front can be:

  • N×m matrix where N is the number of points and m is the number of objectives.
  • State
  • Array{xFgh_indiv} (usually State.population)
source

Inverted Generational Distance

Inverted Generational Distance in Julia

Metaheuristics.PerformanceIndicators.igdFunction
igd(front, true_pareto_front; p = 1)

Returns the Inverted Generational Distance.

Parameters

front and true_pareto_front can be:

  • N×m matrix where N is the number of points and m is the number of objectives.
  • State
  • Array{xFgh_indiv} (usually State.population)
source

Inverted Generational Distance Plus

Metaheuristics.PerformanceIndicators.igd_plusFunction
igd_plus(front, true_pareto_front; p = 1)

Returns the Inverted Generational Distance Plus.

Parameters

front and true_pareto_front can be:

  • N×m matrix where N is the number of points and m is the number of objectives.
  • State
  • Array{xFgh_indiv} (usually State.population)
source

Spacing Indicator

Metaheuristics.PerformanceIndicators.spacingFunction
spacing(A)

Computes the Schott spacing indicator. spacing(A) == 0 means that vectors in A are uniformly distributed.

source

Covering Indicator ($C$-metric)

Metaheuristics.PerformanceIndicators.coveringFunction
covering(A, B)

Computes the covering indicator (percentage of vectors in B that are dominated by vectors in A) from two sets with non-dominated solutions.

A and B with size (n, m) where n is number of samples and m is the vector dimension.

Note that covering(A, B) == 1 means that all solutions in B are dominated by those in A. Moreover, covering(A, B) != covering(B, A) in general.

If A::State and B::State, then computes covering(A.population, B.population) after ignoring dominated solutions in each set.

source

Hypervolume

Hypervolume Indicator in Julia

Metaheuristics.PerformanceIndicators.hypervolumeFunction
hypervolume(front, reference_point)

Computes the hypervolume indicator, i.e., volume between points in front and reference_point.

Note that each point in front must (weakly) dominates to reference_point. Also, front is a non-dominated set.

If front::State and reference_point::Vector, then computes hypervolume(front.population, reference_point) after ignoring solutions in front that do not dominate reference_point.

source

Examples

Computing hypervolume indicator from vectors in a Matrix

julia> import Metaheuristics.PerformanceIndicators: hypervolume
julia> f1 = collect(0:10); # objective 1
julia> f2 = 10 .- collect(0:10); # objective 2
julia> front = [ f1 f2 ]11×2 Matrix{Int64}: 0 10 1 9 2 8 @@ -81,7 +81,7 @@ 1.5067041421979686 1.0034984531742384 1.0012049665804095
julia> hv = hypervolume(approx_front, reference_point)0.9147903170937487

$\Delta_p$ (Delta $p$)

Metaheuristics.PerformanceIndicators.deltapFunction
deltap(front, true_pareto_front; p = 1)
-Δₚ(front, true_pareto_front; p = 1)

Returns the averaged Hausdorff distance indicator aka Δₚ (Delta p).

"Δₚ" can be typed as \Delta<tab>\_p<tab>.

Parameters

front and true_pareto_front can be:

  • N×m matrix where N is the number of points and m is the number of objectives.
  • Array{xFgh_indiv} (usually State.population)
source

$\varepsilon$-Indicator

Unary and binary $\varepsilon$-indicator (epsilon-indicator). Details in [17]

Metaheuristics.PerformanceIndicators.epsilon_indicatorFunction
epsilon_indicator(A, B)

Computes the ε-indicator for non-dominated sets A and B. It is assumed that all values in A and B are positive. If negative, the sets are translated to positive values.

Interpretation

  • epsilon_indicator(A, PF) is unary if PF is the Pareto-optimal front.
  • epsilon_indicator(A, B) == 1 none is better than the other.
  • epsilon_indicator(A, B) < 1 means that A is better than B.
  • epsilon_indicator(A, B) > 1 means that B is better than A.
  • Values closer to 1 are preferable.

Examples

julia> A1 = [4 7;5 6;7 5; 8 4.0; 9 2];
+Δₚ(front, true_pareto_front; p = 1)

Returns the averaged Hausdorff distance indicator aka Δₚ (Delta p).

"Δₚ" can be typed as \Delta<tab>\_p<tab>.

Parameters

front and true_pareto_front can be:

  • N×m matrix where N is the number of points and m is the number of objectives.
  • Array{xFgh_indiv} (usually State.population)
source

$\varepsilon$-Indicator

Unary and binary $\varepsilon$-indicator (epsilon-indicator). Details in [17]

Metaheuristics.PerformanceIndicators.epsilon_indicatorFunction
epsilon_indicator(A, B)

Computes the ε-indicator for non-dominated sets A and B. It is assumed that all values in A and B are positive. If negative, the sets are translated to positive values.

Interpretation

  • epsilon_indicator(A, PF) is unary if PF is the Pareto-optimal front.
  • epsilon_indicator(A, B) == 1 none is better than the other.
  • epsilon_indicator(A, B) < 1 means that A is better than B.
  • epsilon_indicator(A, B) > 1 means that B is better than A.
  • Values closer to 1 are preferable.

Examples

julia> A1 = [4 7;5 6;7 5; 8 4.0; 9 2];
 
 julia> A2 = [4 7;5 6;7 5; 8 4.0];
 
@@ -98,4 +98,4 @@
 julia> res = optimize(f, bounds, NSGA2());
 
 julia> PerformanceIndicators.epsilon_indicator(res, pf)
-1.00497701620997
source
+1.00497701620997source diff --git a/dev/mcdm/index.html b/dev/mcdm/index.html index 64b9445e..02da4dae 100644 --- a/dev/mcdm/index.html +++ b/dev/mcdm/index.html @@ -3,12 +3,12 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-184071594-1', {'page_path': location.pathname + location.search + location.hash}); -

Multi-Criteria Decision-Making

A set of Multi-Criteria Decision Making (MCDM) methods is available in Metaheuristics.jl.

Maximization or Minimization

Here, minimization is always assumed.

Firstly, it is recommended to read the details of the following two functions.

Metaheuristics.decisionmakingFunction
decisionmaking(fs, w, method)

Perform selected method for a given fs and weight vector(s) and return the indices indicating the best alternative(s). Here, fs can be a set of non-dominated solutions (population) or a State.

source
Metaheuristics.best_alternativeFunction
best_alternative(res, w, method)

Perform McDM using results from metaheuristic and return best alternative in res.population.

Example

julia> f, bounds, _ = Metaheuristics.TestProblems.ZDT1();
+

Multi-Criteria Decision-Making

A set of Multi-Criteria Decision Making (MCDM) methods is available in Metaheuristics.jl.

Maximization or Minimization

Here, minimization is always assumed.

Firstly, it is recommended to read the details of the following two functions.

Metaheuristics.decisionmakingFunction
decisionmaking(fs, w, method)

Perform selected method for a given fs and weight vector(s) and return the indices indicating the best alternative(s). Here, fs can be a set of non-dominated solutions (population) or a State.

source
Metaheuristics.best_alternativeFunction
best_alternative(res, w, method)

Perform McDM using results from metaheuristic and return best alternative in res.population.

Example

julia> f, bounds, _ = Metaheuristics.TestProblems.ZDT1();
 
 julia> res = optimize(f, bounds, NSGA2());
 
 julia> best_sol = best_alternative(res, [0.5, 0.5], TopsisMethod())
-(f = [0.32301132058506055, 0.43208538139854685], g = [0.0], h = [0.0], x = [3.230e-01, 1.919e-04, …, 1.353e-04])
source
best_alternative(population, w, method)

Perform method and return the best alternative(s) in population.

source

Currently available methods are listed in the following table.

MethodStrategiesPreferencesDependency
CompromiseProgrammingSW/D
ROIArchivingMD
ArasMethodSWJMcDM
CocosoMethodSWJMcDM
CodasMethodSWJMcDM
CoprasMethodSWJMcDM
EdasMethodSWJMcDM
ElectreMethodMWJMcDM
GreyMethodSWJMcDM
MabacMethodSWJMcDM
MaircaMethodSWJMcDM
MooraMethodSWJMcDM
SawMethodSWJMcDM
TopsisMethodSWJMcDM
VikorMethodSWJMcDM
WPMMethodSWJMcDM
WaspasMethodSWJMcDM
MarcosMethodSWJMcDM
ROVMethodSWJMcDM

A Method can suggest Single (S) or Multiple (M) Strategies. Also, Methods can represent Preferences by using weight vectors (W), reference directions (D) or reference points (P).

JMcDM

JMcDM is a package for MCDM developed by [18]. Many methods have been implemented there, and many of them have been interfaced here.

The main method to use JMcDM within Metaheuristics is described as follows.

mcdm(data, w, method)

Perform selected method for a given data and weight vector w. Here, data can be a set of non-dominated solutions (population), a State or a decision Matrix.

Also, method can be selected from JMcDM package.

Supported MCDM methods:

  • ArasMethod
  • CocosoMethod
  • CodasMethod
  • CoprasMethod
  • EdasMethod
  • ElectreMethod
  • GreyMethod
  • MabacMethod
  • MaircaMethod
  • MooraMethod
  • SawMethod
  • TopsisMethod (default method)
  • VikorMethod
  • WPMMethod
  • WaspasMethod
  • MarcosMethod
  • ROVMethod

See the JMcDM documentation for more details about the methods.

Example 1:

Performing MCDM using a population.

julia> _, _, population = Metaheuristics.TestProblems.ZDT1();
+(f = [0.32301132058506055, 0.43208538139854685], g = [0.0], h = [0.0], x = [3.230e-01, 1.919e-04, …, 1.353e-04])
source
best_alternative(population, w, method)

Perform method and return the best alternative(s) in population.

source

Currently available methods are listed in the following table.

MethodStrategiesPreferencesDependency
CompromiseProgrammingSW/D
ROIArchivingMD
ArasMethodSWJMcDM
CocosoMethodSWJMcDM
CodasMethodSWJMcDM
CoprasMethodSWJMcDM
EdasMethodSWJMcDM
ElectreMethodMWJMcDM
GreyMethodSWJMcDM
MabacMethodSWJMcDM
MaircaMethodSWJMcDM
MooraMethodSWJMcDM
SawMethodSWJMcDM
TopsisMethodSWJMcDM
VikorMethodSWJMcDM
WPMMethodSWJMcDM
WaspasMethodSWJMcDM
MarcosMethodSWJMcDM
ROVMethodSWJMcDM

A Method can suggest Single (S) or Multiple (M) Strategies. Also, Methods can represent Preferences by using weight vectors (W), reference directions (D) or reference points (P).

JMcDM

JMcDM is a package for MCDM developed by [18]. Many methods have been implemented there, and many of them have been interfaced here.

The main method to use JMcDM within Metaheuristics is described as follows.

mcdm(data, w, method)

Perform selected method for a given data and weight vector w. Here, data can be a set of non-dominated solutions (population), a State or a decision Matrix.

Also, method can be selected from JMcDM package.

Supported MCDM methods:

  • ArasMethod
  • CocosoMethod
  • CodasMethod
  • CoprasMethod
  • EdasMethod
  • ElectreMethod
  • GreyMethod
  • MabacMethod
  • MaircaMethod
  • MooraMethod
  • SawMethod
  • TopsisMethod (default method)
  • VikorMethod
  • WPMMethod
  • WaspasMethod
  • MarcosMethod
  • ROVMethod

See the JMcDM documentation for more details about the methods.

Example 1:

Performing MCDM using a population.

julia> _, _, population = Metaheuristics.TestProblems.ZDT1();
 
 julia> dm = mcdm(population, [0.5, 0.5], TopsisMethod());
 
@@ -75,7 +75,7 @@
         0 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠒⠤⠄⣀│ 
           └────────────────────────────────────────┘ 
           ⠀0⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀1⠀ 
-          ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀f₁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ 
source

Compromise Programming

More information about Compromise Programming can be found in [20]

Metaheuristics.CompromiseProgrammingType
CompromiseProgramming(scalarizing)

Perform compromise programming by using the scalarizing function provided. Current implemented scalarizing function are

  • WeightedSum
  • Tchebysheff
  • AchievementScalarization.

Example

julia> f, bounds, pf = Metaheuristics.TestProblems.ZDT1();
+          ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀f₁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ 
source

Compromise Programming

More information about Compromise Programming can be found in [20]

Metaheuristics.CompromiseProgrammingType
CompromiseProgramming(scalarizing)

Perform compromise programming by using the scalarizing function provided. Current implemented scalarizing function are

  • WeightedSum
  • Tchebysheff
  • AchievementScalarization.

Example

julia> f, bounds, pf = Metaheuristics.TestProblems.ZDT1();
 
 julia> res = optimize(f, bounds, NSGA2());
 
@@ -91,4 +91,4 @@
 (f = [0.38493217206706115, 0.38037042164979956], g = [0.0], h = [0.0], x = [3.849e-01, 7.731e-06, …, 2.362e-07])
 
 julia> idx = decisionmaking(res, w, CompromiseProgramming(Tchebysheff()))
-3
source
+3source diff --git a/dev/problems/index.html b/dev/problems/index.html index 4ccee146..b3d94936 100644 --- a/dev/problems/index.html +++ b/dev/problems/index.html @@ -34,4 +34,4 @@ └────────────────────────────────────────┘ 0 0.9 f_1 -source

Box-constrained Optimization

Metaheuristics.TestProblems.sphereFunction
sphere(D)

The well-known D-dimensional Sphere function.

source
Metaheuristics.TestProblems.discusFunction
discus(D)

The well-known D-dimensional Discus function.

source
Metaheuristics.TestProblems.rastriginFunction
rastrigin(D)

The well-known D-dimensional Rastrigin function.

source

Constrained Optimization

Multi-objective Optimization

Metaheuristics.TestProblems.ZDT1Function
ZDT1(D, n_solutions)

ZDT1 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • D number of variables (dimension)
  • n_solutions number of pareto solutions.

Main properties:

  • convex
source
Metaheuristics.TestProblems.ZDT2Function
ZDT2(D, n_solutions)

ZDT2 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • D number of variables (dimension)
  • n_solutions number of pareto solutions.

Main properties:

  • nonconvex
source
Metaheuristics.TestProblems.ZDT3Function
ZDT3(D, n_solutions)

ZDT3 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • D number of variables (dimension)
  • n_solutions number of pareto solutions.

Main properties:

  • convex disconected
source
Metaheuristics.TestProblems.ZDT4Function
ZDT4(D, n_solutions)

ZDT4 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • D number of variables (dimension)
  • n_solutions number of pareto solutions.

Main properties:

  • nonconvex
source
Metaheuristics.TestProblems.ZDT6Function
ZDT6(D, n_solutions)

ZDT6 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • D number of variables (dimension)
  • n_solutions number of Pareto solutions.

Main properties:

  • nonconvex
  • non-uniformly spaced
source
Metaheuristics.TestProblems.DTLZ2Function
DTLZ2(m = 3, ref_dirs = gen_ref_dirs(m, 12))

DTLZ2 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • m number of objective functions
  • ref_dirs number of Pareto solutions (default: Das and Dennis' method).

Main properties:

  • nonconvex
  • unifrontal
source
+source

Box-constrained Optimization

Metaheuristics.TestProblems.sphereFunction
sphere(D)

The well-known D-dimensional Sphere function.

source
Metaheuristics.TestProblems.discusFunction
discus(D)

The well-known D-dimensional Discus function.

source
Metaheuristics.TestProblems.rastriginFunction
rastrigin(D)

The well-known D-dimensional Rastrigin function.

source

Constrained Optimization

Multi-objective Optimization

Metaheuristics.TestProblems.ZDT1Function
ZDT1(D, n_solutions)

ZDT1 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • D number of variables (dimension)
  • n_solutions number of pareto solutions.

Main properties:

  • convex
source
Metaheuristics.TestProblems.ZDT2Function
ZDT2(D, n_solutions)

ZDT2 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • D number of variables (dimension)
  • n_solutions number of pareto solutions.

Main properties:

  • nonconvex
source
Metaheuristics.TestProblems.ZDT3Function
ZDT3(D, n_solutions)

ZDT3 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • D number of variables (dimension)
  • n_solutions number of pareto solutions.

Main properties:

  • convex disconected
source
Metaheuristics.TestProblems.ZDT4Function
ZDT4(D, n_solutions)

ZDT4 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • D number of variables (dimension)
  • n_solutions number of pareto solutions.

Main properties:

  • nonconvex
source
Metaheuristics.TestProblems.ZDT6Function
ZDT6(D, n_solutions)

ZDT6 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • D number of variables (dimension)
  • n_solutions number of Pareto solutions.

Main properties:

  • nonconvex
  • non-uniformly spaced
source
Metaheuristics.TestProblems.DTLZ2Function
DTLZ2(m = 3, ref_dirs = gen_ref_dirs(m, 12))

DTLZ2 returns (f::function, bounds::Matrix{Float64}, pareto_set::Array{xFgh_indiv}) where f is the objective function and pareto_set is an array with optimal Pareto solutions with n_solutions.

Parameters

  • m number of objective functions
  • ref_dirs number of Pareto solutions (default: Das and Dennis' method).

Main properties:

  • nonconvex
  • unifrontal
source
diff --git a/dev/references/index.html b/dev/references/index.html index e0375582..d081871e 100644 --- a/dev/references/index.html +++ b/dev/references/index.html @@ -64,4 +64,4 @@
- + diff --git a/dev/search/index.html b/dev/search/index.html index 5bb33162..afc2bd46 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-184071594-1', {'page_path': location.pathname + location.search + location.hash}); -

Loading search...

    +

    Loading search...

      diff --git a/dev/tutorials/create-metaheuristic/index.html b/dev/tutorials/create-metaheuristic/index.html index f0ad0e83..746361b8 100644 --- a/dev/tutorials/create-metaheuristic/index.html +++ b/dev/tutorials/create-metaheuristic/index.html @@ -166,4 +166,4 @@ minimizer: [6.98505513305995e-6, -1.1651666613615994e-5, -4.343967193003195e-6, 3.567365134464557e-5, 1.3393840640183734e-5, 5.591802709915942e-5, -1.477407456986382e-5, 6.325103756718973e-6, 1.9153467328726614e-5, 4.132106648380982e-5] f calls: 50000 total time: 1.3685 s -+============================+

      See optimize for more information.

      Exercises

      1. Test your algorithm on a multi-objective optimization problem. Suggestion: change rastrigin by ZDT1.
      2. Implement an interest metaheuristic and make a PR to the Metaheuristics.jl repo on the Github.
      ++============================+

      See optimize for more information.

      Exercises

      1. Test your algorithm on a multi-objective optimization problem. Suggestion: change rastrigin by ZDT1.
      2. Implement an interest metaheuristic and make a PR to the Metaheuristics.jl repo on the Github.
      diff --git a/dev/tutorials/n-queens/index.html b/dev/tutorials/n-queens/index.html index f45903e2..70ba940c 100644 --- a/dev/tutorials/n-queens/index.html +++ b/dev/tutorials/n-queens/index.html @@ -26,7 +26,7 @@ Minimum: 0 Minimizer: [5, 7, 1, …, 3] Function calls: 2000 - Total time: 0.0054 s + Total time: 0.0174 s Stop reason: Due to Convergence Termination criterion.

      It can be observed that the number of attacks is:

      n_attacks = minimum(result)
      0.0

      The optimal permutation is:

      perm = minimizer(result)
      8-element Vector{Int64}:
      @@ -90,4 +90,4 @@
        0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0
        0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0
        0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0
      - 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  0
      + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 diff --git a/dev/tutorials/parallelization/index.html b/dev/tutorials/parallelization/index.html index 167e4bc6..fb7a5d7b 100644 --- a/dev/tutorials/parallelization/index.html +++ b/dev/tutorials/parallelization/index.html @@ -115,4 +115,4 @@ feasibles: 100 / 100 in final population total time: 1.8363 s stop reason: Maximum objective function calls exceeded. -+============================+

      Distributed

      Contributions are welcome. See "Contributing" for more details.

      ++============================+

      Distributed

      Contributions are welcome. See "Contributing" for more details.

      diff --git a/dev/tutorials/simple-tutorial/index.html b/dev/tutorials/simple-tutorial/index.html index 57660a99..94cc4a76 100644 --- a/dev/tutorials/simple-tutorial/index.html +++ b/dev/tutorials/simple-tutorial/index.html @@ -17,7 +17,7 @@ Minimum: 6.96471 Minimizer: [7.18572e-11, 3.85002e-09, 1.29255e-09, …, -4.24857e-09] Function calls: 90020 - Total time: 0.3103 s + Total time: 0.3497 s Stop reason: Maximum objective function calls exceeded.

      Get the Results

      Once optimize stops, we can get the approximate solutions.

      Approximated minimum:

      fx = minimum(result)
      6.964708361833942

      Approximated minimizer:

      x = minimizer(result)
      10-element Vector{Float64}:
      @@ -57,4 +57,4 @@ 

      x, fx end -main()

      ([-4.2252467672932e-9, 2.9293550189813002e-9, -2.5176897397499105e-9, 5.633829934502006e-10, -2.893388148458334e-9, 3.6933660066302294e-9, -9.713322866297521e-10, 0.9949586364866625, -3.479911930464337e-9, -2.4024014222661465e-9], 0.9949590570932969)

      Summary

      Now you are able to approximate global optimum solutions using Metaheuristics.

      +main()
      ([-4.2252467672932e-9, 2.9293550189813002e-9, -2.5176897397499105e-9, 5.633829934502006e-10, -2.893388148458334e-9, 3.6933660066302294e-9, -9.713322866297521e-10, 0.9949586364866625, -3.479911930464337e-9, -2.4024014222661465e-9], 0.9949590570932969)

      Summary

      Now you are able to approximate global optimum solutions using Metaheuristics.

      diff --git a/dev/visualization/index.html b/dev/visualization/index.html index 927ba868..97215b6a 100644 --- a/dev/visualization/index.html +++ b/dev/visualization/index.html @@ -212,4 +212,4 @@ end result = optimize(f, bounds, NSGA2(options=Options(seed=0)), logger=logger) - +