Skip to content

Commit

Permalink
Merge pull request #768 from SciML/Vaibhavdixit02-patch-1
Browse files Browse the repository at this point in the history
Add more traits for Optimization solvers
  • Loading branch information
Vaibhavdixit02 authored Aug 22, 2024
2 parents 5b94659 + 5bf45fa commit 32f5308
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SciMLBase"
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
authors = ["Chris Rackauckas <[email protected]> and contributors"]
version = "2.50.1"
version = "2.50.2"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
61 changes: 59 additions & 2 deletions src/alg_traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ Defaults to false.
"""
requiresgradient(opt) = false

"""
allowsfg(opt)
Trait declaration for whether an optimizer
allows combined function and gradient evaluation
in `instantiate_function`.
Defaults to false.
"""
allowsfg(opt) = false

"""
requireshessian(opt)
Expand All @@ -146,26 +157,72 @@ Defaults to false.
"""
requireshessian(opt) = false

"""
allowsfgh(opt)
Trait declaration for whether an optimizer
allows combined function, gradient, and hessian
evaluation in `instantiate_function`.
Defaults to false.
"""
allowsfgh(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.
requires `cons_j` in `instantiate_function`, that is,
does the optimizer require a constraints' Jacobian.
Defaults to false.
"""
requiresconsjac(opt) = false

"""
allowsconsjvp(opt)
Trait declaration for whether an optimizer
allows constraint's jacobian vector product
in `instantiate_function`.
Defaults to false.
"""
allowsconsjvp(opt) = false

"""
allowsconsvjp(opt)
Trait declaration for whether an optimizer
allows constraint's vector jacobian product
in `instantiate_function`.
Defaults to false.
"""
allowsconsvjp(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.
requires cons_h in `instantiate_function`, that is,
does the optimizer require constraints' hessian.
Defaults to false.
"""
requiresconshess(opt) = false

"""
requireslagh(opt)
Trait declaration for whether an optimizer
requires lag_h in `instantiate_function`, that is,
does the optimizer require lagrangian hessian.
Defaults to false.
"""
requireslagh(opt) = false

"""
allowscallback(opt)
Expand Down

0 comments on commit 32f5308

Please sign in to comment.