Internal API

These functions and types are for internal usage and should generally not be accessed during normal use of the package. This will likely be useful if implementing an extension to the package.

Fully documenting every function is currently ongoing. Please raise an issue if information is missing.

Core

Missing docstring.

Missing docstring for DirectSearch.OptimizationStatus. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.EvaluateInitialPoint. Check Documenter's build log for details.

DirectSearch.EvaluatePoint! — Function
EvaluatePoint!(p::DSProblem{T}, trial_points)::IterationOutcome where T

Determine whether the set of trial points result in a dominating, improving, or unsuccesful algorithm iteration. Update the feasible and infeasible incumbent points of p.

source
DirectSearch.function_evaluation — Method
function_evaluation(p::DSProblem{T}, trial_points::Vector{Vector{T}})::Vector{T} where T

Calculate the cost of the points in trial_points and return as a vector.

If the number of available workers is greater than one, and the maxsimultaniousevaluations value of p is greater than one then the calculation is distributed across several cores.

Currently, this has significant overheads and is much slower than evaluating in a single threaded manner on all testcases. This may give performance benefits when f is a heavy, single threaded operation.

If a specialised way of calling the function is needed then this function should be overriden, e.g.:

function DS.function_evaluation(p::DS.DSProblem{T}, trial_points::Vector{Vector{T}}) where T
	println("I am overriden")	
	return map(p.objective, trial_points)
end
source
DirectSearch.function_evaluation — Method
function_evaluation(p::DSProblem{T}, trial_point::Vector{T})::T where T

Evaluate a single trial point with the objective function of p.

By default calls the function with the trial point and returns the result. Override to provide custom evaluation behaviour.

source
Missing docstring.

Missing docstring for DirectSearch.MeshUpdate!(::DSProblem, ::DirectSearch.IterationOutcome). Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.GetMeshSize. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.min_mesh_size(::DSProblem{Float64}). Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.min_mesh_size(::DSProblem{T}) where T. Check Documenter's build log for details.

DirectSearch.AbstractMesh — Type
abstract type AbstractMesh end

Parent type of any struct implementing the construction of a mesh. To maintain compatibility with other aspects of the package, the naming convention for variables within structs must be followed. These respect the notation used within Audet & Dennis 2006.

source
Missing docstring.

Missing docstring for DirectSearch.Mesh. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.AbstractProblem. Check Documenter's build log for details.

Constraints

Missing docstring.

Missing docstring for DirectSearch.AbstractConstraint. Check Documenter's build log for details.

DirectSearch.ConstraintOutcome — Type
@enum ConstraintOutcome

Has the values Feasible, WeakInfeasible, or StrongInfeasible to classify the outcome of the constraint evaluations of a single point.

A Feasible point meets the requirement of all constraints with no relaxation.

A WeakInfeasible outcome has at least one relaxable constraint violated but no unrelaxable constraints violated.

A StrongInfeasible outcome indicates at least one unrelaxable constraint has been violated or the relaxable constraint violation is reater than hmax.

source
DirectSearch.ConstraintCollection — Type
ConstraintCollection{T,C}(h_max::T, 
                          h_max_update::Function, 
                          aggregator::Function
                         ) where {T,C<:AbstractConstraint}

Contains multiple constraints of the same type that have the same settings applied to them.

h_max is the initial hmax value. h_max_update is a function that should update h_max given an IterationOutcome value. aggregator is a function that will bring all constraint violations of a collection into a single h result.

Defaults for each of these values are set in the AddProgressiveCollection and AddExtremeCollection functions.

source
Missing docstring.

Missing docstring for DirectSearch.h_max_update. Check Documenter's build log for details.

DirectSearch.ProgressiveConstraint — Type
ProgressiveConstraint(f::Function)

Create a progressive barrier constraint.

Argument f is a function that should take a single vector argument and return a value that gives the amount the constraint function has been violated.

A value greater than 0 indicates the function has been violated, 0 shows that the input lies on the constraint, and negative numbers show a feasible value.

Negative numbers may be truncated to 0 without affecting the algorithm.

source
DirectSearch.ExtremeConstraint — Type
ExtremeConstraint(f::Function)

Create an extreme barrier constraint. Function f should take a vector argument and return true or false to indicate if the vector meets the constraint.

source
DirectSearch.Constraints — Type
Constraints{T}() where T

Create an object that constains multiple ConstraintCollection objects and their corresponding ConstraintCache.

Upon creation Constraints is automaticvally populated with two constraint collections, an ExtremeCollection and a ProgressiveCollection.

source
DirectSearch.CollectionTypeCount — Function
CollectionTypeCount(c::Constraints{T}, C::AbstractConstraint)::Int where T

Return the total number of constraints of type C that are stored in all collections.

source
Missing docstring.

Missing docstring for DirectSearch.ConstraintUpdate!. Check Documenter's build log for details.

DirectSearch.ConstraintEvaluation — Function
ConstraintEvaluation(constraints::Constraints{T}, p::Vector{T})::Tuple{ConstraintOutcome,T} where T

Evaluate point p over all constraint collections in constraints. Returns a ConstraintOutcome indicating the result of the evaluation:

Feasible: p evaluated as feasible for all constraints (extreme and progressive barrier)

WeakInfeasible: p evaluated as feasible for all extreme barrier constraints, and had no progressive barrier constraint violations greater than h_max

StrongInfeasible: At least one extreme barrier constraint evaluated as infeasible, or at least one progressive barrier constraint had a violation greater than h_max

