SciML / SciML/ModelingToolkitStandardLibrary.jl

`SampledData` no longer allows a tunable buffer

Open
#272 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
171
Forks
49
Avg merge
15h 50m
Merged PRs (30d)
10

Description

As of MTKv9, parameter values are required to match their symtype. SampledData.buffer is updated to reflect this (in #271) but since it does not have a fixed size, it is marked as Constant and not Tunable.

Changing the definition to @parameters buffer[1:length(buffer)] would solve this issue, except ModelingToolkit.get_u0 scalarizes all default values, which causes varmap_to_vars to take very long for initialization.

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 by tracing SampledData.buffer and the ModelingToolkit.get_u0 to varmap_to_vars initialization path described in the issue. Compare the current Constant behavior with the proposed tunable definition, then establish a change that preserves tunability without making default-value initialization excessively slow.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.