Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Oct 23, 2023
1 parent 00b2134 commit a21d9bc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/simulation/decision_model_simulation_results.jl
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ function read_dual(
key = _deserialize_key(ConstraintKey, res, args...)
timestamps = _process_timestamps(res, initial_time, count)
return make_dataframes(
_read_results(DenseAxisArray{Float64, 2}, res, [key], timestamps, store)[key],
_read_results(res, [key], timestamps, store)[key],
)
end

Expand All @@ -417,7 +417,7 @@ function read_parameter(
key = _deserialize_key(ParameterKey, res, args...)
timestamps = _process_timestamps(res, initial_time, count)
return make_dataframes(
_read_results(DenseAxisArray{Float64, 2}, res, [key], timestamps, store)[key],
_read_results(res, [key], timestamps, store)[key],
)
end

Expand All @@ -441,7 +441,7 @@ function read_aux_variable(
key = _deserialize_key(AuxVarKey, res, args...)
timestamps = _process_timestamps(res, initial_time, count)
return make_dataframes(
_read_results(DenseAxisArray{Float64, 2}, res, [key], timestamps, store)[key],
_read_results(res, [key], timestamps, store)[key],
)
end

Expand All @@ -465,7 +465,7 @@ function read_expression(
key = _deserialize_key(ExpressionKey, res, args...)
timestamps = _process_timestamps(res, initial_time, count)
return make_dataframes(
_read_results(DenseAxisArray{Float64, 2}, res, [key], timestamps, store)[key],
_read_results(res, [key], timestamps, store)[key],
)
end

Expand Down Expand Up @@ -565,7 +565,6 @@ function load_results!(
merge!(
get_cached_variables(res),
_read_results(
DenseAxisArray{Float64, 2},
res,
variable_keys,
res.results_timestamps,
Expand All @@ -575,7 +574,6 @@ function load_results!(
merge!(
get_cached_duals(res),
_read_results(
DenseAxisArray{Float64, 2},
res,
dual_keys,
res.results_timestamps,
Expand All @@ -585,7 +583,6 @@ function load_results!(
merge!(
get_cached_parameters(res),
_read_results(
DenseAxisArray{Float64, 2},
res,
parameter_keys,
res.results_timestamps,
Expand All @@ -595,7 +592,6 @@ function load_results!(
merge!(
get_cached_aux_variables(res),
_read_results(
DenseAxisArray{Float64, 2},
res,
aux_variable_keys,
res.results_timestamps,
Expand All @@ -605,7 +601,6 @@ function load_results!(
merge!(
get_cached_expressions(res),
_read_results(
DenseAxisArray{Float64, 2},
res,
expression_keys,
res.results_timestamps,
Expand Down
18 changes: 18 additions & 0 deletions src/simulation/in_memory_simulation_store.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ function InMemorySimulationStore()
)
end

function get_number_of_dimensions(
store::InMemorySimulationStore,
i::Type{EmulationModelIndexType},
key::OptimizationContainerKey,
)
return length(get_column_names(store, i, model_name, key))
end

function get_number_of_dimensions(
store::InMemorySimulationStore,
i::Type{DecisionModelIndexType},
model_name::Symbol,
key::OptimizationContainerKey,
)
return length(get_column_names(store, i, model_name, key))
end


function open_store(
func::Function,
::Type{InMemorySimulationStore},
Expand Down

0 comments on commit a21d9bc

Please sign in to comment.