Skip to content

Components

TyPSA provides Python classes for defining components of different types (Bus, Load, etc.) with their input data.

Your IDE's type checking will verify that the correct data types are being provided while you develop your code. When you run your code, Pydantic validation ensures that your data inputs are sensible.

Some types of component have multiple component classes, each of which inherits shared attributes from a parent class. For example, the generator component type has Generator, ExtendableGenerator, and CommittableGenerator classes, all of which inherit from BaseGenerator.

Component Results

Most component types have a static optimization results class, a dynamic optimization results class, and dynamic (non-)linear simulation results classes. However, there are exceptions. For example, the GeneratorOptimizationDynamicResults class applies to all generators and can be accessed via property OptimizationDynamicResults.of_all_generators, but another dynamic results class, CommittableGeneratorOptimizationDynamicResults, applies only to CommittableGenerators and can only be accessed via property OptimizationDynamicResults.committable_generators.