Class TimeSeriesTable

java.lang.Object
com.powsybl.timeseries.TimeSeriesTable

public class TimeSeriesTable extends Object
Utility class to load time series into a table and then:
  • Get direct access to all values
  • Compute statistics like mean, standard deviation, and Pearson product-moment correlation coefficient
  • Convert to CSV
Some design considerations and limitations:
  • Number of version loadable in the table has to be specified at creation
  • Versions have to contiguous
  • Once first batch of time series has been loaded, new time series cannot be added but data of existing one can be updated
  • Concurrent load (i.e multi-thread) of data is supported (using same time series list)
  • Concurrency between data loading and other operations (CSV writing, statistics computation) is NOT supported
Author:
Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
  • Constructor Details

  • Method Details

    • createDirectMem

      public static TimeSeriesTable createDirectMem(int fromVersion, int toVersion, TimeSeriesIndex tableIndex)
    • createMem

      public static TimeSeriesTable createMem(int fromVersion, int toVersion, TimeSeriesIndex tableIndex)
    • getTableIndex

      public TimeSeriesIndex getTableIndex()
    • load

      @SafeVarargs public final void load(int version, List<? extends TimeSeries>... timeSeries)
    • load

      public void load(int version, List<TimeSeries> timeSeriesList)
    • getTimeSeriesNames

      public List<String> getTimeSeriesNames()
    • getDoubleValue

      public double getDoubleValue(int version, int timeSeriesNum, int point)
    • getStringValue

      public String getStringValue(int version, int timeSeriesNum, int point)
    • getDoubleTimeSeriesIndex

      public int getDoubleTimeSeriesIndex(String timeSeriesName)
    • getStringTimeSeriesIndex

      public int getStringTimeSeriesIndex(String timeSeriesName)
    • getMean

      public double getMean(int version, int timeSeriesNum)
    • getStdDev

      public double getStdDev(int version, int timeSeriesNum)
    • findMostCorrelatedTimeSeries

      public List<TimeSeriesTable.Correlation> findMostCorrelatedTimeSeries(String timeSeriesName, int version)
    • findMostCorrelatedTimeSeries

      public List<TimeSeriesTable.Correlation> findMostCorrelatedTimeSeries(String timeSeriesName, int version, int maxSize)
    • computePpmcc

      public double[] computePpmcc(String timeSeriesName, int version)
    • writeCsv

      public void writeCsv(Path file)
    • writeCsv

      public void writeCsv(Path file, TimeSeriesCsvConfig timeSeriesCsvConfig)
    • toCsvString

      public String toCsvString()
    • toCsvString

      public String toCsvString(TimeSeriesCsvConfig timeSeriesCsvConfig)
    • writeCsv

      public void writeCsv(Writer writer, TimeSeriesCsvConfig timeSeriesCsvConfig) throws IOException
      Throws:
      IOException