Delft-FEWS I/O
PI-XML
- class rtctools.optimization.pi_mixin.PIMixin(**kwargs)[source]
Bases:
IOMixin
Adds Delft-FEWS Published Interface I/O to your optimization problem.
During preprocessing, files named
rtcDataConfig.xml
,timeseries_import.xml
,rtcParameterConfig.xml
, andrtcParameterConfig_Numerical.xml
are read from theinput
subfolder.rtcDataConfig.xml
maps tuples of FEWS identifiers, including location and parameter ID, to RTC-Tools time series identifiers.During postprocessing, a file named
timeseries_export.xml
is written to theoutput
subfolder.- Variables:
pi_binary_timeseries – Whether to use PI binary timeseries format. Default is
False
.pi_parameter_config_basenames – List of parameter config file basenames to read. Default is [
rtcParameterConfig
].pi_parameter_config_numerical_basename – Numerical config file basename to read. Default is
rtcParameterConfig_Numerical
.pi_check_for_duplicate_parameters – Check if duplicate parameters are read. Default is
True
.pi_validate_timeseries – Check consistency of timeseries. Default is
True
.
- max_timeseries_id(variable: str) str
Returns the name of the upper bound timeseries for the specified variable.
- Parameters:
variable – Variable name.
- min_timeseries_id(variable: str) str
Returns the name of the lower bound timeseries for the specified variable.
- Parameters:
variable – Variable name.
- property timeseries_export
pi.Timeseries
object for holding the output data.
- property timeseries_import
pi.Timeseries
object containing the input data.
- property timeseries_import_times
List of time stamps for which input data is specified.
The time stamps are in seconds since t0, and may be negative.