Skip to content

Add support for fixed time steps with IDA#347

Open
Steven-Roberts wants to merge 18 commits into
developfrom
Steven-Roberts/fixed-step-IDA
Open

Add support for fixed time steps with IDA#347
Steven-Roberts wants to merge 18 commits into
developfrom
Steven-Roberts/fixed-step-IDA

Conversation

@Steven-Roberts

@Steven-Roberts Steven-Roberts commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds option to run IDA with fixed time steps
Improves setting of absolute tolerances
Fixes incorrect resizing of the tagging vectors

Closes #326

Proposed changes

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • I have updated CHANGELOG.md to reflect the changes in this PR. If this is a minor PR that is part of a larger fix already included in the file, state so.

Further comments

This replaces #332 which was not rebased correctly and the branch name didn't follow naming conventions.

Prior to this PR, many tests and examples included algebraic errors in IDA's error norm because the tagging vectors were improperly sized and this branch was never entered. With this fixed, the Microgrid and ScaleMicrogrid tests now fail because error is measured differently. Digging a bit deeper, I suspect the reference solution used in those examples is not very accurate or corresponded to a slightly different residual function. Even on the develop branch, reducing the tolerances does not improve the error reported here.

@Steven-Roberts Steven-Roberts force-pushed the Steven-Roberts/fixed-step-IDA branch 2 times, most recently from a3fa852 to 5d2ef68 Compare May 29, 2026 01:31
@Steven-Roberts Steven-Roberts force-pushed the Steven-Roberts/fixed-step-IDA branch from 80c017b to ee5f453 Compare June 10, 2026 20:50
@Steven-Roberts

Copy link
Copy Markdown
Collaborator Author

All the tests are finally passing, and it should be ready for review. The examples using Ipopt require tighter tolerances with these changes. Otherwise the optimizations were not converging, seemingly because the objective function was "noisy" at the level of the IDA tolerances. I don't fully understand why this wasn't the case before, but it could be related to this branch introducing solves for consistent initial conditions. If you have any other explaination @pelesh, I'd be curious to know.

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.

IDA Fixed Time Step Support

1 participant