From 4b63e9fbd68104d535da072deff1aa2bbea4341a Mon Sep 17 00:00:00 2001 From: Paras Puneet Singh <136245940+ParasPuneetSingh@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:03:22 +0530 Subject: [PATCH 1/3] Update alg_traits.jl --- src/alg_traits.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/alg_traits.jl b/src/alg_traits.jl index afea70fbe..d79d0f97d 100644 --- a/src/alg_traits.jl +++ b/src/alg_traits.jl @@ -118,6 +118,17 @@ Defaults to false. """ requiresconstraints(opt) = false +""" +requiresderivative(opt) + +Trait declaration for whether an optimizer +requires derivatives specified in +`cons` in `OptimizationProblem`. + +Defaults to false. +""" +requiresderivative(opt) = false + """ allowscallback(opt) From 940837bf021cc68bdf2c6eb9a35d524599e75efb Mon Sep 17 00:00:00 2001 From: Paras Puneet Singh <136245940+ParasPuneetSingh@users.noreply.github.com> Date: Sat, 9 Mar 2024 01:38:29 +0530 Subject: [PATCH 2/3] Update alg_traits.jl Added traits requiresgradient, requireshessian, requiresconsjac, and requiresconshess to alg_traits.jl --- src/alg_traits.jl | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/alg_traits.jl b/src/alg_traits.jl index d79d0f97d..5c444ce36 100644 --- a/src/alg_traits.jl +++ b/src/alg_traits.jl @@ -129,6 +129,46 @@ Defaults to false. """ requiresderivative(opt) = false +""" +requiresgradient(opt) + +Trait declaration for whether an optimizer +requires gradient in `instantiate_function`. + +Defaults to false. +""" +requiresgradient(opt) = false + +""" +requireshessian(opt) + +Trait declaration for whether an optimizer +requires hessian in `instantiate_function`. + +Defaults to false. +""" +requireshessian(opt) = false + +""" +requiresconsjac(opt) + +Trait declaration for whether an optimizer +requires cons_j in `instantiate_function`, that is, does the optimizer require a constant Jacobian. + +Defaults to false. +""" +requiresconsjac(opt) = false + +""" +requiresconshess(opt) + +Trait declaration for whether an optimizer +requires cons_h in `instantiate_function`, that is, does the optimizer require a constant hessian. + +Defaults to false. +""" +requiresconshess(opt) = false + """ allowscallback(opt) From 9fbff3214c128d8b64cd99bc9e6cebae9f08c405 Mon Sep 17 00:00:00 2001 From: Paras Puneet Singh <136245940+ParasPuneetSingh@users.noreply.github.com> Date: Sat, 9 Mar 2024 23:28:54 +0530 Subject: [PATCH 3/3] Update alg_traits.jl Removed requiresderivative as it was redundant and replaced by requiresgradient. --- src/alg_traits.jl | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/alg_traits.jl b/src/alg_traits.jl index 5c444ce36..3b308b49a 100644 --- a/src/alg_traits.jl +++ b/src/alg_traits.jl @@ -118,17 +118,6 @@ Defaults to false. """ requiresconstraints(opt) = false -""" -requiresderivative(opt) - -Trait declaration for whether an optimizer -requires derivatives specified in -`cons` in `OptimizationProblem`. - -Defaults to false. -""" -requiresderivative(opt) = false - """ requiresgradient(opt)