Skip to content

Commit

Permalink
Merge pull request #1127 from NREL-Sienna/gks/quick_fix_1125
Browse files Browse the repository at this point in the history
Add imports to fix bug 1125, test that
  • Loading branch information
jd-lara authored Jul 24, 2024
2 parents b405b10 + 67f4e7e commit 52d4ca8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/PowerSimulations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ import InfrastructureSystems.Optimization: list_variable_names, list_dual_names,
list_parameter_names, list_aux_variable_names, list_expression_names
import InfrastructureSystems.Optimization: read_optimizer_stats, get_optimizer_stats,
export_results, serialize_results, get_timestamps, get_model_base_power
import InfrastructureSystems.Optimization: get_resolution, get_forecast_horizon

# IS.Optimization imports that stay private, may or may not be additional methods in PowerSimulations
import InfrastructureSystems.Optimization: ArgumentConstructStage, ModelConstructStage
Expand Down Expand Up @@ -392,6 +393,7 @@ export get_model_base_power
export get_optimizer_stats
export get_timestamps
export get_resolution

import PowerModels
import TimerOutputs
import ProgressMeter
Expand Down
6 changes: 4 additions & 2 deletions test/test_model_decision.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,11 @@ end
@test isa(read_duals(res), Dict{String, DataFrames.DataFrame})
@test isa(res.parameter_values, Dict{PSI.ParameterKey, DataFrames.DataFrame})
@test isa(read_parameters(res), Dict{String, DataFrames.DataFrame})
@test isa(IS.Optimization.get_resolution(res), Dates.TimePeriod)
@test isa(PSI.get_resolution(res), Dates.TimePeriod)
@test isa(PSI.get_forecast_horizon(res), Int64)
@test isa(get_realized_timestamps(res), StepRange{DateTime})
@test isa(IS.Optimization.get_source_data(res), PSY.System)
@test length(IS.Optimization.get_timestamps(res)) == 24
@test length(get_timestamps(res)) == 24
end

@testset "Solve DecisionModelModel with auto-build" begin
Expand Down

0 comments on commit 52d4ca8

Please sign in to comment.