Skip to content

getp does not work with ArraySymbolic when p is timeseries #94

@hexaeder

Description

@hexaeder

When get_parameter_timeseries returns Vector{ParameterTimeseriesIndex} we get the following MethodError.

ERROR: MethodError: no method matching SymbolicIndexingInterface.GetParameterTimeseriesIndex(::Vector{…}, ::Vector{…})
The type `SymbolicIndexingInterface.GetParameterTimeseriesIndex` exists, but no method is defined for this combination of argument types when trying to construct it.

Closest candidates are:
  SymbolicIndexingInterface.GetParameterTimeseriesIndex(::I, ::J) where {I<:SymbolicIndexingInterface.GetParameterIndex, J<:(SymbolicIndexingInterface.GetParameterIndex{<:SymbolicIndexingInterface.ParameterTimeseriesIndex})}
   @ SymbolicIndexingInterface ~/.julia/packages/SymbolicIndexingInterface/CErRX/src/parameter_indexing.jl:127

Stacktrace:
 [1] _getp(sys::Network{…}, ::SymbolicIndexingInterface.ArraySymbolic, ::SymbolicIndexingInterface.ScalarSymbolic, p::EPIndex{…})
   @ SymbolicIndexingInterface ~/.julia/packages/SymbolicIndexingInterface/CErRX/src/parameter_indexing.jl:628
 [2] getp(sys::Network{…}, p::EPIndex{…})
   @ SymbolicIndexingInterface ~/.julia/packages/SymbolicIndexingInterface/CErRX/src/parameter_indexing.jl:41
 [3] top-level scope
   @ REPL[31]:1
 [4] top-level scope
   @ none:1
Some type information was truncated. Use `show(err)` to see complete types.

There is a difference _getp for ::ScalarSymbolic:

return GetParameterTimeseriesIndex(
GetParameterIndex(idx), GetParameterIndex(ts_idx))

and ::ArraySymbolic

return GetParameterTimeseriesIndex(idx, ts_idx)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions