Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add imports to fix bug 1125, test that #1127

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading