-
Notifications
You must be signed in to change notification settings - Fork 1
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
Merge subproblem parameters into main container #3
Conversation
main_problem = PSI.OptimizationContainer(sys, settings, nothing, U), | ||
subproblems = subproblems, | ||
time_steps = 1:1, | ||
resolution = IS.time_period_conversion(resolution), | ||
settings = settings, | ||
settings_copy = PSI.copy_for_serialization(settings), | ||
variables = Dict{PSI.VariableKey, AbstractArray}(), | ||
aux_variables = Dict{PSI.AuxVarKey, AbstractArray}(), | ||
duals = Dict{PSI.ConstraintKey, AbstractArray}(), | ||
constraints = Dict{PSI.ConstraintKey, AbstractArray}(), | ||
objective_function = PSI.ObjectiveFunction(), | ||
expressions = Dict{PSI.ExpressionKey, AbstractArray}(), | ||
parameters = Dict{PSI.ParameterKey, PSI.ParameterContainer}(), | ||
primal_values_cache = PSI.PrimalValuesCache(), | ||
initial_conditions = Dict{PSI.ICKey, Vector{PSI.InitialCondition}}(), | ||
initial_conditions_data = PSI.InitialConditionsData(), | ||
base_power = PSY.get_base_power(sys), | ||
optimizer_stats = PSI.OptimizerStats(), | ||
built_for_recurrent_solves = false, | ||
metadata = PSI.OptimizationContainerMetadata(), | ||
default_time_series_type = U, | ||
mpi_info = nothing, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
main_problem = PSI.OptimizationContainer(sys, settings, nothing, U), | |
subproblems = subproblems, | |
time_steps = 1:1, | |
resolution = IS.time_period_conversion(resolution), | |
settings = settings, | |
settings_copy = PSI.copy_for_serialization(settings), | |
variables = Dict{PSI.VariableKey, AbstractArray}(), | |
aux_variables = Dict{PSI.AuxVarKey, AbstractArray}(), | |
duals = Dict{PSI.ConstraintKey, AbstractArray}(), | |
constraints = Dict{PSI.ConstraintKey, AbstractArray}(), | |
objective_function = PSI.ObjectiveFunction(), | |
expressions = Dict{PSI.ExpressionKey, AbstractArray}(), | |
parameters = Dict{PSI.ParameterKey, PSI.ParameterContainer}(), | |
primal_values_cache = PSI.PrimalValuesCache(), | |
initial_conditions = Dict{PSI.ICKey, Vector{PSI.InitialCondition}}(), | |
initial_conditions_data = PSI.InitialConditionsData(), | |
base_power = PSY.get_base_power(sys), | |
optimizer_stats = PSI.OptimizerStats(), | |
built_for_recurrent_solves = false, | |
metadata = PSI.OptimizationContainerMetadata(), | |
default_time_series_type = U, | |
mpi_info = nothing, | |
main_problem=PSI.OptimizationContainer(sys, settings, nothing, U), | |
subproblems=subproblems, | |
time_steps=1:1, | |
resolution=IS.time_period_conversion(resolution), | |
settings=settings, | |
settings_copy=PSI.copy_for_serialization(settings), | |
variables=Dict{PSI.VariableKey, AbstractArray}(), | |
aux_variables=Dict{PSI.AuxVarKey, AbstractArray}(), | |
duals=Dict{PSI.ConstraintKey, AbstractArray}(), | |
constraints=Dict{PSI.ConstraintKey, AbstractArray}(), | |
objective_function=PSI.ObjectiveFunction(), | |
expressions=Dict{PSI.ExpressionKey, AbstractArray}(), | |
parameters=Dict{PSI.ParameterKey, PSI.ParameterContainer}(), | |
primal_values_cache=PSI.PrimalValuesCache(), | |
initial_conditions=Dict{PSI.ICKey, Vector{PSI.InitialCondition}}(), | |
initial_conditions_data=PSI.InitialConditionsData(), | |
base_power=PSY.get_base_power(sys), | |
optimizer_stats=PSI.OptimizerStats(), | |
built_for_recurrent_solves=false, | |
metadata=PSI.OptimizationContainerMetadata(), | |
default_time_series_type=U, | |
mpi_info=nothing, |
@@ -123,10 +123,10 @@ function PSI.set_service_model!( | |||
PSI.set_service_model!( | |||
template.base_template, | |||
service_name, | |||
ServiceModel(service_type, formulation; use_service_name=true), | |||
ServiceModel(service_type, formulation; use_service_name = true), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
ServiceModel(service_type, formulation; use_service_name = true), | |
ServiceModel(service_type, formulation; use_service_name=true), |
) | ||
for (id, sub_template) in get_sub_templates(template) | ||
service_model = ServiceModel(service_type, formulation; use_service_name=true) | ||
service_model = ServiceModel(service_type, formulation; use_service_name = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
service_model = ServiceModel(service_type, formulation; use_service_name = true) | |
service_model = ServiceModel(service_type, formulation; use_service_name=true) |
@@ -3,7 +3,7 @@ struct MultiRegionProblem <: PSI.DecisionProblem end | |||
function PSI.DecisionModel{MultiRegionProblem}( | |||
template::MultiProblemTemplate, | |||
sys::PSY.System, | |||
::Union{Nothing, JuMP.Model}=nothing; | |||
::Union{Nothing, JuMP.Model} = nothing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
::Union{Nothing, JuMP.Model} = nothing; | |
::Union{Nothing, JuMP.Model}=nothing; |
No description provided.