Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guess for parameter not reflected in guesses of system #3075

Open
hexaeder opened this issue Sep 25, 2024 · 0 comments
Open

Guess for parameter not reflected in guesses of system #3075

hexaeder opened this issue Sep 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hexaeder
Copy link
Contributor

Describe the bug 🐞

If you attach a guess to a parameter, it isn't reflected in the guesses of the system

Expected behavior

Have guesses contain all guesses.

Minimal Reproducible Example 👇
Example 1:

julia> begin
               @independent_variables t
               @parameters a [guess=2]
               @variables x(t) [guess=1]
               @named sys = ODESystem([x ~ a], t)
               guesses(sys)
           end
Dict{Any, Any} with 1 entry:
  x(t) => 1

Example 2:

  @mtkmodel MyMod begin
        @components begin
            a = RealInput(guess=1)
        end
        @parameters begin
            b, [guess=2]
        end
    end
    @named model = MyMod()
    guesses(model)       # knows only about a.u=1
    getguess(model.b)    # guess b=2 locally stored
    getguess(model.a.u)  # guess u=1 not locally stored

Environment (please complete the following information):

  • Output of using Pkg; Pkg.status()
⌃ [13f3f980] CairoMakie v0.12.9
  [459566f4] DiffEqCallbacks v3.9.1
  [7d51a73a] ExplicitImports v1.9.0
  [86223c79] Graphs v1.11.2
⌅ [ee78f7c6] Makie v0.21.9
⌃ [961ee093] ModelingToolkit v9.39.0
⌃ [16a59e39] ModelingToolkitStandardLibrary v2.11.0
  [127b3ac7] OrdinaryDiffEqNonlinearSolve v1.2.1
  [43230ef6] OrdinaryDiffEqRosenbrock v1.2.0
  [b1df2697] OrdinaryDiffEqTsit5 v1.1.0
@hexaeder hexaeder added the bug Something isn't working label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant