Problem Specifications
ACDCPF
PF with support for AC and DC grids at the same time, including AC/DC converters.
Generic AC DC Power Flow
The general purpose ac dc power flow solver in PowerModelsACDC is,
PowerModelsACDC.solve_acdcpf — Function
solve_acdcpf(file::String, model_type::Type, solver; kwargs...)Parse an input file and solve an AC/DC power flow (ACDCPF) problem using the specified PowerModels formulation and solver.
Arguments
file::String: Path to the input data file (e.g., MATPOWER.mfile).model_type::Type: PowerModels model type (e.g.,ACPPowerModel,SOCBFPowerModel).solver: JuMP solver object or solver factory (e.g., Ipopt).kwargs...: Optional keyword arguments forwarded to the underlying solver entry point (settings, reference extensions, etc.).
Returns
- A solution dictionary (as returned by PowerModels) containing results such as objective value, variable values and solver termination status.
Behavior
This function parses the provided file into a data dictionary, performs any additional data processing (via process_additional_data!) and delegates to solve_acdcpf(data::Dict, ...). By default, reference extensions for DC grid, PST, SSSC, flexible loads and DC generators are applied.
solve_acdcpf(data::Dict{String,Any}, model_type::Type, solver; kwargs...)Solve an AC/DC power flow problem from an already-parsed data dictionary.
Arguments
data::Dict{String,Any}: Parsed network data dictionary (PowerModels format).model_type::Type: PowerModels model type to build the JuMP model.solver: JuMP solver object or factory.kwargs...: Forwarded keyword arguments (settings, ref_extensions override, etc.).
Returns
- A solution dictionary produced by the PowerModels solve pipeline.
Behavior
Builds and solves the problem using the power model solve entry point (_PM.solve_model). This wrapper applies the same set of default reference extensions as the file-based entrypoint. Use ref_extensions in kwargs to override or add additional references.
This function builds a JuMP model for a wide variety of the power flow formulations supported by PowerModelsACDC.
Sequential AC DC Power Flow (Native)
The sequential ac dc power flow solver in PowerModelsACDC uses the package NLSolve for solving the AC DC power flow problem in ACPPowerModel formulation sequentially.
PowerModelsACDC.solve_sacdcpf — Function
This function solves sequential ac-dc power flow
ACDCOPF
OPF with support for AC and DC grids at the same time, including AC/DC converters.
Variables
variable_voltage(pm)
variable_generation(pm)
variable_branch_flow(pm)Objective
objective_min_operational_cost(pm)Constraints
variable_active_dcbranch_flow(pm)
variable_dcbranch_current(pm)
variable_dc_converter(pm)
variable_dcgrid_voltage_magnitude(pm)
constraint_voltage(pm)
constraint_voltage_dc(pm)
for i in _PM.ids(pm, :ref_buses)
constraint_theta_ref(pm, i)
end
for i in _PM.ids(pm, :bus)
constraint_power_balance_ac(pm, i)
end
for i in _PM.ids(pm, :branch)
# dirty, should be improved in the future TODO
if typeof(pm) <: _PM.SOCDFPowerModel
constraint_flow_losses(pm, i)
constraint_voltage_magnitude_difference(pm, i)
constraint_branch_current(pm, i)
else
constraint_ohms_yt_from(pm, i)
constraint_ohms_yt_to(pm, i)
end
constraint_voltage_angle_difference(pm, i)
constraint_thermal_limit_from(pm, i)
constraint_thermal_limit_to(pm, i)
end
for i in _PM.ids(pm, :busdc)
constraint_power_balance_dc(pm, i)
end
for i in _PM.ids(pm, :branchdc)
constraint_ohms_dc_branch(pm, i)
end
for i in _PM.ids(pm, :convdc)
constraint_converter_losses(pm, i)
constraint_converter_current(pm, i)
constraint_conv_transformer(pm, i)
constraint_conv_reactor(pm, i)
constraint_conv_filter(pm, i)
if pm.ref[:nw][pm.cnw][:convdc][i]["islcc"] == 1
constraint_conv_firing_angle(pm, i)
end
end