JuliaDynamics / JuliaDynamics/DynamicalSystemsBase.jl

`set_parameter!` for ParallelDynamicalSystem

Open
#223 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
56
Forks
34
PR merge metrics
No merged PRs in 30d

Description

set_parameter! for ParallelDynamicalSystem is buggy, but easily fixable.

This is the discrete case, didn't check for continuous:

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

set_parameter!(pdtds::PDTDS) = for ds in pdtds.systems; set_parameter!(ds, args...); end

but that needs to be corrected for something like

set_parameter!(pdtds::PDTDS,index,value) = for ds in pdtds.systems; set_parameter!(ds, index,value); end

I'll make a small PR later.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the set_parameter! methods for ParallelDiscreteTimeDynamicalSystem and reproduce the discrete example from the issue. Done means calling set_parameter!(pds, index, value) updates that parameter in every system in pds.systems; continuous behavior is outside the reported scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend-api-design
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.