From fadf8f7a84ff15a70594b58a0a5560206b842270 Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Mon, 2 Oct 2023 17:48:13 -0600 Subject: [PATCH] add method for results deserialize --- src/core/dataset.jl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/core/dataset.jl b/src/core/dataset.jl index 1b3efe15f8..af3c20368b 100644 --- a/src/core/dataset.jl +++ b/src/core/dataset.jl @@ -255,6 +255,28 @@ function HDF5Dataset{2}( ) end +function HDF5Dataset{2}( + values::HDF5.Dataset, + column_dataset::HDF5.Dataset, + dims::NTuple{5, Int}, + resolution::Dates.Period, + initial_time::Dates.DateTime, +) + col1 = column_dataset[1:dims[2]] + col2 = column_dataset[(dims[2] + 1):end] + HDF5Dataset{2}( + values, + column_dataset, + 1, + 0, + resolution, + initial_time, + UNSET_INI_TIME, + (col1, col2), + ) +end + + function get_column_names(::OptimizationContainerKey, s::HDF5Dataset) s.column_names return s.column_names