ExaModelsPower.ac_opf_model — Method
ac_opf_model(filename; backend, T, form)Return ExaModel, variables, and constraints for a static AC Optimal Power Flow (ACOPF) problem from the given file.
Arguments
filename::String: Path to the data file.backend: The solver backend to use. Default if nothing.T: The numeric type to use (default isFloat64).form: Voltage representation, either:polaror:rect. Default is:polar.user_callback: User function that extends the modelkwargs...: Additional keyword arguments passed to the model builder.
Returns
A vector (model, variables, constraints):
model: AnExaModelobject.variables: NamedTuple of model variables.constraints: NamedTuple of model constraints.
ExaModelsPower.mpopf_model — Method
mpopf_model(filename, curve; kwargs...)
mpopf_model(filename, active_power_data, reactive_power_data; kwargs...)
mpopf_model(filename, curve, discharge_func::Function; kwargs...)
mpopf_model(filename, active_power_data, reactive_power_data, discharge_func::Function; kwargs...)Construct a multi-period AC optimal power flow (MPOPF) model using different formats of load input data.
Arguments
filename::String: Path to the network data file (e.g., MATPOWER).curve::AbstractVector: A time series of demand multiplier values.active_power_data::String: Path to a matrix of active power loads (Pd) per bus and time.reactive_power_data::String: Path to a matrix of reactive power loads (Qd).discharge_func::Function: (Optional) A function specifying battery discharge losses.
Keyword Arguments
N::Int: Number of time periods (inferred if not provided).corrective_action_ratio::Float64: Ratio of corrective power action allowed (default = 0.1).backend: Optimization solver backend (deault = nothing).form::Symbol: Power flow formulation, either:polaror:rect(default =:polar).T::Type: Floating-point type for numeric variables (default =Float64).storage_complementarity_constraint::Bool: Whether to enforce complementarity for storage (only for some methods, default = false).user_callback: User function that extends the modelkwargs...: Additional arguments passed to the solver or builder.
Returns
A vector (model::ExaModel object, variables::NamedTuple of variables, constraints::NamedTuple of constraints) representing the MPOPF model.
Method Variants
This function is overloaded for different combinations of input:
mpopf_model(filename, curve)mpopf_model(filename, active_power_data, reactive_power_data)mpopf_model(filename, curve, discharge_func)mpopf_model(filename, active_power_data, reactive_power_data, discharge_func)
ExaModelsPower.process_input_data — Method
Process data from input (problem) file into a more convenient form.
data should be the dict obtained by parsing an input JSON file. The return type is a NamedTuple with fields that are useful for constructing the scheduling and ACOPF models.