Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: properly implement SII fallbacks for AbstractJumpProblem #628

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/problems/problem_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
end

SymbolicIndexingInterface.symbolic_container(prob::AbstractSciMLProblem) = prob.f
SymbolicIndexingInterface.symbolic_container(prob::AbstractJumpProblem) = prob.prob

Check warning on line 9 in src/problems/problem_interface.jl

View check run for this annotation

Codecov / codecov/patch

src/problems/problem_interface.jl#L9

Added line #L9 was not covered by tests

SymbolicIndexingInterface.parameter_values(prob::AbstractSciMLProblem) = prob.p
SymbolicIndexingInterface.parameter_values(prob::AbstractJumpProblem) = prob.prob.p

Check warning on line 12 in src/problems/problem_interface.jl

View check run for this annotation

Codecov / codecov/patch

src/problems/problem_interface.jl#L12

Added line #L12 was not covered by tests
SymbolicIndexingInterface.state_values(prob::AbstractSciMLProblem) = prob.u0
SymbolicIndexingInterface.state_values(prob::AbstractJumpProblem) = prob.prob.u0

Check warning on line 14 in src/problems/problem_interface.jl

View check run for this annotation

Codecov / codecov/patch

src/problems/problem_interface.jl#L14

Added line #L14 was not covered by tests
SymbolicIndexingInterface.current_time(prob::AbstractSciMLProblem) = prob.tspan[1]
SymbolicIndexingInterface.current_time(prob::AbstractJumpProblem) = prob.prob.tspan[1]

Check warning on line 16 in src/problems/problem_interface.jl

View check run for this annotation

Codecov / codecov/patch

src/problems/problem_interface.jl#L16

Added line #L16 was not covered by tests

Base.@propagate_inbounds function Base.getindex(prob::AbstractSciMLProblem, ::SymbolicIndexingInterface.SolvedVariables)
return getindex(prob, variable_symbols(prob))
Expand Down
Loading