The second returned value is the sum of h_max values evaluated during the constraint checks.

source
Missing docstring.

Missing docstring for DirectSearch.GetHmaxSum. Check Documenter's build log for details.

DirectSearch.ConstraintCollectionEvaluation — Method
ConstraintCollectionEvaluation(collection::ConstraintCollection{T,ProgressiveConstraint}, 
                               x::Vector{T})::ConstraintOutcome where T

Evalute every constraint within progressive constraint collection collection for point x.

If the aggregate value of the constraint evaluations exceeds the collection's h_max then a StrongInfeasible is returned. If the value is less than or equal to 0.0 then Feasible is returned. Otherwise WeakInfeasible is returned.

source
DirectSearch.ConstraintCollectionEvaluation — Method
ConstraintCollectionEvaluation(collection::ConstraintCollection{T,ExtremeConstraint}, 
                               x::Vector{T})::ConstraintOutcome where T

Evalute every constraint within extreme constraint collection collection for point x.

If any constraint returns false or a value greater than 0 then a StrongInfeasible result is returned. Otherwise a Feasible result is returned.

source

Poll

DirectSearch.Poll — Function
Poll(p::DSProblem{T})::IterationOutcome where T

Generate points and call evaluate on them.

source
DirectSearch.AbstractPoll — Type
abstract type AbstractPollDirectionGenerator end

Parent type for any type used for implementing a direction generator.

Generally any direction generators should return vectors with unit length of one

source
DirectSearch.GeneratePollPoints — Function
GeneratePollPoints(p::DSProblem{T}, ::AbstractMesh)::Vector{Vector{T}} where T

Generate a set of directions with the configured polling algorithm, then return the set of points these directions give from the incumbent points.

source
DirectSearch.GenerateDirections — Method
GenerateDirections(p::DSProblem{T}, DG::LTMADS{T})::Vector{Vector{T}}

Generates columns and forms a basis matrix for direction generation.

source
GenerateDirections(p::DSProblem{T}, DG::LTMADS{T})::Vector{Vector{T}}

Generates columns and forms a basis matrix for direction generation.

source

Search

Missing docstring.

Missing docstring for DirectSearch.Search. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.AbstractSearch. Check Documenter's build log for details.

DirectSearch.GenerateSearchPoints — Method
GenerateSearchPoints(p::DSProblem{T}, ::RandomSearch)::Vector{Vector{T}} where T

Finds points that are Δᵐ distance from any point in the mesh in a uniformly random direction.

source

LTMADS

DirectSearch.MeshUpdate! — Method
MeshUpdate!(mesh::Mesh, improvement_found::Bool)

Implements LTMADS update rule from Audet & Dennis 2006 pg. 203 adapted for progressive barrier constraints with Audet & Dennis 2009 expression 2.4.

source
DirectSearch.GenerateDirections — Method
GenerateDirections(p::DSProblem{T}, DG::LTMADS{T})::Vector{Vector{T}}

Generates columns and forms a basis matrix for direction generation.

source
Missing docstring.

Missing docstring for DirectSearch.form_basis_matrix. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.LT_basis_generation. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.B′_generation. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.b_l_generation. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.L_generation. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.B_generation. Check Documenter's build log for details.

OrthoMADS

DirectSearch.GenerateDirections — Method
GenerateDirections(p::DSProblem{T}, DG::LTMADS{T})::Vector{Vector{T}}

Generates columns and forms a basis matrix for direction generation.

source
Missing docstring.

Missing docstring for DirectSearch.GenerateDirections(::Int64, ::OrthoMADS). Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.GenerateOMBasis. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.Halton. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.HaltonEntry. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.HaltonCoefficient. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.AdjustedHalton. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.AdjustedHaltonFamily. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.bad_argmax. Check Documenter's build log for details.

Missing docstring.

Missing docstring for DirectSearch.HouseholderTransform. Check Documenter's build log for details.

Cache

Missing docstring.

Missing docstring for DirectSearch.AbstractCache. Check Documenter's build log for details.

DirectSearch.PointCache — Type
PointCache{T} <: AbstractCache

An abstract cache subtype that contains a dictionary of points/costs and a vector that stores the order of incumbent points.

source
DirectSearch.CachePush — Method
CachePush(p::AbstractProblem)

Add the feasible and infeasible incumbent points (assuming neither are nothing) to the cache.

source
DirectSearch.CacheQuery — Method
CacheQuery(p::AbstractProblem, x::Vector)

Query the cache of p to find if it has a cost value for point x. Alias to haskey.

source
DirectSearch.CacheGet — Method
CacheGet(p::AbstractProblem, x::Vector)

Return the cost of point x in the cache of p. Does not check if x is in the cache, use CacheQuery to check.

source
DirectSearch.CacheRandomSample — Method
CacheRandomSample(p::AbstractProblem, n::Int)

Returns a uniformly sampled collection of n points from the cache. Points can be repeated in the sample.

source
DirectSearch.CacheGetRange — Method
CacheGetRange(p::AbstractProblem, points::Vector)::Vector{Vector}

Return a vector of costs corresponding to the vector of points.

source
DirectSearch.CacheFilter — Method
CacheFilter(p::AbstractProblem{T}, points::Vector{T})::Tuple{Vector{Vector{T}},Vector{Vector{T}}} where T

Return a tuple where the first entry is the set of input points in the cache and the second is the set of input points not in the cache.

source