Do we need `BusInfinite` to inherit from `BusBase`?

オープン
#462 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@pelesh がすでに取り組んでいます。

2026年6月24日 から。

評価

この issue はまだ評価されていません。

説明

enhancement new model question
Summary

I suggest to make BusInfinite a standalone class, not inheriting from BusBase. In that case, the system composer would have separate loops for buses and infinite buses. The latter might be needed only for component instantiation and not for allocation, residual evaluation or Jacobian evaluation.

In GridKit phasor dynamics module, similar example is SignalNode, which is also a standalone class.

CC @lukelowry @PhilipFackler @nkoukpaizan @abirchfield

Rationale

Inheritance is "is a" relationship and despite its name infinite bus is not really a bus. Rather it stands in for a connection to a grid that is much larger than the grid being modeled.

The infinite bus does not have internal variables or equations and can be skipped in SystemSolver when allocating workspace, evaluating residual or Jacobian, etc. Without the inheritance, the BusInfinite class could be simplified and BusBase could be merged with Bus class to further simplify the code.

Description

I suggest implementing BusInfinite as a standalone class that is treated separately from the Bus instances. We needed inheritance because component constructors needed pointers to buses. Since ComponentData instance has all the connectivity information for each component, pointers to the buses will be eventually removed.

Additional information

No response

主要言語
C++
スター
27
フォーク
11
平均マージ
2日 21時間
マージ済み PR(30日)
15

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ORNL/GridKit のほかの issue

ORNL/GridKit の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。