Skip to content

Commit 105a420

Browse files
committed
add SII
1 parent 41418ed commit 105a420

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

Project.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
8686
Lux = "b2108857-7c20-44ae-9111-449ecde12c47"
8787
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
8888
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
89+
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
8990
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
90-
OptimizationLBFGSB = "22f7324a-a79d-40f2-bebe-3af60c77bd15"
9191
Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2"
92+
OptimizationLBFGSB = "22f7324a-a79d-40f2-bebe-3af60c77bd15"
9293
OptimizationMOI = "fd9f6733-72f4-499f-8506-86b2bdd0dea1"
9394
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
9495
OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1"
@@ -103,10 +104,6 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
103104
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
104105
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
105106
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
106-
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
107107

108108
[targets]
109-
test = ["Aqua", "BenchmarkTools", "Boltz", "ComponentArrays", "DiffEqFlux", "Enzyme", "FiniteDiff", "Flux", "ForwardDiff",
110-
"Ipopt", "IterTools", "Lux", "MLUtils", "ModelingToolkit", "Optim", "OptimizationLBFGSB", "OptimizationMOI", "OptimizationOptimJL", "OptimizationOptimisers",
111-
"OrdinaryDiffEqTsit5", "Pkg", "Random", "ReverseDiff", "SafeTestsets", "SciMLSensitivity", "SparseArrays",
112-
"Symbolics", "Test", "Tracker", "Zygote", "Mooncake"]
109+
test = ["Aqua", "BenchmarkTools", "Boltz", "ComponentArrays", "DiffEqFlux", "Enzyme", "FiniteDiff", "Flux", "ForwardDiff", "Ipopt", "IterTools", "Lux", "MLUtils", "ModelingToolkit", "Optim", "OptimizationLBFGSB", "OptimizationMOI", "OptimizationOptimJL", "OptimizationOptimisers", "OrdinaryDiffEqTsit5", "Pkg", "Random", "ReverseDiff", "SafeTestsets", "SciMLSensitivity", "SparseArrays", "Symbolics", "Test", "Tracker", "Zygote", "Mooncake"]

lib/OptimizationBase/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "OptimizationBase"
22
uuid = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
3-
authors = ["Vaibhav Dixit <[email protected]> and contributors"]
43
version = "4.0.1"
4+
authors = ["Vaibhav Dixit <[email protected]> and contributors"]
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
@@ -16,6 +16,7 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1616
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1717
SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5"
1818
SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35"
19+
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
1920

2021
[weakdeps]
2122
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
@@ -59,6 +60,7 @@ SciMLBase = "2.122.1"
5960
SparseConnectivityTracer = "0.6, 1"
6061
SparseMatrixColorings = "0.4"
6162
SymbolicAnalysis = "0.3"
63+
SymbolicIndexingInterface = "0.3.46"
6264
Zygote = "0.6.67, 0.7"
6365
julia = "1.10"
6466

lib/OptimizationBase/src/OptimizationBase.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import SciMLBase: solve, init, solve!, __init, __solve,
1818
get_concrete_p, get_concrete_u0, promote_u0,
1919
KeywordArgError, checkkwargs
2020

21+
using SymbolicIndexingInterface: SymbolicIndexingInterface
22+
2123
export ObjSense, MaxSense, MinSense
2224
export allowsbounds, requiresbounds, allowsconstraints, requiresconstraints,
2325
allowscallback, requiresgradient, requireshessian,

lib/OptimizationBase/src/solve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ function get_concrete_problem(prob::OptimizationProblem; kwargs...)
270270
oldprob = prob
271271
prob = get_updated_symbolic_problem(get_root_indp(prob), prob; kwargs...)
272272
if prob !== oldprob
273-
kwargs = (;kwargs..., u0 = SII.state_values(prob), p = SII.parameter_values(prob))
273+
kwargs = (;kwargs..., u0 = SymbolicIndexingInterface.state_values(prob), p = SymbolicIndexingInterface.parameter_values(prob))
274274
end
275275
p = get_concrete_p(prob, kwargs)
276276
u0 = get_concrete_u0(prob, false, nothing, kwargs)

0 commit comments

Comments
 (0)