`set_parameter!` for ParallelDynamicalSystem
`set_parameter!` for ParallelDynamicalSystem is buggy, but easily fixable.
This is the discrete case, didn't check for continuous:
```julia
using DynamicalSystems
ds = Systems.henon()
pds = ParallelDynamicalSystem(ds,StateSpaceSet(rand(3,2)))
@which set_parameter!(pds,2,1.2)
```
Here `set_parameter!` gets dispatched to the wrong method:
`set_parameter!(ds::DynamicalSystem, index, value)`
which only changes the parameter of the first system from `pds.systems`.
There is a method for `ParallelDiscreteTimeDynamicalSystem`
```julia
set_parameter!(pdtds::PDTDS) = for ds in pdtds.systems; set_parameter!(ds, args...); end
```
but that needs to be corrected for something like
```julia
set_parameter!(pdtds::PDTDS,index,value) = for ds in pdtds.systems; set_parameter!(ds, index,value); end
```
I'll make a small PR later.
0 条评论