select_by_utilisation#
- popo.network.select_by_utilisation(transformers, screen=None, count=30, random_state=0)#
Choose the transformers to record, held fixed across scenarios.
Given a screening result, the most heavily loaded assets are taken, which is where an operator would look and where a thermal constraint can actually bind. Without one, a uniform sample is drawn and the caller should expect the record to contain few events: on one feeder a random thirty peaked at 0.81 utilisation while the screen had found 250 of 596 above 0.8.
Holding the selection fixed across scenarios is what makes a penetration sweep a comparison of the same assets rather than a fresh draw each time.
- Parameters:
transformers (
DataFrame) – Frame fromread_transformers().screen (
DataFrame|None) – Optional screening result carryingtransformerandutilisationcolumns, from which peak utilisation is taken.count (
int) – Number of transformers to select.random_state (
int) – Seed for the uniform fallback, for reproducibility.
- Return type:
- Returns:
The selected subset of
transformers.- Raises:
ValueError – If
countis not positive.