Skip to content

Commit

Permalink
refactor: fix solution indexing when it isn't a VectorOfArray
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Nov 29, 2023
1 parent d1db9b7 commit 7a9aadb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/solutions/solution_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ SymbolicIndexingInterface.is_time_dependent(::AbstractNoTimeSolution) = false
# TODO make this nontrivial once dynamic state selection works
SymbolicIndexingInterface.constant_structure(::AbstractSolution) = true

Base.@propagate_inbounds function Base.getindex(A::AbstractTimeseriesSolution, ::Colon)
return A.u[:]
end

Base.@propagate_inbounds function Base.getindex(A::AbstractNoTimeSolution, sym)
if symbolic_type(sym) == ScalarSymbolic()
if is_variable(A, sym)
Expand Down

0 comments on commit 7a9aadb

Please sign in to comment.