Skip to content

Commit

Permalink
Add AutoScaling to single stage case
Browse files Browse the repository at this point in the history
  • Loading branch information
RuaridhMacd committed Nov 14, 2024
1 parent cf794f7 commit bb078b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/case_runners/case_runner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ function run_genx_case_simple!(case::AbstractString, mysetup::Dict, optimizer::A
println("Time elapsed for model building is")
println(time_elapsed)

if mysetup["AutoScaling"] == 1
println("Scaling Constraints")
scale_constraints!(EP)
end

println("Solving Model")
EP, solve_time = solve_model(EP, mysetup)
myinputs["solve_time"] = solve_time # Store the model solve time in myinputs
Expand Down
6 changes: 4 additions & 2 deletions src/configure_settings/configure_settings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function default_settings()
"VirtualChargeDischargeCost" => 1, # $/MWh
"MinCapReq" => 0,
"MaxCapReq" => 0,
"ParameterScale" => 0,
"WriteShadowPrices" => 0,
"UCommit" => 0,
"TimeDomainReduction" => 0,
Expand All @@ -36,7 +35,8 @@ function default_settings()
"ResourcePoliciesFolder" => "policy_assignments",
"SystemFolder" => "system",
"PoliciesFolder" => "policies",
"ObjScale" => 1)
"ObjScale" => 1,
"AutoScaling" => 0,)
end

@doc raw"""
Expand All @@ -60,6 +60,8 @@ function configure_settings(settings_path::String, output_settings_path::String)
settings = default_settings()
merge!(settings, model_settings)

settings["ScalingSettings"] = get_scaling_settings(settings)

output_settings = configure_writeoutput(output_settings_path, settings)
settings["WriteOutputsSettingsDict"] = output_settings

Expand Down

0 comments on commit bb078b5

Please sign in to comment.