Skip to content

Commit

Permalink
Merge pull request #564 from SciML/Vaibhavdixit02-patch-1
Browse files Browse the repository at this point in the history
Fix docstring refrences optfun and optprob
  • Loading branch information
Vaibhavdixit02 authored Dec 20, 2023
2 parents 0d26722 + c0a239c commit 7337534
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 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.11.1"
version = "2.11.2"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
4 changes: 2 additions & 2 deletions src/problems/basic_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ are the lower and upper bounds for `cons[i]`.
The `f` in the `OptimizationProblem` should typically be an instance of [`OptimizationFunction`](@ref)
to specify the objective function and its derivatives either by passing
predefined functions for them or automatically generated using the [`ADType`](@ref).
predefined functions for them or automatically generated using the [ADType](https://github.com/SciML/ADTypes.jl).
If `f` is a standard Julia function, it is automatically transformed into an
`OptimizationFunction` with `NoAD()`, meaning the derivative functions are not
Expand All @@ -639,7 +639,7 @@ Any extra keyword arguments are captured to be sent to the optimizers.
## Inequality and Equality Constraints
Both inequality and equality constraints are defined by the `f.cons` function in the [`OptimizationFunction`](@ref)
Both inequality and equality constraints are defined by the `f.cons` function in the [`OptimizationFunction`](https://docs.sciml.ai/Optimization/stable/API/optimization_function/#optfunction)
description of the problem structure. This `f.cons` is given as a function `f.cons(u,p)` which computes
the value of the constraints at `u`. For example, take `f.cons(u,p) = u[1] - u[2]`.
With these definitions, `lcons` and `ucons` define the bounds on the constraint that the solvers try to satisfy.
Expand Down
8 changes: 4 additions & 4 deletions src/scimlfunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1988,8 +1988,8 @@ the objective, even if no such parameters are used in the objective it should be
any additional arguments that are relevant to the objective function, for example minibatches used in machine learning,
take a look at the minibatching tutorial [here](https://docs.sciml.ai/Optimization/stable/tutorials/minibatch/). This should return
a scalar, the loss value, as the first return output and if any additional outputs are returned, they will be passed to the `callback`
function described in [Callback Functions](@ref).
- `adtype`: see the section [Defining Optimization Functions via AD](@ref)
function described in [Callback Functions](https://docs.sciml.ai/Optimization/stable/API/solve/#Common-Solver-Options-(Solve-Keyword-Arguments)).
- `adtype`: see the Defining Optimization Functions via AD section below.
## Keyword Arguments
Expand Down Expand Up @@ -2034,7 +2034,7 @@ function described in [Callback Functions](@ref).
- `cons_hess_colorvec`: an array of color vector according to the SparseDiffTools.jl definition for
the sparsity pattern of the `cons_hess_prototype`.
When [Symbolic Problem Building with ModelingToolkit](@ref) interface is used the following arguments are also relevant:
When [Symbolic Problem Building with ModelingToolkit](https://docs.sciml.ai/Optimization/stable/tutorials/symbolic/) interface is used the following arguments are also relevant:
- `syms`: the symbol names for the elements of the equation. This should match `u0` in size. For
example, if `u = [0.0,1.0]` and `syms = [:x, :y]`, this will apply a canonical naming to the
Expand Down Expand Up @@ -4234,4 +4234,4 @@ function SymbolicIndexingInterface.observed(fn::AbstractSciMLFunction, sym::Symb
return SymbolicIndexingInterface.observed(fn, getproperty(fn.sys, sym))
end

SymbolicIndexingInterface.constant_structure(::AbstractSciMLFunction) = true
SymbolicIndexingInterface.constant_structure(::AbstractSciMLFunction) = true

0 comments on commit 7337534

Please sign in to comment.