Delft-FEWS I/O

class rtctools.optimization.pi_mixin.PIMixin(**kwargs)[source]

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.

  • 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.
  • timeseries_import_basename – Import file basename. Default is timeseries_import.
  • timeseries_export_basename – Export file basename. Default is timeseries_export.
max_timeseries_id(variable: str) → str[source]

Returns the name of the upper bound timeseries for the specified variable.

Parameters:variable – Variable name
min_timeseries_id(variable: str) → str[source]

Returns the name of the lower bound timeseries for the specified variable.

Parameters:variable – Variable name

pi.Timeseries object for holding the output data.


pi.Timeseries object containing the input data.


List of time stamps for which input data is specified.

The time stamps are in seconds since t0, and may be negative.