From 220598c70318a9476df964a45b0aeecefe4d16a1 Mon Sep 17 00:00:00 2001 From: Mohamed Tarek Date: Thu, 16 Nov 2023 02:13:03 +0200 Subject: [PATCH] formatting --- src/NonconvexNOMAD.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/NonconvexNOMAD.jl b/src/NonconvexNOMAD.jl index 0c4d0a4..60279af 100644 --- a/src/NonconvexNOMAD.jl +++ b/src/NonconvexNOMAD.jl @@ -14,7 +14,7 @@ struct NOMADAlg <: AbstractOptimizer end NOMADAlg() = NOMADAlg(:explicit) # :progressive, :custom -struct NOMADOptions{N <: NamedTuple} +struct NOMADOptions{N<:NamedTuple} nt::N end @@ -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 @@ -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 @@ -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