Delft-FEWS I/O

class rtctools.optimization.pi_mixin.PIMixin(**kwargs)

Bases: rtctools.optimization.optimization_problem.OptimizationProblem

Adds Delft-FEWS Published Interface I/O to your optimization problem.

During preprocessing, files named rtcDataConfig.xml, timeseries_import.xml, rtcParameterConfig.xml, and rtcParameterConfig_Numerical.xml are read from the input 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 the output 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
timeseries_export

pi.Timeseries object for holding the output data.

timeseries_import

pi.Timeseries object containing the input data.

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.