ams.system.System#
- class ams.system.System(case: str | None = None, name: str | None = None, config: Dict | None = None, config_path: str | None = None, default_config: bool | None = False, options: Dict | None = None, **kwargs)[source]#
Base system class, revised from andes.system.System. This class encapsulates data, models, and routines for scheduling modeling and analysis in power systems.
- Parameters:
- casestr, optional
The path to the case file.
- namestr, optional
Name of the system instance.
- configdict, optional
Configuration options for the system. Overrides the default configuration if provided.
- config_pathstr, optional
The path to the configuration file.
- default_configbool, optional
If True, the default configuration file is loaded.
- optionsdict, optional
Additional configuration options for the system.
- **kwargs
Additional configuration options passed as keyword arguments.
- Attributes:
- namestr
Name of the system instance.
- optionsdict
A dictionary containing configuration options for the system.
- modelsOrderedDict
An ordered dictionary holding the model names and instances.
- model_aliasesOrderedDict
An ordered dictionary holding model aliases and their corresponding instances.
- groupsOrderedDict
An ordered dictionary holding group names and instances.
- routinesOrderedDict
An ordered dictionary holding routine names and instances.
- typesOrderedDict
An ordered dictionary holding type names and instances.
- matsMatrixProcessor, None
A matrix processor instance, initially set to None.
- matOrderedDict
An ordered dictionary holding common matrices.
- exit_codeint
Command-line exit code. 0 indicates normal execution, while other values indicate errors.
- recentRecentSolvedRoutines, None
An object storing recently solved routines, initially set to None.
- dynANDES System, None
linked dynamic system, initially set to None. It is an instance of the ANDES system, which will be automatically set when using
System.to_andes().- filesFileMan
File path manager instance.
- is_setupbool
Internal flag indicating if the system has been set up.
Methods
setup:
Set up the system.
to_andes:
Convert the system to an ANDES system.
- __init__(case: str | None = None, name: str | None = None, config: Dict | None = None, config_path: str | None = None, default_config: bool | None = False, options: Dict | None = None, **kwargs)[source]#
Methods
add(model[, param_dict])Add a device instance for an existing model.
Perform per-unit value conversion for all model parameters.
call_models(method, models, *args, **kwargs)Call a named method on each model in models.
Collect config data from system, routines, and models into a
configparser.ConfigParserobject.Collect indices into BackRef for all models.
Perform connectivity check for system.
Import all groups classes defined in
models/group.py.Import and instantiate models as System member attributes.
Import routines as defined in
routines/__init__.py.Import all types classes defined in
routines/typecls.py.link_ext_param([model])Retrieve values for
ExtParaminstances across models.report()Write system routine reports to a plain-text file.
reset([force])Reset to the state after reading data and setup.
save_config([file_path, overwrite])Save all system, routine, and model configurations to an rc-formatted file.
setup()Set up system for studies.
summary()Print out system summary.
supported_models([export])Return the supported group names and model names in a table.
supported_routines([export])Return the support type names and routine names in a table.
to_andes([addfile, setup, no_output, ...])Convert the AMS system to an ANDES system.
to_json(outfile[, overwrite, skip_empty, ...])Export the AMS system to a JSON file.
to_m(outfile[, overwrite, skip_empty, to_andes])Export an AMS system to a MATPOWER M-file.
to_mpc()Export an AMS system to a MATPOWER dict.
to_raw(outfile[, overwrite, skip_empty, ...])Export the AMS system to a PSS/E RAW v33 file.
to_xlsx(outfile[, overwrite, skip_empty, ...])Export the AMS system to an Excel (XLSX) file.