Skip to content

Commit

Permalink
ADD: voltage limits to slack/ref buses/nodes for improving subproblem…
Browse files Browse the repository at this point in the history
…s convergence.
  • Loading branch information
juanjospina committed Apr 22, 2024
1 parent 838567e commit a0f3643
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@

## staged Decomposition

- Added voltage limits (0.7-1.5) to slack/ref bus/nodes for the subproblems in the decomposition approach. This addition seems to make a ton of difference for improvong the convergence of the subproblems.
- Added option `export_models=true` that allows integrated models to be exported as `.nl` file. Indices for all variables (including boundary vars) are exported into a `integrated_vars_indices.txt` file.
- Added option `export_models=true` that allows decomposition models to be exported as `.nl` files and shared variable indices as `shared_vars.txt`.
- In the `ref.jl` function `_ref_filter_transmission_integration_loads!`, the initialization of the variables causes a problem that does not allow for multiple distribution systems to connect to the same transmission system bus. So, we commented out this for now (WIP).
Expand Down
26 changes: 13 additions & 13 deletions src/core/ref_decomposition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,14 @@ function _ref_filter_distribution_slack_generators_decomposition!(ref::Dict{Symb

# Loops over all nws
for (nw, nw_ref) in ref[:it][:pmd][:nw]
# Unrestrict buspairs connected to reference bus
for (j, bus_pair) in nw_ref[:buspairs]
if (bus_pair["vm_fr_min"] == 1.0) # only need to check one
bus_pair["vm_fr_min"] = 0.0
bus_pair["vm_fr_max"] = Inf
end
end

# # Unrestrict buspairs connected to reference bus - (Seems to not be needed!)
# for (j, bus_pair) in nw_ref[:buspairs]
# if (bus_pair["vm_fr_min"] == 1.0) # only need to check one
# bus_pair["vm_fr_min"] = 0.0
# bus_pair["vm_fr_max"] = Inf
# end
# end

# Modify v_min and v_max, remove va and vm, and change bus type for reference bus
boundary = nw_ref[:pmitd] # boundary info.
Expand All @@ -115,19 +116,18 @@ function _ref_filter_distribution_slack_generators_decomposition!(ref::Dict{Symb
boundary_number = boundary_keys[1]
boundary_data = boundary[boundary_number]

nw_ref[:bus][boundary_data["distribution_boundary"]]["vmin"] = [0.0, 0.0, 0.0]
nw_ref[:bus][boundary_data["distribution_boundary"]]["vmax"] = [Inf, Inf, Inf]
# nw_ref[:bus][boundary_data["distribution_boundary"]]["bus_type"] = 1 # 3: slack, 1: load, 2: gen. bus
# These limits are extremely important. If not present, subproblems has a lot of problems converging
nw_ref[:bus][boundary_data["distribution_boundary"]]["vmin"] = [0.7, 0.7, 0.7]
nw_ref[:bus][boundary_data["distribution_boundary"]]["vmax"] = [1.5, 1.5, 1.5]

# Modify slack gen cost & other parameters.
# Modify slack gen cost.
for (gen_indx, gen_data) in nw_ref[:gen]
if (gen_data["gen_bus"] == boundary_data["distribution_boundary"])
cost_length = length(gen_data["cost"])
gen_data["cost"] = zeros(cost_length)
# modify the control mode of the slack gen (not penalty related)
# gen_data["control_mode"] = 1 # TODO: this may be needed.
end
end

end
end

Expand Down

0 comments on commit a0f3643

Please sign in to comment.