From 35027af0d37e2e43599e195dc0972fc16ec7c8fa Mon Sep 17 00:00:00 2001 From: Azzaare Date: Thu, 30 May 2024 15:39:29 +0900 Subject: [PATCH] spelling --- src/LocalSearchSolvers.jl | 2 +- src/model.jl | 2 +- src/solver.jl | 2 +- src/strategies/restart.jl | 6 +++--- src/variable.jl | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/LocalSearchSolvers.jl b/src/LocalSearchSolvers.jl index 9214b99..6ae8493 100644 --- a/src/LocalSearchSolvers.jl +++ b/src/LocalSearchSolvers.jl @@ -52,7 +52,7 @@ include("strategies/objective.jl") include("strategies/parallel.jl") include("strategies/perturbation.jl") include("strategies/portfolio.jl") -include("strategies/tabu.jl") # preceed restart.jl +include("strategies/tabu.jl") # precede restart.jl include("strategies/restart.jl") include("strategies/selection.jl") include("strategies/solution.jl") diff --git a/src/model.jl b/src/model.jl index de39ddd..9244ab6 100644 --- a/src/model.jl +++ b/src/model.jl @@ -51,7 +51,7 @@ end model() Construct a _Model, empty by default. It is recommended to add the constraints, variables, and objectives from an empty _Model. The following keyword arguments are available, - `vars=Dictionary{Int,Variable}()`: collection of variables -- `cons=Dictionary{Int,Constraint}()`: collection of cosntraints +- `cons=Dictionary{Int,Constraint}()`: collection of constraints - `objs=Dictionary{Int,Objective}()`: collection of objectives - `kind=:generic`: the kind of problem modeled (useful for specialized methods such as pretty printing) """ diff --git a/src/solver.jl b/src/solver.jl index 5835780..312d416 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -449,7 +449,7 @@ remote_stop!(::AbstractSolver) = nothing """ post_process(s::MainSolver) -Launch a serie of tasks to round-up a solving run, for instance, export a run's info. +Launch a series of tasks to round-up a solving run, for instance, export a run's info. """ post_process(::AbstractSolver) = nothing diff --git a/src/strategies/restart.jl b/src/strategies/restart.jl index 4f8c16e..d206f38 100644 --- a/src/strategies/restart.jl +++ b/src/strategies/restart.jl @@ -21,9 +21,9 @@ mutable struct TabuRestart <: RestartStrategy reset_percentage::Float64 end -function restart(tabu_strat, ::Val{:tabu}; rp = 1.0, index = 1) - limit = tenure(tabu_strat, :tabu) - tenure(tabu_strat, :pick) - return TabuRestart(index, tenure(tabu_strat, :tabu), limit, rp) +function restart(strategy, ::Val{:tabu}; rp = 1.0, index = 1) + limit = tenure(strategy, :tabu) - tenure(strategy, :pick) + return TabuRestart(index, tenure(strategy, :tabu), limit, rp) end function check_restart!(rs::TabuRestart; tabu_length) diff --git a/src/variable.jl b/src/variable.jl index 5f39107..fcdab2e 100644 --- a/src/variable.jl +++ b/src/variable.jl @@ -33,13 +33,13 @@ _get_constraints(x::Variable) = x.constraints """ _add_to_constraint!(x::Variable, id) -Add a constraint `id` to the list of contraints of `x`. +Add a constraint `id` to the list of constraints of `x`. """ _add_to_constraint!(x::Variable, id) = set!(_get_constraints(x), id) """ _delete_from_constraint!(x::Variable, id) -Delete a constraint `id` from the list of contraints of `x`. +Delete a constraint `id` from the list of constraints of `x`. """ _delete_from_constraint!(x::Variable, id) = delete!(x.constraints, id)