Repository navigation
Initial implementation of transient analysis with AgentiGrid - #147
Merged
Merged
Conversation
…t-only relief (#134) - Study area from substation tiers (transformers join buses, lines are hops, default depth 3) instead of k nearest buses; five affected-element lists; new set_shunt command; mutation-driven contingency sweep. - Verdict line and table of every failed contingency; per-element failure counts for N-2; studies over 500 contingencies are reported as not completable instead of being shrunk. - Agent's full findings kept in the journal, CSV and saved session. - Relief: tap change, line switching out or in, tiered load shedding capped at 10% per bus; added load never shed; generator_redispatch removed; relief only when the goal asks; relief in the sweep cache key. - Objective extraction no longer invents objectives or limits. - Prompt templates moved to prompts/exago/; restored identical-sweep rule. - Live opflow test no longer overwrites tests/fixtures/sample_opflow_output.txt; test_solve_time matches the committed sample. Co-authored-by: tsybinae <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
First build of the GridKit side of AgentiGrid (--tool gridkit). The LLM picks a fault screen; AgentiGrid adds bus faults to a copy of the GridKit case, runs DynamicSimulation, applies PJM M-14B stability checks and returns a verdict. PJM tests that need elements GridKit does not have are reported as SKIPPED. New: gridkit_parsers/, gridkit_engine/, prompts/gridkit/, tests/gridkit/. Changed: cli.py (--tool flag), README.md and the GridKit folder READMEs, tests/README.md. No ExaGO code changed. Co-authored-by: tsybinae <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
* AgentiGrid: one config for ExaGO and GridKit, GridKit from the latest ExaGO steady state - ExaGO code moved to exago_engine/ and exago_parsers/ (imports, test patch targets and logger names updated); ExaGO output in workdir/exago/ and logs/exago/; OPFLOW and PFLOW save their solved case (-save_output). - One shared config: new gridkit: section (binary, timeout, solver .json values, default fault start), read by the GridKit engine; warnings for unknown solver keys and invalid values. Defaults keep the old behaviour. - New gridkit_engine/from_exago.py: a fault screen with "start_from": "latest_steady_state" takes voltages, angles, dispatch, generator outages, loads, shunts and branches from the last simulation of the newest ExaGO journal and applies them to the GridKit case's dynamic models; error for online generators without a machine model. --from-exago forces it for a session. - Fault screens can run with GridKit ContingencyAnalysis (one process for all faults of a screen). - GridKit prompt: a fault at a bus means that bus only, unless the goal asks for nearby buses. - New tests: tests/gridkit/test_config.py, test_from_exago.py, test_screen_options.py. Co-Authored-By: Claude Opus 5.5 <[email protected]> * AgentiGrid: exago.save_solutions limits the solved cases kept per action Answers the #144 review: OPFLOW/PFLOW saved a solved case on every solve, including sweep and contingency solves. New config key exago.save_solutions (also --set exago.save_solutions=<value>): - best (default): single solves keep their solution; an action with many solves keeps only its best (cheapest feasible sweep candidate or best by the sweep's metric, largest hosting capacity for boundary, Pareto-best explore variant), or the most recent if it has no best (contingency, reserve) - newest: multi-solve actions keep only the most recent solve - all: every solution kept (previous behaviour) - none: OPFLOW/PFLOW write no solution (-save_output not passed) Only solution files are removed; run folders and input cases stay. After an explore, pruning waits for the next action so a selected variant keeps its solution. New tests: tests/runner/test_save_solutions.py. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: tsybinae <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
pelesh
force-pushed
the
slaven/agentigrid-refactor
branch
from
October 15, 2026 21:59
774743e to
79c142a
Compare
samimk
approved these changes
Oct 19, 2026
samimk
left a comment
Collaborator
There was a problem hiding this comment.
Approving. Tests pass (1061 passed; the remaining failures are missing local example symlinks and also occur on develop). Renames are complete in code and the launcher imports the new modules.
Known follow-ups, which I’ll handle in the launcher work:
- The launcher doesn’t use exago_output(), so its ExaGO runs still write to workdir/ and logs/ rather than workdir/exago/. --from-exago therefore won’t find launcher-made steady states.
- Saved sessions remain at workdir/saved_session_*.
Minor docs:
- launcher/ARCHITECTURE.md still references agentigrid.engine/agentigrid.parsers in the data-model table (lines ~23, 169–175).
- applications/gridkit/README.md still says ContingencyAnalysis isn’t called.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge request type
Relates to
AgentiGrid
This MR updates
AgentiGrid
Summary
Adds preliminary tooling to AgentiGrid to perform basic transient stability analysis using GridKit as the simulation backend. Most of the changes are renamed files and directories.
Separate tooling was added for ExaGO and GridKit backends. AgentiGrid is able to use ExaGO (optimal power flow) and GridKit (transient simulations) together depending on task.
Linked Issue(s)