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] 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)