Skip to content

Conversation

@Thijss
Copy link
Member

@Thijss Thijss commented Nov 12, 2025

Add AsymPowerSensorArray and remove defaults from GenericBranch

@Thijss Thijss changed the base branch from main to feat/add-basic-arrays November 12, 2025 14:04
@Thijss Thijss changed the base branch from feat/add-basic-arrays to feature/45-add-extra-pgm-components November 12, 2025 14:07
@sonarqubecloud
Copy link

@Thijss Thijss changed the title Feature/only required columns PR on #94: only required columns Nov 13, 2025
@Thijss Thijss changed the title PR on #94: only required columns PR on #94: add AsymPowerSensorArray and remove optional columns from GenericBranch Nov 13, 2025
x1: NDArray[np.float64] # positive-sequence reactance
g1: NDArray[np.float64] # positive-sequence conductance
b1: NDArray[np.float64] # positive-sequence susceptance
k: NDArray[np.float64] # off-nominal ratio
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaapschoutenalliander,

@vincentkoppen and me think it's better to leave these out, so that PGM can handle the defaults. If a user wants to provide other values, they can easily extend there GenericBranchArray. This is also how we do it in other array (e.g., SourceArray, LineArray)

for field in sym_pow_fields:
assert field in pow_sens.dtype.fields

def test_asymmetric_sensor_array():
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first part of the original test did't really test anything useful

"generic_branch",
"asym_line",
"sym_gen",
"asym_power_sensor",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorted the fields for better readability

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.

2 participants