Skip to content

SCC does not transfer residuals to solution object #706

@mx-p9a

Description

@mx-p9a

Describe the bug 🐞

When using the SCC algorithm to solve a ModelingToolkit initialization system, the residuals are not transferred to the solution object.

julia> iprob = InitializationProblem(sys, 0.0, u0, guesses = guesses(sys))
SCCNonlinearProblem with uType Vector{Float64}. In-place: false
u0: 6-element Vector{Float64}:
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0

julia> isol.alg
SCCNonlinearSolve.SCCAlg{Nothing, Nothing}(nothing, nothing)

julia> isol.retcode
ReturnCode.Success = 1

julia> isol.resid
5-element Vector{Nothing}:
 nothing
 nothing
 nothing
 nothing
 nothing

julia> isol.stats

julia>

Expected behavior

Output like described in here.

  • Output of versioninfo()
Julia Version 1.11.7
Commit f2b3dbda30a (2025-09-08 12:10 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 12 × Apple M2 Max
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m2)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
Environment:
  JULIA_PKG_USE_CLI_GIT = true

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