get_export_path#
- ams.utils.paths.get_export_path(system, fname, path=None, fmt='csv')[source]#
Get the absolute export path and the derived file name for an AMS system export.
This function is not intended to be used directly by users.
- Parameters:
- systemams.system.System
The AMS system to export. (Mocked in example)
- fnamestr
The descriptive file name, e.g., 'PTDF', or 'DCOPF'.
- pathstr, optional
The desired output path. For a directory, the file name will be generated; For a full file path, the base name will be used with the specified format; For
None, falls back tosystem.files.output_pathwhen set, otherwise the current working directory.- fmtstr, optional
The file format to export, e.g., 'csv', 'json'. Default is 'csv'.
- Returns:
- tuple(str, str)
The absolute export path (e.g., '/home/user/project/data_Routine.csv').
The export file name (e.g., 'data_Routine.csv'), including the format extension.
Notes
Default-path precedence (when
path is None): explicitpatharg >system.files.output_path> current working directory. An empty-stringoutput_path(theFileMandefault when no output dir is specified) is treated as "not set".Changed in version 1.3.0:
system.files.output_pathis now used as the default fallback, previously the current working directory was always used.