Skip to content

Conversation

@SebastianM-C
Copy link
Member

@SebastianM-C SebastianM-C commented Jan 12, 2026

In MTK v11, the syntax dT(t) = dT with a constant value creates an
initial_condition, which adds an initialization equation. For algebraic
variables like dT and Q_flow that are constrained by equations
(e.g., dT ~ port_a.T - port_b.T), this creates an overdetermined
initialization system.

The fix changes from initial conditions to guesses:

  • Old: dT(t) = dT, [guess = 0.0] (dT arg as initial condition)
  • New: dT(t), [guess = dT_guess] (dT_guess arg as guess only)

This follows the MTK v11 semantics where algebraic/observed variables
should only have guesses, not initial conditions.

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

In MTK v11, the syntax `dT(t) = dT` with a constant value creates an
initial_condition, which adds an initialization equation. For algebraic
variables like `dT` and `Q_flow` that are constrained by equations
(e.g., `dT ~ port_a.T - port_b.T`), this creates an overdetermined
initialization system.

The fix changes from initial conditions to guesses:
- Old: `dT(t) = dT, [guess = 0.0]` (dT arg as initial condition)
- New: `dT(t), [guess = dT_guess]` (dT_guess arg as guess only)

This follows the MTK v11 semantics where algebraic/observed variables
should only have guesses, not initial conditions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@SebastianM-C SebastianM-C marked this pull request as ready for review January 12, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant