Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed82008 committed Nov 16, 2023
1 parent 9e56ce2 commit 220598c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/NonconvexNOMAD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct NOMADAlg <: AbstractOptimizer
end
NOMADAlg() = NOMADAlg(:explicit) # :progressive, :custom

struct NOMADOptions{N <: NamedTuple}
struct NOMADOptions{N<:NamedTuple}
nt::N
end

Expand Down Expand Up @@ -51,7 +51,8 @@ function NOMADOptions(;
)
end

mutable struct NOMADWorkspace{M <: VecModel, X <: AbstractVector, O <: NOMADOptions, A <: NOMADAlg} <: Workspace
mutable struct NOMADWorkspace{M<:VecModel,X<:AbstractVector,O<:NOMADOptions,A<:NOMADAlg} <:
Workspace
model::M
x0::X
options::O
Expand All @@ -66,7 +67,7 @@ function NOMADWorkspace(
)
return NOMADWorkspace(model, copy(x0), options, optimizer)
end
struct NOMADResult{M1, M2, R, A, O} <: AbstractResult
struct NOMADResult{M1,M2,R,A,O} <: AbstractResult
minimizer::M1
minimum::M2
result::R
Expand Down Expand Up @@ -172,7 +173,7 @@ function optimize!(workspace::NOMADWorkspace)
x -> begin
try
if length(model.ineq_constraints.fs) > 0
out = [finite_or_inf(obj(x)); finite_or_inf.(model.ineq_constraints(x))]
out = [finite_or_inf(obj(x)) finite_or_inf.(model.ineq_constraints(x))]
else
out = [finite_or_inf(obj(x))]
end
Expand Down

0 comments on commit 220598c

Please sign in to comment.